Ant nest · Protocol · swarm-routing/AntHocNet
AntHocNet
Ant colony optimisation for mobile ad hoc networks: the colony the org grew out of.
Unlocked: Live: game, docs and API
Play the gameDocsAPI referenceHow it runs: C++ core → WebAssemblyRepository
What it does
AntHocNet (Di Caro, Ducatelle & Gambardella, 2005) routes like a foraging colony. When a data packet finds no route, the source sends reactive forward ants that search towards the destination; each one flips into a backward ant there and walks the path home, laying pheromone that scores each next hop. The backward ant is the only thing that deposits regular pheromone.
While a session runs, proactive ants keep sampling and improving the path, hello beacons keep the neighbour set fresh and diffuse a virtual pheromone, and when a link breaks the node sends repair ants or a LinkFail notification upstream. Data follows the pheromone stochastically, so load spreads over several good paths.
The algorithm is written once, as a simulator-agnostic core/ (C++14) that takes time, randomness, neighbours and timers through ports. The ns-3 module and the browser adapter only convert headers and carry out the core's RouteDecisions; the game here runs that same core/ compiled to WebAssembly, byte-identical to the native trace.
Diagrams
opt, loop, alt). Read from AntHocNet's core/ and its ant-types page.core/ includes no simulator header; time, randomness, neighbours and timers arrive through ports, and every adapter only carries out the core's decisions.core to GPL-only code.Package structure
The repository's layout, its licence per directory (LICENSING.md) and what exists today.
| Path | What | Licence | State |
|---|---|---|---|
core/ | the algorithm: router logic, pheromone engine and table, codec, ports + unit tests | MIT OR GPL-2.0-only | present |
ns3/anthocnet/ | the ns-3 module: model (header, adapter), helper, examples, test suite | GPL-2.0-only | present |
ns3/routing-bench/ | the comparison harness (moving to ns3-tools; switch-over open) | GPL-2.0-only | present |
ns3/baselines/ | vendored comparator arms (AOMDV, GPSR) and the adaptive arms | GPL-2.0-only | present |
web/ | the browser adapter and the game: moved to this site (site/anthocnet/) | GPL-2.0-only | moved |
tools/ | shipped scripts: bench statistics, CI checks, release | MIT OR GPL-2.0-only | present |
docs/ | architecture, ADRs, benchmarks (served at /AntHocNet/docs/) | GPL-2.0-only | present |
results/ | raw benchmark data: harness cells, campaign CSVs | GPL-2.0-only | present |
api/ | Doxygen config (served at /AntHocNet/api/) | GPL-2.0-only | present |
Where it sits in the colony
Quests
- Done: Game, docs and API served from the Colony Arena, built from the pinned commit (site#9, #10)
- Open: Cutover recorded; AntHocNet retires its own Pages and web/ (site#11, AntHocNet#850)
- Open: core/ PRs keep running native-vs-WASM parity against this site (site#7)
- Open: Shared primitives extracted into swarm-core (ns3-swarm-core#6)
Sources
- G. Di Caro, F. Ducatelle, L. M. Gambardella, AntHocNet: an adaptive nature-inspired algorithm for routing in mobile ad hoc networks, European Transactions on Telecommunications 16(5), 2005.
- AntHocNet docs: the ant types
- AntHocNet docs: architecture
Facts as of 2026-11-08, from the repository's AGENTS.md and the org ROADMAP.