Skip to content

solving 8 Puzzle with A*, Recursive Best First Search and BFS

License

Notifications You must be signed in to change notification settings

cocolico14/8Puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

8Puzzle

Solving 8 Puzzle with A*, Recursive Best First Search and BFS


Documentation

PuzzleNode Class :

  • For holding data of each state and checking whether it reached the goal or not

ProblemTree Class:

  • Solve the problem depend on the given method.
    • BFS: Simple bfs search on the problem tree until reach goal state
    • A*: Only open nodes with minimum heuristic value (depend on heuristic choosen (Missplace Tiles or Manhatan Distance) + nodeDepth).
    • Recursive Best First Search: Recursively expanding the most promising node chosen according to a specified heuristic function.

Heuristic Class:

  • calculating heuristic for given state.

Example

Press Edit button to input your puzzle

Then press Done button to save the changes

Finally press Run button and choose the method for solving the puzzle


Author

License

This project is licensed under the MIT License - see the LICENSE file for details