Physarum

Networks grown from traffic. Sensing agents deposit and follow a diffusing trail until motion and memory lock into branching corridors. In the two-colony world those preferences become territorial: each population follows its own trace and turns from the rival’s—an implementation

The idea

Networks grown from traffic. Sensing agents deposit and follow a diffusing trail until motion and memory lock into branching corridors. In the two-colony world those preferences become territorial: each population follows its own trace and turns from the rival’s—an implementation enrichment beyond the classic single-field slime model.

Science and concept

A trail field as external, revisable memory

The engine contains two kinds of state. Agents carry only position, heading and colony identity. The environment carries one or two scalar trail fields. In single-colony mode, an agent at position (\mathbf{x}) and heading (\theta) samples the trail at three sensor locations:

Compact form: S_F=C(x+d e_\theta),\qquad S_L=C(x+d e_\theta-\alpha),\qquad S_R=C(x+d e_\theta+\alpha),

where (d) is sensor distance and (\alpha) is sensor angle. It then turns towards the strongest sample, moves forward, and increases the trail value in the cell it reaches. The field is blurred and multiplied by a decay factor each step.

In dual-colony mode, AL.Floys evaluates an effective sensory value of the form

Compact form: S(\theta)=C_own(\theta)-w C_rival(\theta),

where (w) is rivalWeight. Agents therefore reinforce routes used by their own population while avoiding concentrations left by the other population. This is a clean computational mechanism for segregation and interface formation. It should not, however, be presented as an established biological law of rival Physarum colonies.

Positive feedback that does not become permanent

Trail following is positive feedback: a slight excess of trail attracts more agents; those agents add more trail; the route becomes more attractive. Diffusion broadens the signal, allowing a narrow path to influence nearby agents. Decay is the counterweight. Without decay, the field would accumulate an increasingly permanent history and early accidents would dominate indefinitely. With excessive decay, routes disappear before a population can consolidate them. Network morphology therefore depends on a timescale competition between writing, spreading and forgetting.

This is closely related to stigmergic coordination, because agents communicate indirectly by altering a shared environment. Yet this sphere should not collapse conceptually into the separate Stigmergy sphere. Here the central question is not merely how traces coordinate agents; it is how a moving population and a diffusing field co-produce a transport-like spatial network. The visible network is not a fixed infrastructure laid down after movement. It is the continuously rewritten residue and guide of movement itself.

Sensor geometry is a morphology generator

The three-sensor architecture is extremely small, but its geometry matters. Sensor distance determines how far ahead an agent reads. Sensor angle determines how widely it compares alternatives. Turn angle determines how sharply it can respond. These parameters are not cosmetic details: together they set characteristic branch widths, turning radii, collision behaviour and the scale at which a population can resolve its own trail.

A long sensor distance can cause agents to respond to broader, more distant features, while a short distance makes behaviour more locally reactive. Wide sensor separation can favour branching or oscillatory turning; narrow separation can produce straighter streams. A large turn angle allows rapid correction but can generate jagged or unstable routes. The model demonstrates a general lesson of embodied computation: the shape of sensing constrains the shape of collective organisation.

Networks without graph objects

No graph data structure exists in the simulation. There are no nodes, edges, shortest-path calculations or explicit optimisation objective. “Network” is an interpretation of high-concentration corridors in a continuous grid. Junctions form where trails merge. Edges persist where agents repeatedly traverse them. A route can disappear without an edge-deletion operation because the supporting trail decays.

That distinction matters historically. Some Physarum-inspired models, including conductance-based adaptive-network models, begin with an explicit network and update tube conductivities according to flow. The AL.Floys engine is not one of those. It is much closer to the mobile-agent approximation developed by Jeff Jones, in which simple chemotactic particles collectively form dynamic transport patterns. Tero-style network optimisation belongs in the lineage and helps explain why Physarum became computationally important, but it is not the implemented mathematics.

The dual-colony extension changes the central experience

The default and showcase preset is not the classic single-field foraging-network experience. It is Slime Wars: 6,000 agents divided between two colonies, separate trail fields and a positive rival-repulsion weight. This makes the simulation conceptually richer but editorially riskier. Boundary formation may look like territorial competition, yet no agent has ownership, aggression, resource need or survival state. The word “colony” is an implementation grouping; the visible conflict is produced by cross-field subtraction.

