/8-puzzle

solve 8 puzzle by BFS and DFS.

Primary LanguagePython

Solve 8 puzzle in several ways

Solve 8 puzzle by breadth-first search, depth-first serach, lower-bound search.

Breadth-first search (bfs.py)

Considered the cost of each step is 1.

Depth-first serach (dfs.py)

Limited the depth considering the maximum number of moves is 31.

Lower-bound search(lower_bound.py)

Use Manhattan distance and limit the depth.

example.py

You look at example.py and will know how to use this program.