https://github.com/boppreh/8puzzle
Python solution to sliding 8-puzzle
https://github.com/boppreh/8puzzle
Last synced: 3 months ago
JSON representation
Python solution to sliding 8-puzzle
- Host: GitHub
- URL: https://github.com/boppreh/8puzzle
- Owner: boppreh
- License: mit
- Created: 2016-04-18T23:28:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-20T01:37:03.000Z (about 9 years ago)
- Last Synced: 2025-01-26T04:41:27.969Z (5 months ago)
- Language: Python
- Size: 6.16 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 8puzzle
Python solution to sliding 8-puzzle. We start with the final state
123
8 4
765and compute all states reachable by it, depth-first. The resulting table has ~180,000 entries and is saved to a file (`table.pkl`) for faster queries. The table takes about 6 seconds to be built and persisted on my machine, and subsequent queries are practically instantaneous. The worst case requires 30 steps to solve.