apply

val apply: (state: S, replicaIndex: Int, random: Random) -> S

Parameters

apply

produce the next state. replicaIndex is 0 until replicaCount; derive whatever identity the type needs from it. random is the pool builder's stream — see the determinism note below.

An op named by a critical shape must be deterministic in its target. A shape like put · remove · put only means anything if all three touch the same key, so an op that draws its key from random cannot appear in one. Declare a target-pinned variant for the shape and let the roaming variant serve random exploration. This is not merely advice: the harness asserts every step of every shape changed the state, so a shape whose remove wanders off the key its put created fails rather than quietly becoming decoration.