Inspiration

I will never forget August 27th.

A high-altitude glacier collapsed above Gyirong, on the Tibet-Nepal border, and sent a wall of mud and water through the valleys below. It happened thousands of kilometers from where my family lives in northern China, far enough that they were never in danger. But it happened inside the same country I call home, and my heart ached as I watched the footage.

I remember watching drone shots of a village buried in sludge and thinking about how ordinary it must have felt the day before: someone's kitchen table, someone's bicycle leaning against a wall, someone's grandmother sweeping the front step. The day the death toll climb past a thousand, and the "missing" count swell past six thousand, I was stunned. Six thousand people, somewhere in the country I grew up thinking of as home.

Talking to my own family, safe and hundreds of kilometers away, I felt something uncomfortable sit next to my relief: the knowledge that safety is mostly geographic, and that the only thing separating them from the families in Nepal was where the mountain happened to fall. It could just as easily have been them. It could just as easily be anyone.

What stuck with me most wasn't just grief, it was a specific frustration. Rescue teams were exhausted, outnumbered, and picking through unstable, dangerous terrain by hand, arriving hours or days too late simply because there weren't enough of them and the ground itself was hostile to human searchers.

I couldn't do anything for the 1,403 people who didn't come home, or the thousands still unaccounted for. But I could try to build something that means the next search starts in minutes instead of days, in places too dangerous for the first responders to reach safely on their own.

What it does

蚁群 YiQun is a disaster search-and-rescue system where a human incident commander talks to a 512-robot swarm and it answers out loud.

An operator watching 512 robots across 96 sectors is hands-busy and eyes-busy. The strategic picture doesn't fit on a screen, let alone in the attention of someone also watching a hazard front grow. So you hold U and say "how is coverage on the north ridge?". The OMNI model hears the question, looks at your live map, and answers in speech while you keep watching the swarm. Say "pull everyone out of D4" and the swarm actually re-prioritizes.

Three tiers run underneath, and none of them depends on the layer above: Tier 1: a swept-circle reflex controller that no higher tier can override. The safety floor. Tier 2: a market-based single-round reverse auction. 512 robots bid on tasks, self-heal, and keep working with the strategic layer completely silent. Tier 3: an LLM that sets sector priorities, never per-robot commands, and expires every directive after 30s.

On top of that, a multi-agent response team: a rescue lead proposes work, a logistics specialist challenges unsupported plans on capacity, a safety reviewer can veto dispatch, and a visual scout reads the operator's map, the only one of the four that sees pixels rather than a table.

The operator outranks every model in the building, per sector, expiring on the same 30 s clock. But not the feasibility filter: say "abandon every sector on the map" and it comes back refused, out loud, with the reason.

How we built it

Custom 2.5D kinematic simulator, ~3,600 lines of vectorised NumPy, robot state is parallel arrays, never a list of objects, and nothing iterates robots in Python inside the tick loop. Godot 4 dashboard over a WebSocket bridge at 10 Hz. ROS2 is a swappable transport adapter, not a dependency.

Perception is real. Robots see through a detector running on their own occluded 48×48 egocentric camera frames. No swarm-side code reads ground truth, enforced by a test over five guarded module trees. If that test fails, the fog-of-war claim is false.

The voice channel is one fused call, not three features. google/gemini-3.5-flash takes the operator's speech, the fog-limited map render, and the swarm's own blackboard in a single request, and returns a transcript, a spoken reply, a goal for the response team, and sector directives in the frozen schema. openai/gpt-audio-mini streams the voice back. Measured: 1.87 s for the fused call, 0.54 s to first audio, ~2.4 s end-of-speech to first spoken word, at ~$0.005 per turn.

Everything is asynchronous. One tick starts a request, a later tick collects it, because DemoSim runs at wall-clock speed and a joined thread freezes the dashboard.

Challenges we ran into

We found a defect in our own test, not our code. An auction test failed after a terrain merge. The fixture picked the geometrically farthest passable cell, which on the new map is across the river and disconnected. Passable ≠ reachable. The assertion had become 0.1 < 0.0, unfalsifiable, and it was checking only half the predicate the allocator actually evaluates.

Three rounds of "the merge is broken" that weren't. We force-checked-out the map branch's version of all 14 files it touches: 12 were already byte-identical, and rendering both branches produced byte-identical PNGs. The real bug was elsewhere.

A new class_name broke every Godot test with an error naming an innocent file, the class cache is generated and gitignored.

Accomplishments that we're proud of

  • We built a genuinely hierarchical control system, not a single LLM running countless robots
    • Three distinct tiers, each running at the speed appropriate to what it's deciding: motor-level reflexes at 10-50Hz, decentralized task auctioning at 1-2Hz, and strategic reasoning from the hivemind every 5-10 seconds
  • The swarm survives losing its own brain
    • We can kill the hivemind mid-run and the swarm keeps functioning, because task reallocation happens through a decentralized market-based auction that never depended on the LLM in the first place
  • The hivemind is actually trained, not just prompted
    • We fine-tuned it with GRPO using our own simulation as the reward signal (no human feedback needed), on free-tier compute, which meant designing a fast abstract training environment specifically so thousands of episodes were even possible in our timeframe
  • The dashboard makes the AI's reasoning inspectable and not decorative! Its so cool!
    • You can watch the hivemind's live strategic reasoning, the auction's tactical decisions, and toggle between what the swarm actually knows versus ground truth, in real time, while it's running

What we learned

Modalities have to meet inside one call to mean anything. "How is coverage on the north ridge?" is a question about a picture, asked out loud, answered against telemetry. Split into transcribe-then-look-then-answer it's three round trips and the cross-modal reasoning is gone.

A fourth agent only earns its seat if it knows something the others can't derive. Three text agents reasoning over the same table would be an ensemble.

Latency is a schema problem. reasoning: minimal is both faster and cheaper than low; none is a hard 400. Audio output 400s without streaming. All measured, none guessed.

Test fixtures rot faster than code. Ours silently became unfalsifiable when the terrain changed underneath it.

What's next for 蚁群 Yi-Qun

Fix the reachability gap we found and can prove. Guarantees connectivity of the base grid, but traversability is passable & slope & water, so nothing guarantees a per-chassis route. Measured: wheeled units cannot reach 14 of 22 buildings. We have a fix (grade an approach corridor from the already-graded road network to each pad); we reverted our first attempt because it improved building access 14 → 11 while making overall stranded ground worse, 13.5% → 15.5%. We'd rather ship it measured than ship it quickly.

Earn the trained components. The RAFT → DPO → GRPO ladder is designed and unrun; the hivemind is stock and honestly labelled base-local. The unit policy gated at 1.04× and stays off.

Interruptible mid-reply reasoning, so the commander can correct an order the assistant is still speaking. Multi-operator, so a real incident has more than one voice on the net.

Built With

  • auction-algorithm
  • cnn
  • computer-vision
  • disaster-response
  • evolutionary-algorithms
  • gdscript
  • godot
  • llama-cpp
  • llm
  • map-elites
  • multi-agent-systems
  • numpy
  • openjiuwen
  • openrouter
  • pathfinding
  • ppo
  • python
  • quality-diversity
  • qwen
  • reinforcement-learning
  • simulation
  • swarm-robotics
  • task-allocation
  • websockets
Share this project:

Updates

Submission history