PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Math Visualization

Other simulators in this category — or see all 78.

View category →
NewSchool

Savitzky–Golay Smoothing

Noisy cosine vs SG(7,2) convolution — preserves peaks better than a wide boxcar.

Launch Simulator
NewSchool

Markov Chain (Weather)

Sun/Rain two-state chain: P matrix, stationary π, empirical vs theory.

Launch Simulator
NewSchool

Gradient Descent (2D)

Level sets of f(x,y) and path (x,y) ← (x,y) − η∇f; bowl or elliptic well.

Launch Simulator
NewUniversity / research

Minkowski Diagram

Light cone and boosted axes in 1+1D; γ from v.

Launch Simulator
NewSchool

Twin Paradox

Out-and-back worldlines; proper time τ = T/γ vs Earth time T.

Launch Simulator
NewKids

Monte Carlo π

Uniform samples in a square; 4·(in disk)/N estimates π.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Math Visualization/Physarum Slime (Agents)

Physarum Slime (Agents)

Thousands of agents wander on a grid while reading a chemoattractant trail field. Each agent has three sensors — left, centre, and right of its heading — and turns toward whichever sensor reads the strongest concentration. Wherever an agent walks it deposits trail; the trail field then diffuses to its neighbours and decays exponentially every step. This minimal sense → steer → deposit → diffuse → decay loop, popularised by Jeff Jones to model Physarum polycephalum, self-organises into branching transport networks reminiscent of slime-mold foraging behaviour.

Who it's for: Intro complex systems, swarm intelligence, and computational biology; great for showing how local rules generate global structure.

Key terms

  • Physarum polycephalum
  • agent-based model
  • chemotaxis
  • reaction–diffusion
  • self-organisation
  • transport networks

Agent motion

1.4 px
0.45 rad

Sensors

0.55 rad
9 cells

Chemoattractant field

0.05
0.18

Inspired by the Physarum polycephalum model of Jeff Jones (2010). Each of ~4500 agents senses a deposited chemoattractant in three directions (front, front-left, front-right), turns toward the strongest, then steps forward and deposits a fixed amount. The field is also blurred (diffusion) and shrunk (decay) every step. Out of pure local rules, network-like paths self-organise.

Measured values

Agents4500
Field220×130

How it works

Thousands of agents wander, deposit a trail, and steer toward local chemoattractant. With three forward-leaning sensors and turning rules, ant-like and fungal path networks emerge spontaneously.

Key equations

pos ← pos + v · (cos θ, sin θ)
C(x, y) ← (1 − ρ) · ∇²-blur(C + dep) (decay + diffuse)

Frequently asked questions

What controls whether the network is dense or sparse?
The deposit rate, the trail decay, and the sensor angle/distance compete. Strong deposit + slow decay reinforce existing paths and tighten them into thick veins; faster decay or wider sensor angles encourage agents to keep exploring, producing a thinner, more diffuse network.
Is this an actual biological model?
It is inspired by Physarum but is intentionally a minimal toy: real slime moulds use multiple chemicals, intracellular flow, and rhythmic contractions. The simulator captures the essential positive-feedback mechanism that explains why simple foragers can find efficient paths.
Why does the diffusion step matter?
Without diffusion the trail would be a pixel-thin track that no other agent could see. Diffusion smears it sideways into a gradient that nearby agents can follow, which is what lets stigmergic networks form at all.