https://github.com/puemos/ai-pacman
CS 188 project number 1 Using various search algorithms to find the optimal path around a pacman maze while eating all the food.
https://github.com/puemos/ai-pacman
artificial-intelligence berkeley pacman-game python
Last synced: 11 months ago
JSON representation
CS 188 project number 1 Using various search algorithms to find the optimal path around a pacman maze while eating all the food.
- Host: GitHub
- URL: https://github.com/puemos/ai-pacman
- Owner: puemos
- Created: 2017-04-06T05:17:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-06T05:19:22.000Z (about 9 years ago)
- Last Synced: 2025-04-07T21:51:26.520Z (about 1 year ago)
- Topics: artificial-intelligence, berkeley, pacman-game, python
- Language: Python
- Size: 188 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
Shy Alter
301863973
1. It's not the cheapest solution:
########## DFS ##########
➜ python pacman.py -l mediumMaze -p SearchAgent
[SearchAgent] using function depthFirstSearch
[SearchAgent] using problem type PositionSearchProblem
Path found with total cost of 130 in 0.0 seconds
Search nodes expanded: 146
Pacman emerges victorious! Score: 380
########## BFS ##########
➜ python pacman.py -l mediumMaze -p SearchAgent -a fn=bfs
[SearchAgent] using function bfs
[SearchAgent] using problem type PositionSearchProblem
Path found with total cost of 68 in 0.0 seconds
Search nodes expanded: 268
Pacman emerges victorious! Score: 442
Bfs found a cheaper solution (68<130) to the same problem
2.
Bfs found the cheapest solution because a calculate all the
possible solution and took the cheapest one.
4.
########## A Star ##########
➜ python pacman.py -l openMaze -z .5 -p SearchAgent -a fn=astar,heuristic=manhattanHeuristic
[SearchAgent] using function astar and heuristic manhattanHeuristic
[SearchAgent] using problem type PositionSearchProblem
Path found with total cost of 54 in 0.0 seconds
Search nodes expanded: 211
Pacman emerges victorious! Score: 456
########## DFS ##########
➜ python pacman.py -l openMaze -z .5 -p SearchAgent
[SearchAgent] using function depthFirstSearch
[SearchAgent] using problem type PositionSearchProblem
Path found with total cost of 298 in 0.0 seconds
Search nodes expanded: 576
Pacman emerges victorious! Score: 212
########## BFS ##########
➜ python pacman.py -l openMaze -p SearchAgent -a fn=bfs
[SearchAgent] using function bfs
[SearchAgent] using problem type PositionSearchProblem
Path found with total cost of 54 in 0.0 seconds
Search nodes expanded: 682
Pacman emerges victorious! Score: 456