-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation of the Davis-Putnam algorithm to solve a simple form of an adventure game. The puzzle includes (1) a maze with treasures at particular nodes; (2) a maximum number of steps; A player gets all the treasures at the node travelled to. The object is to find a path through the maze that collects all the different types of treasure.
kaushal1120/SATSolver
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Front End: 1. The main function in java file FrontEnd.java in package ai.sat.frontend runs the FrontEnd program for the adventure maze problem. 2. The input for this FrontEnd program is defined in SATSolver-master/src/io_files/maze_input.txt. Replace the contents of this file to generate the atoms and clauses for any other adventure maze problem. 3. The output file generated by this program is dpll_input.txt which is generated in SATSolver-master/src/io_files/. Davis-Putnam Procedure: 1. The main function in java file SatSolver.java in package ai.sat.dpll runs the Davis-Putnam procedure for satisifiability. 2. The input for the davis-putnam program is defined in SATSolver-master/src/io_files/dpll_input.txt. Replace the contents of this file to run the dpll procedure on any other input. 3. The output file generated by the dpll program is dpll_output.txt which is generated in SATSolver-master/src/io_files/. Back End: 1. The main function in java file BackEnd.java in package ai.sat.backend runs the BackEnd program for the adventure maze problem. 2. The input for this BackEnd program is defined in SATSolver-master/src/io_files/dpll_output.txt. Replace the contents of this file to generate the domain solution path from the dpll valuations of any other adventure maze problem. 3. The output from this module comes on the standard output. To run the above programs: 1. Unzip SATSolver-master.zip. 2. cd SATSolver-master 3. Replace the contents of the respective input files in src/io_files to change the input on which either of the programs are run. Commands to run the above programs on Windows: dir /s /B *.java > sources.txt (To populate a list of .java files in a single file sources.txt) javac -d classes @sources.txt (To compile the java files populated in sources.txt) java -cp classes ai.sat.frontend.FrontEnd (To run the FrontEnd) java -cp classes ai.sat.dpll.SatSolver (To run the Davis-Putnam procedure) java -cp classes ai.sat.backend.BackEnd (To run the BackEnd) Commands to run the above programs on Linux/Mac find . -name "*.java" > sources.txt (To populate a list of .java files in a single file sources.txt) mkdir classes javac -d classes @sources.txt (To compile the java files populated in sources.txt) java -cp classes ai.sat.frontend.FrontEnd (To run the FrontEnd) java -cp classes ai.sat.dpll.SatSolver (To run the Davis-Putnam procedure) java -cp classes ai.sat.backend.BackEnd (To run the BackEnd)
About
Implementation of the Davis-Putnam algorithm to solve a simple form of an adventure game. The puzzle includes (1) a maze with treasures at particular nodes; (2) a maximum number of steps; A player gets all the treasures at the node travelled to. The object is to find a path through the maze that collects all the different types of treasure.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published