Data Structures · FIB-UPC
Programming Game Viewer
Watch AI bots compete in "The Purge" — a grid-based strategy game from the Data Structures and Algorithms course at FIB-UPC.
Preloaded
Sample Game
4 AI players battle across 250 rounds on a 15×30 grid. Includes warriors, builders, weapons, barricades, and resource gathering.
Watch ReplayYour Own Game
Compile and run the game locally, then upload the .out replay file to watch it here.
make && ./Game < default.cnf > replay.out Viewer Controls
SpacePlay / Pause
← →Previous / Next round
Home EndGo to start / end
Mouse wheelZoom in / out
SliderScrub through rounds
HHelp overlay
About this project
Written in C++11, the game engine runs 4 AI players simultaneously on a 2D grid. The custom AI (AIJohnnyMelavo) uses BFS pathfinding to prioritize weapon collection, enemy hunting, and resource gathering. Each player controls warriors (fighters) and builders (constructors) who compete for money, food, guns, and bazookas across day/night cycles.
How to generate your own replays
- Clone the repository
- Write your own AI in a file like
AIMyBot.cc(extend thePlayerclass) - Run
maketo compile - Run
./Game -i default.cnf > replay.outto generate a replay - Upload the
replay.outfile here to watch it!