Firefighting AI
Competition · Multi-agentA fog-of-war firefighting game, a 24-hour sprint, and a squad of robots that learned to divide and conquer.
A GeekDay 2026 team competition: control a squad of units on a 190×190 grid you can only partly see, find fires through fog of war, and put them out faster than rival teams. Our bot took 2nd place.
The competition
Each team scripts a bot that drives several units around a grid they can only partially see. Fires flare up with their own HP, water has to be fetched and applied, walls block the way — and you're racing rival teams to the same fires. It rewards exploration, coordination, and never wasting a move.
My part
This was a team project. The final, winning bot is a merge of everyone's work and lives in a teammate's repo ↗. What I brought was the foundation it ran on: the gRPC client that talked to the game server with proper ACK-gated flow control, an early version of the shared world model that fuses every unit's vision into one map, and a live web visualizer so we could watch what the bot believed during the 24-hour crunch.
The winning bot
On top of that foundation the team built something genuinely clever. A central world model fuses sightings into shared knowledge of fires, water and walls, with two nice touches: a fire tracker that follows each fire's HP and clusters nearby fires together, and a vision calibrator that learns each unit's real sight radius instead of assuming one. Movement is A* with a Manhattan heuristic, capped to stay fast across the full 190×190 board, and a stuck-detector remembers blocked cells so units stop re-bumping the same walls.
The three roles
A coordinator classifies each unit and hands it a brain — and the brains play very different games:
- Drones fly the perimeter to learn the map's bounds, sweep to scout, then snipe fires they spot.
- Trucks run a water loop — go to a fire, fight it, go refill — with opportunistic snipes on the way.
- Fighters are infinite-water bulldozers: park on a fire cluster's centroid and extinguish outward, never needing to refill.
Built with
Python throughout: gRPC streaming client (threaded receive loop, ACK-gated commands), a shared world model with fire-clustering and per-unit vision calibration, A* pathfinding with stuck detection on a 190×190 grid, role-based unit state machines, and a Flask web visualizer of the bot's belief state.