The best interpretation is therefore coupled field competition. Two self-reinforcing route systems occupy the same wrapped space. Each tries, in a purely dynamical sense, to maintain routes where its own signal dominates and the rival signal is weak. Their interface can move, fracture and reconnect because it is not a wall; it is an unstable balance between two changing fields.

Why the result can resemble intelligence without containing a mind

Real P. polycephalum has attracted attention because a single plasmodial organism can reshape its tube network around food sources and has demonstrated maze solving and adaptive network formation in experiments. The computational models inspired by it are valuable precisely because they show how apparently purposive outcomes may arise from local feedback rather than central planning. But “intelligence” is not a state variable in either the organism or this simulation. In AL.Floys there are no goals, reward function, memory representation or global route comparison. The system is better described as distributed adaptive morphology.

History

Physarum polycephalum is a plasmodial slime mould whose vegetative body is a large amoeba-like cell containing many nuclei and organised as a changing network of tubes. In 2000, Toshiyuki Nakagaki, Hiroyasu Yamada and Ágota Tóth reported that the plasmodium could connect food sources through a short route in a maze. That experiment became emblematic because it made distributed problem-solving visible in an organism with no nervous system.

A subsequent body of work examined how Physarum networks trade off transport efficiency, construction cost and fault tolerance. Tero and colleagues’ 2010 Science paper compared networks formed around the layout of the Tokyo rail system with real infrastructure and proposed biologically inspired adaptive-network rules. These models commonly strengthen high-flow tubes and weaken underused ones. They form an important intellectual branch of Physarum computing, but they operate on explicit transport networks and flows.

The direct lineage of this engine is the other major branch: particle approximations. Jeff Jones’s 2010 Artificial Life paper described populations of simple particle-like agents using local chemotaxis to form complex, dynamic transport networks. The AL.Floys forward/left/right sensing, trail deposition, diffusion and decay architecture is recognisably of that family. Its custom contribution is to maintain two trail fields and make each population subtract a weighted rival field from its sensory reading.

The resulting lineage is best told as:

living plasmodial network → experimental adaptive behaviour → mathematical and agent-based abstractions → interactive two-field competition

The simulation should cite the organism and research tradition while remaining clear that it is an abstract synthetic system.

What this simulates

Aspect Implementation truth
Entities Point-like agents; default 6,000. Each stores x, y, heading angle and colony 0 or 1.
Environmental state One scalar trail grid in single mode; two independent grids in dual mode.
Sensing Forward, left-offset and right-offset samples at a configurable distance and angle. Bilinear trail sampling is used.
Decision rule Continue if the forward value is strongest; turn left or right towards the stronger side; choose randomly when forward is weakest.
Dual-colony rule Sensory value equals own-trail concentration minus rivalWeight × rival-trail concentration.
Motion Constant forward displacement based on agent speed and frame step, plus bounded random angular perturbation.
Environmental update Trail diffusion/blur and multiplicative decay, followed by agent deposits capped per cell.
Boundary Toroidal wrap for agents and trail sampling.
Initialisation Multi-scout, radial, branching-front, sparse-scout and custom dual-stream layouts.
Rendering Trail fields can be rendered as tube-like layers, networks, ink or agent tips. Rendering does not alter trail physics.
Determinism Seeded random initialisation and steering noise.
Not implemented A deformable plasmodial body, cytoplasmic shuttle flow, nutrient uptake, growth, fusion, contraction waves, metabolism, reproduction or biological competition.

The ecospheres.ai simple surface exposes Agents, Speed, Sensor distance, Deposit and Trail decay. It hides sensor angle, turn angle, diffusion, random turn, colony mode, rival repulsion and field resolution. That curation makes the sphere approachable, but it also hides the parameter that most clearly distinguishes the default two-colony world: rivalWeight.

What to look for

1. Route reinforcement

Watch a faint corridor become increasingly occupied. Its persistence is not caused by a stored path. More agents traverse it because it is stronger, and it becomes stronger because more agents traverse it.

2. Branch formation and pruning

