- What is 8-Puzzle?(Ctrl + click) the link
- It's like the 15 puzzle, also known as 'Sliding puzzle'
- Does this work on Linux?
- Sadly no, due to libraries used in the code.
- Does this work on Windows
- Yes, below instructions are provided.
- Download zip to Downloads
- Unzip 8-Puzzle-master
- right-click & extract here
- gcc/g++ Compilers (used to compile and play)(Ctrl + click) the link
- run & install
- Video on how to install the compilers Compiler Installation Tutorial(Ctrl + click) the link
- If you have installed them once, you don't need to again
- Press together:
Win + R
- type & enter:
cmd
- type & enter:
cd Downloads
to change directory to your Downloads - type & enter:
cd 8-Puzzle-master
- type & enter:
g++ -std=c++11 main.cpp -O3 -o run
- Read
How to play
before playing - type & enter:
run
- Movement:
- w : (Up) Swap '0' with the # above
- s : (Down) Swap '0' with the # below
- a : (Left) Swap '0' with the # left
- d : (Right) Swap '0' with the # right
- Options
- 0 : Quit
- Path finding strategies:
- 1 : Uniform Cost Search (worst)
- 2 : Misplaced Tile Heuristic (better)
- 3 : Manhattan Distance Heuristic (best)
- z : Show real-time shortest solution
- Based on path finding strategy used
- x : Input custom 3x3 board
- m : Mix puzzle with _ random moves (1 - too many)
- Can press any key to skip watching/waiting for mix to finish
- S : Solve
- R : Reset board to solved state
- G : Set 1 of 2 hardest possible puzzle states for 8 puzzle
- ? : Change puzzle size
- h : Show this help menu