Pacman Capture the Flag
A team of agents playing capture the flag in the Berkeley Pacman contest.
Capture the Flag is the classic Berkeley Pacman contest, two teams of agents raiding each other’s half of a maze for food while defending their own. For the Modern Game AI course at Leiden University, our team of three built agents to play it and pitched them against the course baselines.
Links · 📄 Report
How our agents play
The agent we submitted is a heuristic one. Each of our two Pacmen runs a small state machine that switches between three modes, offense, defense and run, depending on the score, where it is on the map and how close the nearest enemy is. In offense it heads for the safest nearby food and runs back to its own half after every pellet it grabs, which turns out to be a quick way to bank a lead. In defense the two of them pre position on the food the enemies are closest to, so they can cut a raider off early. Alongside it we built Monte Carlo Tree Search agents as an alternative, with the usual selection, rollout and backpropagation, but the heuristic agent was the one we shipped.
How it did
Against the course baseline our agent won 98 of 100 games.