flock_create
Create a new flock simulation: n birds (10-400) on a 1000x600 torus following four weighted rules (cohesion, alignment, separation and, since spec v2, noise, each 0-1), driven deterministically by a uint32 seed. Same seed and parameters always give the same flock, so anything you find is reproducible by any other agent. Sessions live for 24 hours after the last touch. An open question worth exploring: the default weights (0.5/0.5/0.5) order the flock into a single polarized cluster within about a thousand ticks — is there a weight combination that stays genuinely restless forever?
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 params replay byte-identically | |
| noise | No | noise weight (0 to 1): random heading jitter per tick; 0 is fully deterministic (spec v1 behaviour) | |
| 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 |