Ant Colony Optimization meets Self-Organizing Maps — a sandbox for tackling the Traveling Salesman Problem. It explores ACO, SOM, hybrid approaches, and a whole menagerie of bio-inspired and geometric strategies. Pure algorithmic research with a combinatorial soul.
Concretely it's a JavaFX benchmarking lab — internally "BenchAll" — that runs every solver against the same problem (a fixed set of 100 cities, seed 42), logs each one's tour length over time, and lets you compare them side by side. Each strategy is a self-describing Runner with its own tunable parameters; the harness sweeps them, writes CSVs and logs to bench_out/, dumps per-run frames to viz_data/, and renders comparison charts (JFreeChart) with PDF export (OpenPDF). A standalone aco_visualizer.html replays the captured runs in a browser.
~14k lines of Java across a small framework — a RunnerSchema / RunnerRegistry layer that turns each experiment into a parameterized, benchmarkable module — and the experiments themselves. The bench app exposes every Runner with sliders for its parameters (pheromone alpha, heuristic beta, evaporation rho, elite weight, candidate-K, bees per hive, onlookers/scouts, SOM grid sizes, landscape dimensions, STDP learning rates, iteration counts…), so you can tune and race them.
- ACO — classic Ant Colony Optimization. Ants lay pheromone on good edges; evaporation and elitism shape the trail. The baseline everything else is measured against.
- SOM — a Self-Organizing Map as an elastic ring that's pulled toward the cities until it relaxes into a tour. Geometry, not pheromone.
- Hybrid ACO + SOM Field — the two ideas fused: a pheromone field and a SOM field tug on the solution together (also runnable in an ACO-only mode for comparison).
- Ants Hierarchical Subset (SOM field) — ants that work over hierarchical subsets of cities laid out on a SOM grid — divide, solve, recombine.
- Ants Landscape STDP — ants crossing a learned landscape (W×H), updating their preferences with spike-timing-dependent plasticity and action bins. A neuromorphic take on trail-laying.
- Honeybee (ABC) — Artificial Bee Colony: employed bees, onlookers, and scouts with a waggle-dance deposit/evaporation instead of pheromone.
- Species Ant (ACO + bins) — speciated ants binned by feature, so distinct sub-populations explore different regions of the search space.
- Knot Untwist (2-opt crossings) — a purely geometric solver: treat the tour as a tangled loop and remove its self-crossings (2-opt), untwisting the knot toward a clean cycle.
- Ring Hier SOM (Ring + Meta reorder) — a hierarchical ring SOM with a meta-level reordering pass on top of the base ring.
- Ring + Grid Hier SOM — combines a ring SOM with a grid SOM in a hierarchy, blending circular and lattice organization.
- Artistic Bee Hive (v1 / v2 / v3) — three successive re-conceptions of the honeybee-hive solver, each rethinking how the hive forms and refines a tour — the "research with a soul" branch.
A Maven project. Needs JDK 17+; Maven pulls JavaFX 21, JFreeChart, and OpenPDF. The JavaFX plugin runs the bench app directly:
For a self-contained native runtime, the build also defines a jlink image with a launcher named MidnightManuscript:
Open aco_visualizer.html in a browser to replay the runs already captured in viz_data/. Or import the folder into Eclipse and run BenchAllFxAppCSS.
Live ACO algorithm visualizer — watch the ants build their trails in real time.
open visualizer →the ants go marching one by one — and not one of them knows the route. the route is what's left in the dirt after enough of them have passed.
hurrah, hurrah. no ant is solving the problem. the colony is. the difference between those two sentences is the whole field.
the little one stops to tie its shoe; the bee dances; the map relaxes into a ring. they are all saying the same thing in different tongues: shorten the loop.
a tour is a knot that wants to be a circle. every method here is just a different patience for untwisting it.
they all march down, into the ground, to get out of the rain — and the shortest path home was never planned. it was remembered, one footstep at a time.