Skip to content

Implementation of many popular AI algorithms to play the game of Pacman such as Minimax, Expectimax and Greedy.

Notifications You must be signed in to change notification settings

davide97l/Pacman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

20de04a · Apr 12, 2020

History

10 Commits
Feb 13, 2020
Feb 13, 2020
Feb 18, 2020
Feb 18, 2020
Feb 18, 2020
Feb 12, 2020
Apr 12, 2020
Feb 12, 2020
Feb 12, 2020
Feb 13, 2020
Feb 12, 2020
Feb 12, 2020
Feb 12, 2020
Feb 12, 2020
Feb 18, 2020
Feb 12, 2020
Feb 13, 2020
Feb 12, 2020
Feb 12, 2020

Repository files navigation

AI algorithms for Pacman

Intro

The Pacman Projects by the University of California, Berkeley.

Animated gif pacman game

Start a game with the command and move the agents using ASWD keyboard buttons or arrow keys:

$ python pacman.py

You can see the list of all options and their default values via:

$ python pacman.py -h

Multi-Agent algorithms

  • ReflexAgent: an agent that considers food locations, ghost locations and score to perform well.
$ python pacman.py -p ReflexAgent -l originalClassic -n 1 -ghost DirectionalGhost -z 0.8 -k 1
  • MinimaxAgent: an adversarial search agent implementing minimax algorithm
$ python pacman.py -p MinimaxAgent -l minimaxClassic -a depth=4
  • AlphaBetaAgent: an adversarial search agent implementing minimax algorithm with alpha-beta pruning to more efficiently explore the minimax tree.
$ python pacman.py -p AlphaBetaAgent -l openClassic -a depth=2
  • Expectimax: an adversarial search agent implementing expectimax algorithm
$ python pacman.py -l mediumClassic -p ExpectimaxAgent -a depth=2

Search algorithms

  • DeepSearch: a deep search algorithm to find the best possible path given an evaluation function, it si faster than minimax but doesn't keep into considerations ghosts
$ python pacman.py -l trickyClassic -p DeepSearchAgent -a depth=6 evalFn=evaluationFunction

Releases

No releases published

Packages

No packages published

Languages