/Pacman-1

Assignment 1: Simple Agents, DFS, BFS, A*, Introduction to Artificial Intelligence, Spring 2017, National Chiao Tung University

Primary LanguagePython

Pacman-1

Assignment 1: Simple Agents, DFS, BFS, A*

Introduction to Artificial Intelligence, Spring 2017, National Chiao Tung University

Notes

  • Cannot run into both the current and next location of Ghosts

Commands

Simple Agents

Implemented in searchAgents.py.

  • P1-1 CleanerAgent
python pacman.py -p CleanerAgent -l P1-1
  • P1-2 FroggerAgent
python pacman.py -p FroggerAgent -l P1-2 -g StraightRandomGhost
  • P1-3 SnakeAgent
python pacman.py -p SnakeAgent -l P1-3 -g StraightRandomGhost
  • P1-4 DodgeAgent
python pacman.py -p DodgeAgent -l P1-4

DFS, BFS, A*

Implemented in search.py.

  • P2-1 Depth-First-Search
python pacman.py -l mediumMaze -p SearchAgent -a fn=dfs
  • P2-2 Breadth-First Search
python pacman.py -l mediumMaze -p SearchAgent -a fn=bfs
  • P2-3 A* Search
python pacman.py -l mediumMaze -p SearchAgent -a fn=astar,heuristic=manhattanHeuristic