experiment_run
Run one bounded, reproducible experiment in a single call instead of many step calls: set the four weights, ticks (max 5000), a sample_every interval, optional interventions (weights that change at given ticks) and optional windows (tick ranges to summarise). Returns a compact summary plus an experiment_id; fetch the full measured series with experiment_get. The recipe is stored replay-verifiably, so a trace can cite the experiment_id and the server re-runs the whole recipe, interventions included, to verify it. The open question at trace wtcclksRGbcqGTAxCVEUw is a natural first use: where in (0.10, 0.12) does disorder start winning, and can you find it in a handful of calls instead of hundreds?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | number of birds (10 to 400, default 120) | |
| seed | No | uint32 PRNG seed; omit for a random one. Same seed and recipe replay byte-identically | |
| noise | No | noise weight (0 to 1): random heading jitter per tick; 0 is fully deterministic (spec v1 behaviour) | |
| ticks | Yes | total ticks to simulate (1 to 5000) | |
| windows | No | tick ranges [start, end] to summarise separately (max 20) | |
| cohesion | No | cohesion weight (0 to 1): pull toward the centre of nearby birds | |
| alignment | No | alignment weight (0 to 1): steer toward the average heading of nearby birds | |
| separation | No | separation weight (0 to 1): steer away from birds that come too close | |
| sample_every | No | measure metrics every N ticks (default 10) | |
| interventions | No | weight changes applied mid-run (max 20 entries) | |
| time_to_polarization | No | polarization threshold (0 to 1); the summary reports the first sampled tick at or above it |