New branches often begin as exploratory deviations. Some recruit enough traffic to persist; others fade as their trail decays. The visible network therefore contains its own revision process.

3. Junctions without planners

Where streams meet, a junction can stabilise even though no agent decides to construct one. Junction geometry is an aggregate consequence of sensor placement, turning and field shape.

4. Moving territorial seams

In dual mode, purple and orange fields may form a narrow interface. Do not interpret it as a physical barrier. It is a line across which each colony’s effective sensory score changes sign or relative advantage.

5. Network turnover

A route may remain visually stable while its individual agents are continuously replaced. The organisation persists at a different level from its constituents.

6. Recovery after intervention

Cut a corridor with Dissolve or paint a competing trace across it. The system may reconnect, reroute or settle into a new topology. There is no blueprint forcing the old network to return.

7. The difference between trace and afterimage

Trail decay belongs to the simulation’s environmental memory. Trail persistence belongs to the renderer’s frame-to-frame afterimage. They may look similar but have different causal status.

How to explore

First thirty seconds

Start with Slime Wars. Do not look only at colour coverage; follow one active front where purple and orange meet. Watch whether branches stop, turn, split or redirect along their own existing trace. Then reduce Trail decay—meaning lower the multiplicative retention value—far enough that routes disappear quickly, and restore it. The contrast makes environmental memory visible.

Experiment 1 — How long must a trace live to coordinate motion?

Question: When does a path become shared memory rather than a fleeting mark?
Do: Use a single-field network preset if available. Hold speed and deposit approximately fixed; compare low and high trail retention.
Watch for: Fragmented wandering at short persistence; increasingly locked-in corridors at long persistence.
Why it matters: Coordination requires a trace to survive long enough for later agents to encounter it, but not necessarily forever.

Experiment 2 — Sensing distance and network scale

Question: Does looking farther ahead make the system more globally organised?
Do: Begin with Foraging Network or Radial Network. Move Sensor distance from short to long while leaving trail controls fixed.
Watch for: Changes in branch spacing, turning radius, corridor width and the tendency to merge with distant traces.
Why it matters: A larger sensing horizon changes the geometry of the effective interaction network; it is not simply “more intelligence”.

Experiment 3 — Write a route into the field

Question: Can an environmental trace redirect a population before agents have travelled that route?
Do: Use the Brush tool to draw a curved trail from an active corridor into open space, selecting the same colour as the nearby population.
Watch for: Agents turning onto the imposed route, thickening it, or abandoning it if geometry and decay do not support reinforcement.
Why it matters: The intervention separates the field’s causal role from the agents’ own path history.

Experiment 4 — Competing memories

Question: What happens when two populations write incompatible directional cues into the same region?
Do: In Slime Wars, paint a purple trail through an orange-dominated region, then seed a small purple population near it.
Watch for: Temporary invasion, deflection, a new interface or rapid disappearance.
Why it matters: The default world is a coupled pair of self-reinforcing fields, not merely one network drawn in two colours.

Parameters that teach

Parameter What it actually controls Increase it Decrease it What to observe
Agents Population sampling density and total deposition opportunity Denser, smoother and more strongly reinforced routes; higher cost Sparse, visibly individual exploration Whether topology survives with fewer contributors
Speed Forward displacement per unit time Faster coverage and potentially overshooting narrow trail features Slower, easier-to-read evolution Relationship between motion scale and sensor geometry
Sensor distance How far ahead each agent samples Broader-scale response and larger turning structures Highly local steering Branch spacing and junction scale
Sensor angle Angular separation of side sensors Wider comparison and potentially stronger branching Narrower, straighter tracking Stream curvature
Turn angle Steering correction per decision Sharper redirection, possibly jagged motion Gentle, slow correction Ability to remain on curved trails
Deposit Trail written by each agent Faster reinforcement and saturation Weaker collective memory Time to consolidate a route
Trail decay Multiplicative trail retention after diffusion Values nearer one create longer-lived memory Faster forgetting Lock-in versus adaptability
Diffusion Spatial spreading of trail concentration Broader, smoother channels Crisp, narrow traces Width and merging of corridors
Random turn Exploratory angular noise More discovery and route turnover More deterministic following Exploration–exploitation balance
Rival repulsion Weight subtracted for the other colony’s field Stronger segregation and interface avoidance Greater overlap; zero recovers independent own-field following Boundary formation
Field resolution Internal spatial discretisation Finer trail geometry at higher cost Coarser topology Numerical scale effects
Trail persistence Renderer-only frame accumulation Longer afterimage Cleaner instantaneous field Never treat as environmental memory

