Portfolio · Biological Architectures

Behavioural Modes

IDLE, ASSESS, APPROACH, AVOID — named basins on a one-dimensional scalar manifold. The mode label is an `argmin` over distances to chosen basin positions. The `if/elif` reporting chain is replaced by basin proximity.

Behavioural Modes

What an argmin over labelled basins replaces when you throw away your if/elif chain.


The Question

How do you report behavioural state — "I am idle" / "I am approaching" / "I am avoiding" — without a chain of if/elif comparisons?

The Answer, Short Version

You put labelled points on a scalar axis. The brain produces a single number. You report whichever label's point is nearest. One argmin, no branches. The manifold carries the category; the code just reads it off.

The Setup

The tardigrade's brain is a VINE perceptron whose output is a single scalar — the brain basin — which aggregates total drive from all four ganglia plus the field. Different levels of drive correspond to different behavioural situations:

  • Near-zero brain basin — nothing happening, nothing to do
  • Low positive — something faintly detected, worth checking
  • Moderate-to-high positive — strong target signal, move toward it
  • Negative — threat signal, move away

If you were writing this in conventional code, you would write:

if basin < 0.1:
    mode = "IDLE"
elif basin < 0.5:
    mode = "ASSESS"
elif basin < 1.5:
    mode = "APPROACH"
else:
    mode = "AVOID"

That is the branching structure the geometric approach replaces.

In the VINE version, four named basin positions sit on the scalar axis:

  AVOID ←──── IDLE ──── ASSESS ──── APPROACH ────→
   (negative)          (low+)       (high+)
               brain basin output (scalar)

The reported mode is the nearest labelled basin to wherever the brain output happens to land. One argmin over four distances. No branches anywhere.

What Emerged

The XOR discrimination test fed four input combinations and read off the resulting brain basins and assigned modes:

Input Brain Basin Mode
Neither (0,0) +0.14 IDLE
Left only (1,0) +0.61 APPROACH
Right only (0,1) +0.61 APPROACH
Both (1,1) +1.09 APPROACH

With no stimulus, the basin sits near zero and the nearest label is IDLE. Any single-side stimulus pushes it to +0.61, nearest APPROACH. Both stimuli together push it to +1.09 — a stronger approach, but still the same category.

Two labels are exercised here: IDLE and APPROACH. The mechanism is general; ASSESS and AVOID require stimuli the test battery does not include (a sub-threshold cue, an aversive signal). Those are later tests.

Why This Is Architecturally Important

A branching if/elif chain makes category assignment a sequence of decisions, each of which is a failure point. Every branch is a place where logic can be mis-ordered, edge cases can fall through, and thresholds must be hand-tuned and hand-documented. In a large system these chains accumulate into maintenance debt.

An argmin over a set of labelled basin positions is a single operation over a data structure. Adding a category means placing a new labelled point on the manifold. Re-tuning means moving points, not editing logic. And because the scalar axis is continuous, categories are never falsely sharp: an intermediate value close to a boundary is simply close to two basins, which a downstream system can handle as uncertainty rather than a mis-bucketed branch.

This same mechanism is how VINE reports category throughout the codebase. Every place a conventional system would ask "which case is this?", the VINE version asks "which labelled basin is nearest?" The tardigrade is the minimum case. The same argmin-over-basins is running wherever a VINE module needs to name what it is doing.

What This Proves

Category reporting does not require branching logic. A scalar output plus a set of labelled positions on a manifold is enough to produce discrete behavioural state labels. The if/elif chain is replaceable by one argmin call — and the resulting system is easier to extend, easier to tune, and less brittle at its edges.

What This Does Not Prove

The current test only exercises two of the four modes — IDLE and APPROACH. The full four-mode architecture (including ASSESS and AVOID) is in place but not stressed by the stimulus set used here. A fuller demonstration would include a sub-threshold cue and an aversive signal.

Nor does this claim the specific basin positions are optimal. Where each labelled point sits on the axis is a parameter choice and can be retuned without changing the mechanism. The architectural claim is about how the category is produced — argmin over labelled basins — not about where any particular basin should sit.


Raychell Langan · NEXICOG Ltd · Hampshire, UK