The EUTOPIA Pacman Contest is a competitive team-based challenge where participants develop intelligent agents for a capture-the-flag variant of Pacman. Based on Berkeley's CS188 course and adapted by UPF with contributions from RMIT and UoM, this Python-based framework provides a platform for implementing and testing advanced AI strategies.
- Map Structure: The playing field is divided into two halves, with each team defending their side while invading the opponent's territory.
- Objective: Collect food pellets from the opponent's side and return them safely to your territory.
- Scoring: Each food pellet returned to your territory earns one point.
- Victory Conditions: Win by collecting all opponent's food or having the highest score when time expires.
- Constraints: Players must manage computational resources efficiently to ensure timely actions.
This repository provides implementations of advanced AI agents for the EUTOPIA Pacman Contest:
- Clone the EUTOPIA contest repository:
git clone https://github.com/aig-upf/pacman-eutopia
- Replace
team_name_Xwith your team's name - Add the desired version file (v1.py or v2.py) to your repository
- OffensiveQLearningAgent: Employs Q-learning for strategic offensive play with dynamic action selection, feature-based decision making, and Bayesian inference for tracking opponents.
- DefensiveReflexCaptureAgent: Focuses on territory defense using patrol strategies around key chokepoints, with Bayesian belief distributions to track invaders when not directly visible.
- OffensiveQLearningAgent: Enhanced Q-learning agent with weight persistence and adaptive strategy development.
- DefensiveQLearningAgent: Q-learning defender that focuses on protecting territory and intercepting invaders, with patrol strategies around key entry points and Bayesian inference for enemy tracking.
The repository includes optimized weights for both offensive and defensive agents, enabling immediate high-performance gameplay without training:
default_offensive_weights.json: Optimized weights for offensive strategiesdefensive_agent_weights_613de35e-a3b5-4f6b-bbe5-579884aa87f0.json: Refined weights for defensive play
- Reinforcement Learning: Both versions leverage Q-learning to improve performance over time.
- Bayesian Inference: Used for probabilistic tracking of opponents even when not directly visible.
- Adaptive Strategies: Agents dynamically adjust between offense and defense based on game state.
- Strategic Patrolling: Defensive agents identify and monitor key map locations to intercept invaders efficiently.




