/BFS_Puzzle

Primary LanguagePythonMIT LicenseMIT

BFS Puzzle

  1. We can run the code by Executing the main.py using the following command, no external libraries were used:

python3 main.py

  1. Uncomment the different start_state and goal_status to test the two test cases and you may add more but with the same variable name

  2. You can access all the nodes generated in the three txt files:

nodePath.txt, Nodes.txt, NodesInfo.txt

  1. All the txt files are overwritten each time so it doesnt matter if there is pre-existing data in the files

  2. Also run python3 plot_path.py to visualize the minimum steps required to reach the goal from the starting state.

python3 plot_path.py