How johnskouloudis/pacmanproject works
This repository is a Berkeley Pacman AI teaching project, with separate game variants and exercises in search, adversarial agents, tracking, and reinforcement learning, plus a small machine-learning package. The main gameplay workflow loads a maze, runs Pacman and ghost agents through game-state transitions, and displays the outcome. Other branches implement inference and learning workflows. Relationships below use README and SOURCE INDEX evidence; unsampled subsystems are included where documented, but their unverified connections are omitted or dashed.
Main entry points: pacman.py Pacman Runner · inference.py Belief Inference · gridworld.py Gridworld MDP · game.py Game Engine
Components 26
Pacman Gameplay
- Maze Layout
Tracking/layout.py - Game Engine
Tracking/game.py - Pacman Runner
Tracking/pacman.py - Pacman Agents
Tracking/pacmanAgents.py - Ghost Agents
Tracking/ghostAgents.py - Text Display
Tracking/textDisplay.py - Graphics Display
Tracking/graphicsDisplay.py
Search Agents
- Search Algorithms
Search and Multi-Agent/search.py - Search Agents
Search and Multi-Agent/searchAgents.py - Adversarial Agents
Search and Multi-Agent/multiAgents.py
Tracking Inference
- Busters Game
Tracking/busters.py - Busters Agents
Tracking/bustersAgents.py - Belief Inference
Tracking/inference.py - Bayesian Networks
Tracking/bayesNet.py - Factor Operations
Tracking/factorOperations.py
Reinforcement Learning
- Gridworld MDP
Reinforcement/gridworld.py - Value Iteration
Reinforcement/valueIterationAgents.py - Q Learning
Reinforcement/qlearningAgents.py - RL Backend
Reinforcement/backend.py
Machine Learning
- Model Definitions
machinelearning/models.py - Loss Functions
machinelearning/losses.py - Training Loop
machinelearning/train.py - ML Backend
machinelearning/backend.py - GPT Model
machinelearning/gpt_model.py - ChatGPT Interface
machinelearning/chargpt.py
Other components
- Player
Connections 25
- Player → Pacman Runner: starts game
README.md - Pacman Runner → Maze Layout: loads layout
Tracking/pacman.py - Pacman Runner → Game Engine: runs game
Tracking/pacman.py - Pacman Runner → Pacman Agents: loads agents
Tracking/pacman.py - Pacman Runner → Ghost Agents: loads ghosts
Tracking/pacman.py - Pacman Runner → Text Display: selects display
Tracking/pacman.py - Pacman Runner → Graphics Display: selects display
Tracking/pacman.py - Game Engine → Maze Layout: initializes state
Tracking/game.py - Search Agents → Search Algorithms: uses algorithms
Search and Multi-Agent/searchAgents.py - Search Algorithms → Player: returns action path
- Adversarial Agents → Player: chooses strategy
- Busters Game → Game Engine: uses game framework
Tracking/busters.py - Busters Agents → Busters Game: uses game state
Tracking/bustersAgents.py - Busters Agents → Belief Inference: requests beliefs
Tracking/bustersAgents.py - Belief Inference → Bayesian Networks: uses network
Tracking/inference.py - Belief Inference → Factor Operations: uses operations
Tracking/inference.py - Factor Operations → Bayesian Networks: operates on factors
Tracking/factorOperations.py - Gridworld MDP → Value Iteration: uses agent
Reinforcement/gridworld.py - Gridworld MDP → Q Learning: uses agent
Reinforcement/gridworld.py - RL Backend → Gridworld MDP: supports exercises
Reinforcement/backend.py - Training Loop → Loss Functions: computes loss
machinelearning/train.py - ML Backend → Model Definitions: uses models
machinelearning/backend.py - ML Backend → Loss Functions: uses losses
machinelearning/backend.py - GPT Model → Model Definitions: builds on
machinelearning/gpt_model.py - ChatGPT Interface → GPT Model: delegates to
machinelearning/chargpt.py