Skip to content

n3dhir/8-Puzzle-using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

8-Puzzle-using-Python

  1. Download the zip file and extract it.
  2. Open main.py file.

Sans titre

How to execute

1. you can choose the initial state and the final state in the source code or you can click SHUFFLE to get a random initial state

image

2. To run an algorithm, just click BFS , DFS , A*, or Depth Limited

3. You can click RESET to reset the board to the initial state

4. You can click SHUFFLE to get a new random initial state

sometimes you can get an impossible puzzle (a puzzle that has no solution).

5. When an algorithm is running you should wait for it else the program will crash

image

6. When an algorithm completes, the corresponding fields will have new values

Sans titre

7. If no solution is found the answer will be INFINITY

Sans titre

8. You can change the maximum depth achievable by the Depth Limited algorithm

  check line 419.

9. To change the speed of the cells, change the value of latency in the track function

250 milliseconds image

0 milliseconds image

A high latency means slow speed.

A low latency means high speed.

Conclusion

The A* algorithm is the best, it visits much less nodes than the other algorithms.

Sans titre

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages