Package mazealgo.model.algorithms.maze3D
Class SearchableMaze3D
java.lang.Object
mazealgo.model.algorithms.maze3D.SearchableMaze3D
- All Implemented Interfaces:
ISearchable
Object Adapter that exposes a Maze3D as an ISearchable. Six straight
neighbours per cell (one step on each axis); no diagonals in 3D.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllPossibleStates(AState state) doubleManhattan distance scaled by the straight-step cost.
-
Constructor Details
-
SearchableMaze3D
-
-
Method Details
-
getStartState
- Specified by:
getStartStatein interfaceISearchable
-
getGoalState
- Specified by:
getGoalStatein interfaceISearchable
-
getAllPossibleStates
- Specified by:
getAllPossibleStatesin interfaceISearchable
-
heuristic
Manhattan distance scaled by the straight-step cost. Admissible because there are no diagonals in 3D - every step costs exactly STRAIGHT_COST, so |dd|+|dr|+|dc| straight steps is the cheapest any path can possibly be.- Specified by:
heuristicin interfaceISearchable
-