The first is a filename to read from, and the second is a filename to write the output solution to. You have the option to give two optional parameters. Zeros or blank spaces can be used for the input of the application, meaning all of these inputs are valid: 1 5 2 4 1 2 4 3 0 1 2 The application will then block and allow you to input a sliding puzzle in the following format: 0 1 2 Note: This may require you to chmod the scripts make them executable: chmod u+x script/* If you are on a UNIX-based system, run script/build to package the application using Maven and script/puzzle to run the application: $ script/build Once you've retrieved the repository and are in the project's directory, you can package the project using Maven and run it manually using the following commands: $ mvn package -P cli-dist The two dependencies you'll need are:īeing by cloning the repository, or downloading the repository as a zip file. An example of an initial state and goal state of the 8-puzzle game are shown below. This project was written for the senior level Artificial Intelligence class at my university. The Manhattan distance is used to calculate the heuristic of the puzzle at each state. This implementation uses the A * Search algorithm to find the goal state. This application is a small command line utility used to solve the 8-puzzle game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |