ConstRead a patch field at cell offset (dx, dz) from the current cell — PATCH
(CA update) context only. (0, 0) reads this cell. See the 'patchCell'
Expr kind.
Sum of a patch field over the 8 Moore neighbors (PATCH/CA context).
Sum of a patch field over the 4 von Neumann neighbors (PATCH/CA context).
Count of the 8 Moore neighbors whose field value exceeds threshold
(PATCH/CA context). The basis for "count live/burning neighbors".
Neighbor reductions over agents within radius (needs config.spatialHash,
update context). See the 'neighbor' Expr kind.
Offset vec3 to the nearest neighbor within radius (zero when none).
Count of neighbors within radius and inside the forward cone of half-angle
coneHalfAngle radians (AgentScript in-cone).
Count of neighbors of breed (color.a) within radius — breed-filtered
in-radius (predator/prey: "is a predator nearby?").
Offset vec3 to the nearest neighbor of breed within radius (zero when
none) — chase/flee a specific breed.
Degree: number of live link-neighbors.
Minimum of attr over link-neighbors (+1e30 when none) — the
label-propagation / shortest-path building block.
Maximum of attr over link-neighbors (-1e30 when none).
Sum of attr over link-neighbors (0 when none).
Mean of attr over link-neighbors (0 when none) — voter / opinion models.
Read agent idx's attr by index (random access into the agent buffer;
update context). See the 'agentAttr' Expr kind.
Read agent idx's link slot slot (linked index as f32, or -1; needs
config.links, update context). See the 'linkSlot' Expr kind.
Read this agent's own scratch slot (needs config.scratch, update context).
Read agent agent's scratch slot — scratch[agent][slot] (needs
config.scratch, update context).
Constructor helpers for
Exprnodes. Equivalent to building the discriminated union by hand, but shorter and accepts plain numbers in any slot.