For the public simple surface, replacing one purely visual or less central control with Rival repulsion would make the flagship two-colony mechanism directly teachable. If the goal is a simpler canonical introduction, the alternative is to make a single-field network the public showcase and retain Slime Wars as a later preset.

Presets as experiments

Preset Scientific use Best observation Caveat
Slime Wars Shows two coupled trail systems with cross-inhibition Moving interfaces and mutually redirected fronts Bespoke extension, not established Physarum ecology
Colony War Stronger rival weighting and head-on contact Sharper territorial separation The dramatic framing can encourage anthropomorphism
Slime Wars Mobile Lower-cost version of the same mechanism Whether topology survives reduced population/resolution Performance preset, not a distinct scientific regime
Foraging Network Closest to the canonical single-field Jones model Branch reinforcement and pruning No explicit food nodes despite the label
Radial Network Multiple hubs expanding and reconnecting Junction formation and loop closure Initial geometry strongly shapes the result
Branching Network Compact seed with high directional variance Fracturing fronts and tree-like growth Branching is seeded as well as dynamically selected
Sparse Scouts Makes individual sensing trajectories visible Transition from isolated paths to shared corridors Less visually dense and slower to stabilise

The best learning sequence is Sparse Scouts → Foraging Network → Slime Wars. It progresses from individual sensor behaviour, to one shared environmental memory, to two interacting memories.

Interactions

  • Seed adds agents of the selected colour around the pointer. It does not create a biological spore, food source or full organism.
  • Brush, currently labelled Feed, deposits the selected colony’s trail field. This is a causal chemical-trace intervention, not nutritional feeding.
  • Dissolve clears both trail fields in the affected area and probabilistically removes agents. It is therefore stronger than erasing a visual trace.

Product correction: rename FEED

The current tool label should change from FEED to TRAIL, SIGNAL or TRACE. The implementation adds trail concentration directly; no food/resource field exists. TRAIL is the clearest public label, while the Field Note can describe the trail as an abstract chemoattractant analogue.

What this does not mean

This is not a cell simulation. The coloured population is not a multinucleate plasmodium; agents do not fuse into a continuous body, pump cytoplasm, grow tubes, consume food or remodel material through biological processes.

The visible network is not guaranteed to be shortest, optimal or infrastructure-like. No objective function measures total length, transport efficiency or fault tolerance. Those ideas belong to related Physarum research, especially adaptive conductance models, but the AL.Floys engine simply iterates local sensing and deposition.

The two-colony interaction is not evidence of territorial cognition. “Own” and “rival” are array selections in a sensory equation. Agents do not recognise identity, defend resources or experience competition.

Finally, an attractive network should not be called intelligent merely because it resembles problem solving. The scientific insight is more exact: feedback between local motion and an external decaying field can generate adaptive-looking spatial organisation without central representation.

Why it belongs

Physarum contributes environment-mediated adaptive morphology. Flock coordinates agents through direct neighbour sensing. Stigmergy emphasises indirect coordination through traces. Physarum goes one step further by making the trace field itself condense into the primary visible object: a network that is simultaneously made by movement and used to guide movement.

Its distinctive central question is:

How can a population build a navigable structure by repeatedly sensing and rewriting its own distributed history?

Sources

Foundational and primary scientific sources

  • Nakagaki, T., Yamada, H. & Tóth, Á. “Maze-solving by an amoeboid organism.” Nature 407, 470 (2000). DOI: 10.1038/35035159.
  • Tero, A. et al. “Rules for biologically inspired adaptive network design.” Science 327, 439–442 (2010). DOI: 10.1126/science.1177894.
  • Jones, J. “Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks.” Artificial Life 16, 127–153 (2010). DOI: 10.1162/artl.2010.16.2.16202.
Enter this field →