Decides which actions to press each frame under the harness. Implemented by ScriptedStrategy, RandomFuzzStrategy, PolicyStrategy, or your own class.
beforeFrame runs before the game step — write to ctx.scripted to apply inputs for this frame. Strategies may be async (the runner awaits).
beforeFrame
ctx.scripted
Called every frame; mutate ctx.scripted to drive inputs.
Optional
Optional teardown at end of run.
Optional one-time setup at boot, e.g. seed randomization.
Decides which actions to press each frame under the harness. Implemented by ScriptedStrategy, RandomFuzzStrategy, PolicyStrategy, or your own class.
beforeFrameruns before the game step — write toctx.scriptedto apply inputs for this frame. Strategies may be async (the runner awaits).