Ad hoc MANET

Keyboard: 1 to 5 pick a tool; [ and ] select the previous or next node; arrow keys move the selected node (or pan); o switches it off or on; Q and E rotate; plus and minus zoom; space pauses. Every event is also written to the ant log below the map.

t 0:00.00 ✓ 0 ✕ 0 ants 0 route switches 0 —
The Daily PheromoneReporters are in place. Build, break and watch.
Ant log

    How the colony routes

    AntHocNet is an ant-colony routing protocol for networks with no fixed infrastructure — phones, drones, cars, satellites. This repository implements it once, in a simulator-independent core, and runs that core in ns-3 and in this page.

    1. Ants search

      A node with data and no route sends reactive forward ants. Each one that reaches the destination turns into a backward ant.

    2. Ants lay pheromone

      The backward ant walks the path home and leaves pheromone on every hop: more on short, fast paths, less on slow ones.

    3. Packets follow the scent

      Each data packet picks its next hop at random, weighted by pheromone raised to β = 20 — so the best trail almost always wins.

    4. The colony keeps it fresh

      Hellos find neighbours, proactive ants re-sample routes in use, and link-failure notices and repair ants patch a route when a phone walks away.