PPolySim OS

Ant Colony Optimization

No ant sees the whole map, yet the colony finds a near-optimal route. Pheromone trails reinforce short paths and evaporate off long ones — swarm intelligence solving the Traveling Salesman Problem.

Ant Colony OptimizationLive

Controls

Presets

Simulated ants lay pheromone (cyan) on short routes; trails evaporate over time so good paths reinforce and bad ones fade. The colony collectively finds near-optimal tours of the Traveling Salesman Problem — the green loop is the best so far.

▶ Run in Python

Data Inspector

Iteration0
Best tour0
Cities15

Governing equation

Reading this result: With 15 cities and 20 ants, 10% evaporation balances exploring new edges against reinforcing the best tour found so far.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →
★ Sign in to save this setup
Save your tuned setup, or drop this simulation into your own site, docs, or course page.

How it works

Ant Colony Optimization sends many simple agents to build tours, biased toward strong pheromone and short edges. Each ant deposits pheromone inversely proportional to its tour length, and evaporation prevents premature convergence. Over many iterations the collective trail converges on an excellent solution to this classic NP-hard problem.

Ask the AI about this model

The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.

More Complex Systems simulations

Frequently asked questions

Is this ant colony optimization TSP tool really free?
Yes. Ant Colony Optimization runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.