Skip to content
forked from davide97l/Pacman

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

ting0602/Pacman

 
 

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%