Class EightPuzzle
java.lang.Object
topics.branchandbound.utils.BranchAndBound
topics.branchandbound.eightpuzzle.EightPuzzle
The 8-Puzzle
Evaluates and solves the classic sliding puzzle (8-Puzzle) using a Branch and Bound algorithmic strategy. The system leverages mathematical heuristics to estimate the cost to the target configuration, efficiently navigating the state space tree.
- Author:
- vicegd
-
Field Summary
Fields inherited from class BranchAndBound
bestNode, globalUpperBound, nodeHeap, rootNode -
Constructor Summary
ConstructorsConstructorDescriptionEightPuzzle(HeuristicType heuristicType, int[] board) Initializes the puzzle solver and builds the execution tree root. -
Method Summary
Methods inherited from class BranchAndBound
branchAndBound, getBestNode, getRootNode, printSolutionTrace
-
Constructor Details
-
EightPuzzle
Initializes the puzzle solver and builds the execution tree root.- Parameters:
heuristicType- The specific evaluation strategy (e.g., Manhattan distance).board- The 1D array representation of the 3x3 grid.
-