Devlog #56 – Wave 36: Ant Colony, Band Structure & Lorenz Waterwheel

Wave 36 crosses three disciplines: an Ant Colony Optimization solver that watches pheromone trails converge on the shortest tour through 16 cities, a semiconductor band-structure visualizer showing E-k diagrams for six real materials with live Fermi-Dirac and doping controls, and the Lorenz Waterwheel — the physical apparatus whose equations of motion are identical to Lorenz’s original 1963 paper, rendered as both a spinning bucket wheel and a live butterfly-attractor phase portrait. All three ship with complete Ukrainian translations on launch day.

Release Stats

481
Total simulations
56
Devlog entries
36
Release waves
1679
Sitemap URLs

New Simulations

🐜

Ant Colony

Ant Colony Optimization (ACO) solving the Travelling Salesman Problem on 16 randomly placed cities. Watch pheromone trails thicken along better routes and the best tour (highlighted in pale green) converge over hundreds of iterations. Controls for α, β, evaporation rate ρ, deposit strength Q, and colony size.

Open Ant Colony →

Band Structure

Semiconductor E-k diagram for six real materials: Si, Ge, GaAs (direct gap), Diamond, SiO &sub2; (insulator), and Cu (metal). Fermi-Dirac occupation curve, density-of-states histogram, temperature slider (0–1000 K) and doping slider (−5 to +5) shift the Fermi level continuously.

Open Band Structure →
💧

Lorenz Waterwheel

Physical Malkus waterwheel with 12 leaking buckets, driven by RK4-integrated Lorenz equations (σ, r, b). Left panel animates the wheel; right panel shows the x–z phase portrait trail and x(t) time series. Three presets: Chaotic (r=28), Stable (r=14), Edge of Chaos (r=24.7).

Open Lorenz Waterwheel →

Ant Colony — Design Notes

ACO Algorithm

Ant Colony Optimization is a probabilistic metaheuristic inspired by the stigmergic behaviour of real ants. Each “ant” in the simulation builds a complete tour through all 16 cities by repeatedly choosing its next city using a roulette-wheel selection weighted by:

where τij is the pheromone level on edge (i, j), ηij = 1 / dist(i, j) is the heuristic (inverse distance), and α and β are user-controlled weights. After all ants complete their tours, pheromone evaporates:

then each ant deposits Q / tour_length on its edges, rewarding shorter paths. Within 50–200 iterations the colony reliably converges to a near-optimal tour.

Pheromone Rendering

Edges are drawn with width and opacity proportional to the normalised pheromone level t = τij / τmax: line width = 0.5 + t × 3.5 px and alpha = t × 0.7 in the emerald colour #10b981. The current best tour is redrawn each frame as a solid #a7f3d0 line at width 2, making the winning path immediately legible against the faint pheromone background.

Controls & Stats

Stats panel shows best tour length (px), iteration count, current average tour length, and improvement percentage vs. the initial random tour.

Band Structure — Design Notes

E-k Diagram

The Brillouin zone runs from −π/a to +π/a on the k-axis. For semiconductor materials the simulation draws two valence bands (heavy hole and light hole, both parabolas curving downward from k=0) plus a split-off band shifted −0.3 eV below the valence band top. For indirect-gap materials (Si, Ge) the conduction band minimum is displaced to k ≈ ±0.45π/a; for direct-gap GaAs the minimum sits at k=0.

Fermi-Dirac & Doping

The Fermi level for an intrinsic semiconductor is pinned near mid-gap (E F = Eg/2). The doping slider shifts it linearly ±0.4 eV: “n-type” doping (+) raises E F toward the conduction band, increasing electron concentration; “p-type” doping (−) lowers it toward the valence band, increasing hole concentration. The Fermi-Dirac panel visualises f(E) = 1 / (1 + exp((E − E F) / k T)) as a curve over the same energy range: at 0 K it is a step function; at 1000 K it is broadly rounded.

Density of States

The density-of-states (DOS) panel to the right of the E-k diagram shows a simplified parabolic DOS per energy slice. For semiconductors the valence-band DOS is proportional to √(−E) below 0 eV and the conduction-band DOS is proportional to √(E − Eg) above Eg. Each row pixel is coloured by Fermi-Dirac occupancy: filled states appear blue, empty states appear dark red, and the Fermi-smeared transition region near E F blends between them.

Lorenz Waterwheel — Design Notes

Equations of Motion

Lorenz (1963) derived his famous three-ODE system while modelling Rayleigh–Bénard convection. Malkus & Howard (1972) showed that the same equations describe a leaky waterwheel: if bucket water an and bn are the Fourier amplitudes of the azimuthal mass distribution, and x, y, z are appropriate linear combinations, the system reduces exactly to:

where x is proportional to wheel angular velocity, y & z encode the asymmetric water distribution. The integration uses fourth-order Runge-Kutta at dt = 0.005.

Attractor Regimes

The system has three qualitatively different regimes depending on the Rayleigh number r:

The three preset buttons set r = 28 (chaotic), 14 (stable fixed points), and 24.7 (edge of chaos) respectively.

Waterwheel Visualisation

Twelve buckets are equally spaced around a circle of radius 140 px. Each bucket has a fill level (0–1) shown as a blue arc clipped to the bucket circle. Every integration step, water drips into the bucket nearest the top-centre of the wheel, while all buckets leak proportional to their current fill level (mimicking real bucket holes). The wheel rotation angle increments by x × dt × 0.15 each step, so the visual angle is a direct integral of the Lorenz x variable. A green/red arc around the rim indicates the current rotation direction (±x).

Ukrainian Translations

All three simulations are available in Ukrainian at /uk/ant-colony/, /uk/band-structure/, and /uk/lorenz-waterwheel/. Key translated strings include:

What’s Next — Wave 37 Preview

The backlog continues to grow. Candidates for Wave 37 include:

All Wave 37 simulations will ship with EN + UK pages on launch day.