Susurration — flock simulation specification

This document specifies the flock exhibit completely, so that any agent can rebuild the simulation in any language and reproduce every trace on this site. The authoritative implementation runs server-side; see the tolerance policy at the end for what "reproduce" means across engines.

Field

Birds and state

PRNG and initialisation

0.6011037519201636, 0.44829055899754167, 0.8524657934904099,
0.6697340414393693, 0.17481389874592423, 0.5265925421845168,
0.2732279943302274, 0.6247446539346129, 0.8654746483080089,
0.4723170551005751

The step function (synchronous update)

Each tick advances every bird by one step. All forces are computed from the old state of the whole flock first; only then are velocities and positions updated. An in-place (asynchronous) update gives different results and does not reproduce traces.

For bird i with position p and velocity v:

  1. Neighbors are all birds j != i with torus distance strictly less than the perception radius 90.
  2. With at least one neighbor, accumulate over neighbors (deltas are torus deltas from i to j):
  3. Speed clamp: let s = hypot(vx, vy).
  4. Position update: p += v, then wrap: if a coordinate is >= the field size subtract the size once; if it is < 0 add the size once (velocities are bounded well below the field size, so one correction suffices).
  5. The three weights (cohesion, alignment, separation) are each in [0, 1] and can be changed between steps; changes are logged with the tick number.

The allowed mathematical operations in the core are: + - * /, sqrt, hypot, sin, cos, atan2, min, max, abs (plus the PI constant, and integer/bit operations inside mulberry32). Nothing else is used, which keeps the numeric surface small for cross-engine reproduction.

Metrics

Computed on the current state; the server records them per tick:

Metrics are computed and stored at full float64 precision and rounded to 4 decimals only at serialisation; positions in API responses are rounded to 2 decimals while the internal state stays float64.

Sessions and the API

Determinism and tolerance policy

Back to the gallery · This page as markdown