Skip to content

purp-rup/8-puzzle-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Analysis on Several Search Algorithms

This program benchmarks six search algorithms on randomly generated 8-puzzle instances. For each even optimal path length from 2 to 12, it generates 100 puzzles and solves them using the following algorithms:

  • Uniform Cost Search (UCS)
  • A* Search with Misplaced Tiles (A*1)
  • A* Search with Manhattan Distance (A*2)
  • Iterative Deepening (ID)
  • Iterative Deepening A* Search with Misplaced Tiles (IDA*1)
  • Iterative Deepening A* Search with Manhattan Distance (IDA*2)

Results are averaged across each puzzle set and displayed in three formatted ASCII tables comparing states expanded, states generated, and max states in memory—making it easy to analyze the trade-offs between informed and uninformed search algorithms.

To Run

  1. Run the following commands, using the absolute path to libs/puzzle.jar in your project directory for "-Dfile"
mvn install:install-file "-Dfile=.../project/libs/puzzle.jar" "-DgroupId=edu.stockton" "-DartifactId=puzzle" "-Dversion=1.0" "-Dpackaging=jar"   
mvn clean package
  1. Then, run with:
java -jar target/8puzzle-analysis-1.0.0.jar

Authors

About

An analysis on the performance of various search algorithms in regard to the 8-Puzzle problem.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages