Presets
Playback
Agents
Number of agents and how each one senses and turns.
Trail
How much trail an agent deposits, how fast it evaporates and spreads, and the food and light strengths.
Run
Click mode, simulation speed. Choose a preset above.
Camera
Layers
Quality
Model checks
The science
What a slime mould is
Physarum polycephalum is a single, giant cell with many nuclei, not a fungus and not an animal. It spreads as a yellow plasmodium whose tubes carry cytoplasm back and forth by rhythmic contraction. Placed on an agar plate with oat flakes it explores in all directions, then keeps the tubes that carry most flow and lets the others wither, leaving a network that links the food sources efficiently (Nakagaki, Yamada and Toth, Nature 2000: it finds the shortest path through a maze; Tero et al., Science 2010: its network around Tokyo-area cities has cost and fault tolerance comparable to the real rail network). No brain is involved.
The agent model on this page
The model is the well-known agent model of Jones (2010). Thousands of agents live on a grid of 128 x 128 cells inside a square dish with reflecting walls. Each step an agent reads the trail concentration at three sensor points, a distance SO ahead, at the heading and at plus or minus the sensor angle SA. The rule is: if the centre reading is the largest, keep going; if it is smaller than both sides, turn by RA to a random side; otherwise turn by RA toward the larger side. Then it moves one step of length SS and deposits dep units of trail at its new cell. The trail field then diffuses (a mix of weight w of a 3x3 mean with the original) and decays by the factor d: T(n+1) = d [(1 - w) T + w mean3x3(T)]. Oat flakes hold the field at a fixed attractant strength inside a small disc, so agents are pulled toward them. The yellow surface in the 3D view is this field, drawn with height and opacity proportional to the trail.
Why networks appear
Agents follow the trail left by others, and following reinforces it: a positive feedback that makes an agent crowd along a few lines (veins). Evaporation and a limited deposit stop it from growing without bound, and the sensor geometry sets how the veins bend and where they branch. A narrow sensor angle gives thin, straighter veins; a wide one gives fat, short-sighted structures. A long sensor distance makes loops larger. Light is repellent for the real organism, which avoids bright places; here a light disc subtracts the repellent strength from what agents sense inside it, and they route around it.
Numerical checks on this page
(1) With no agents, depositing q per step into the diffusing, decaying field gives a mass M(n) = q d (1 - d^n)/(1 - d), compared with the simulated total after 300 steps. (2) A point impulse spreads with variance 2 w n / 3 per axis (the 3x3 mean has variance 2/3), compared with the second moment of the simulated field, and its mass with d^n. (3) In a linear attractant ramp the steering rule has the absorbing set |heading| <= max(SA/2, RA): every agent must end inside it and drift up the gradient at least at SS cos(bound) per step, compared with 2,000 simulated agents that started with random headings. The checks run the same functions as the live simulation, with your current slider values.
Honest simplifications
This is a pheromone-trail agent model, not the biophysics of the organism. The real plasmodium is a continuous tube network driven by cytoplasmic flow, and its adaptation is described by the Tero equations (tube conductivity grows with flux), which do not use discrete agents or a diffusing trail. Food is not eaten and the plasmodium does not grow or shrink in mass, the dish is a flat grid with no thickness, time is in arbitrary steps, and the 12 cm width and the oat flakes are only for scale. The shortest-path and detour readouts measure the ratio of the path along cells above a fixed threshold (diagonal steps cost 1.41) to the straight line, so very thick veins make it slightly smaller than a thin tube would. The result of one run depends on the random seed; the network is not guaranteed to be the minimal one, only a good, fault-tolerant one.
What to try
- Load Classic network: 6 oat flakes and watch the first minute: agents spread, then veins form and the readout Flakes in one network climbs to 6 of 6.
- Load Two oat flakes: shortest path. The detour ratio is the length of the vein path between the flakes divided by the straight line; it settles near 1.05 to 1.5 and changes as veins rewire.
- Try Narrow sensors and Wide sensors and compare the vein width and the number of loops.
- Switch Click: shine light and click on the dish: agents avoid the bright disc. Set Light repellent strength to 0 and they ignore it.
- Click on a flake in Click: remove mode and watch the network rewire around the missing node.
- Raise Persistence toward 0.98: trails last longer and the network becomes dense; lower it to 0.8 and trails are transient.