Inspiration

Most people who go missing in the hills and are found alive are found quickly. In a study of 4,244 search missions in Oregon, 99% of survivors were found within 51 hours (OHSU). Mountain rescue in England and Wales had 3,968 call-outs in 2025, up from 3,784 the year before (NEWSAR).

The problem we kept reading about was communication. In south-west Colorado, responders lose radio contact as soon as they leave their vehicles, and one new tower costs at least $1 million (The Journal). Most coordination tools assume base can always reach every searcher. In the hills that often isn't true, so for the Neptune North challenge we built a search team that doesn't depend on base.

What it does

A hiker is missing somewhere on a 40×40 grid of mountain terrain, with a ridge that blocks radio signals. Up to six searchers look for them. Each searcher is a separate process with its own map, and each one decides for itself where to go next.

  • Searchers share what they've covered only when their radios can reach each other. Distance, terrain and storms can all cut the link.
  • A searcher that's cut off keeps going, and avoids ground it expects a teammate to be covering.
  • When the radios come back, the maps merge without conflicts.
  • If a searcher is killed, the others notice it's gone quiet and take over its area.
  • Whoever finds the hiker walks back towards base until someone can hear them. A searcher that's been out of contact for a long time can act as a relay.

In the live view you can open any searcher's own map to see how far it has drifted from what the team knows. You can also cut every radio with Blackout, kill a searcher, or generate a new mountain. A compare page runs Ridgeline against independent searchers and a central commander on the same maps.

How we built it

The agent is a single TypeScript class. The same code runs as live OS processes, as an in-browser fallback, and in a headless benchmark, so the numbers we report describe the system we demo.

  • In live mode, agents talk over UDP multicast with no server in between. The receiving agent decides whether it heard each packet, based on range (12 cells), line of sight over the terrain and the storm's packet loss.
  • Each agent's record of searched ground only ever grows and carries a version number, so merging means keeping the newer copy. The order messages arrive in doesn't matter.
  • Each agent scores cells by how likely the hiker is to be there, minus travel and climbing cost. It avoids the area around a teammate's last announced target, and that claim fades over 90 ticks, so a silent teammate's ground eventually gets picked up.
  • The bridge that feeds the web view only watches. It can inject faults (storm, blackout, kill), but it can't send an agent a target. Agents never learn the hiker's location: they get a salted SHA-256 hash and have to stand on the right cell to find them.
  • There's also a no-internet mode, where each device runs one agent. Agents find each other with UDP broadcast, then share state over a TCP mesh, with no server at all.
  • The front end uses Next.js, a canvas map redrawn at 60 fps from Socket.IO snapshots, and Recharts for the comparison. It's deployed with Docker Compose on Dokploy.

Challenges we ran into

  • Packet size. macOS limits a UDP packet to 9,216 bytes, and a full state message was about 16 KB. Most of the data is zeros, so compressing each message brought it down to 2–4 KB.
  • Docker networking. Multicast doesn't work across Docker's overlay network, so in deployment all agent processes run in one container. They're still separate processes with separate state.
  • Stale data. After a reset, messages from the old run could still arrive and draw on the new map. Every message now carries a run ID, and old ones are dropped.
  • Overlap. Without coordination, every agent heads for the same likely cells, and it gets worse when they can't talk. Announcing where each agent is going, not just where it is, cut duplicate searching in half.
  • A fair comparison. All three strategies use the same agent code, terrain and radio model. The central commander's orders travel over the same lossy radio as everything else. Each configuration runs twice: once to time the find, and once with finding switched off to measure coverage.

Accomplishments that we're proud of

Across 240 simulated runs (20 maps × 4 packet-loss levels × 3 strategies), at 60% packet loss:

Ridgeline Independent Central commander
Median steps to find the hiker 56 129 624
Runs where the hiker was found 100% 100% 75%
Duplicate searching 33% 67% 33%

At 90% packet loss, Ridgeline still found the hiker in every run. The central commander found them in 60% of runs.

We're also glad it's genuinely distributed: separate processes on a real network with real packet loss. And the live view shows each agent's reasoning, so you can watch one fall out of sync and then catch up when its radio comes back.

What we learned

  • Choosing data that only grows made merging easy. Most of the hard work was in that design choice.
  • A central plan looks efficient until its orders stop arriving. Then its searchers finish their last job and wait.
  • Having agents guess what their teammates will do worked better than waiting to hear from them.
  • Running one agent class everywhere meant the benchmark and the demo never disagreed.

What's next for Ridgeline

  • Run the same agent logic over real radios such as LoRa or Bluetooth mesh, on separate devices.
  • Load real elevation data for an actual search area.
  • Model radio signals more realistically, with fading and dropouts in bursts.
  • Put rescuers' phones and drones in the same team, sharing searched ground without a phone mast.

Built with

typescript · bun · next.js · react · tailwindcss · shadcn/ui · socket.io · udp-multicast · recharts · docker · dokploy

Links

Built With

Share this project:

Updates

Submission history