This project is an n-puzzle solver using different algorithms and heuristics.
You can solve maps by adding them as the last arguments, or they can be directly generated if no maps are given.
This solver can easily solve up to 6x6 maps (in greedy mode) and may solve easy 7x7 maps.
cargo run -- {options} {puzzle_path...}
Options:
--variant ida* (default, memory efficient)
a* (use a lot of memory)
--heuristic linear-conflict (default, best)
manhattan
euclidean
hamming (worst)
--solution-type snail (default)
first
last
--mode normal (default)
greedy (skip g(n))
uniform (skip h(n))
--amount number (amount of puzzle to generate)
--size number (size of the generated puzzles)
--unsolvable true (make generated puzzle unsolvable)
- Rust Book
- Binary Heap
- n-puzzle
- A* and heuristics