PuzzleSolver is a program that contains 3 different heuristic algorithms with a common goal of solving some puzzles.
The puzzle is a 4x4 board with non repetible numbers from 1 to 14. The goal is simple, sort the numbers on the board! There are also two '0's which represent where can you move the other numbers, they work like blank gaps. (Last 2 numbers of the board must the the two 0s).
The solution is provided in the form of an array following a sequence of a number followed by its movement (N North, S South, E East, O West)
The three algorithms in this project consist of an implementation of the following algorithms:
- Steepest ascent hill climbing
- Simple hill climbing
- Best-first search
Nothing new here, since the program was written in Java you have to write the following in your windows terminal after changing to the project directory:
md out
javac src\main.java -d out -sourcepath src
java -cp out main