This library has algorithms for solving the 8-Puzzle problem. It's a defacto problem in AI.
The input of the game is a state of the 8-Puzzle
The library implements
- DFS
- BFS
- A* with heuristics
- Manhattan Distance
- Euclidean Distance
The code exists in solvers.kt
and it's almost a one to one mapping of the Pseudocode
To build the project run
gradle jar
Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.shakram02:Npuzzle:v1.0.0'
}