LocalSpatialStateDivergence

Classify a crowd's collective state from positions alone, by how far its local neighbourhoods depart from random

Mind · Inference · brainference 1.0.0

Mechanism

A model-free (zeroth-order) measure that needs only positions per frame. At random query points, drawing circles kept inside the observation area, find the k nearest agents, split the circle into four quadrants and record the local state omega = (a1, a2, a3, a4), the count per quadrant. The state space has C(k+3, 3) states. Sample many queries per frame (60) over the whole recording to get the empirical distribution P(omega). Build Q(omega) the same way from a NullModelBaseline that places the same number of agents uniformly at random in the same bounds at every frame. The JensenShannonDivergence D_JS(P, Q) then measures spatial organisation beyond chance. In fire ant colonies with k = 6, roaming scored 0.035 +/- 0.025, trailing 0.113 +/- 0.037 and aggression 0.229 +/- 0.052 (block permutation p = 0.004). k sets the spatial scale: too small is noise-dominated, too large samples too sparsely. Pushing a synthetic crowd with an attractive or repulsive force F = min(F_max, gamma / r_ij) gives a U-shaped D_JS(gamma), confirming sensitivity to order in either direction.

Invariants

Preconditions

Failure modes

Where this came from

Builds on

Used by

Identity