Credits: UC Berkeley
Launches an interactive game:
python pacman.py
Launches a game with your Pacman class, located in youragentmodule.py
, and with the maze tinyMaze (see layout folder).
/!\ The agent module name is the same as the class name but with the first capitalized letter.
E.g. if the module agent523821
is provided then the class Agent523821
will be imported.
python pacman.py -l tinyMaze -p youragentmodule
Same configuration as above including at most n
ghosts. Note that the final number of ghosts is the minimum
between the number of ghosts defined in the maze and n
. Set n
to 0 to play in search mode only.
python pacman.py -l tinyMaze -p youragentmodule --numghosts n
Same configuration as above, but defining the pattern of the ghosts (here a random ghost).
python pacman.py -l tinyMaze -p youragentmodule --numghosts n -g randyghost
See the help section of the command line for more information about the parameters.
The score function is computed as follows:
score = -#time steps + 10*#number of food dots eaten + 200*#ghost_eaten + (-500 if lose else 500)
(See pacman.py
for more details.)