An open API service indexing awesome lists of open source software.

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.

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