Class EightPuzzle

java.lang.Object
topics.branchandbound.utils.BranchAndBound
topics.branchandbound.eightpuzzle.EightPuzzle

public class EightPuzzle extends BranchAndBound

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
  • Constructor Details

    • EightPuzzle

      public EightPuzzle(HeuristicType heuristicType, int[] board)
      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.