Pong
What does the controller observe?
Pong presents 46 bearing receptors from −90 to +90 degrees in four-degree increments. A channel activates when the ball’s bearing lies within two degrees of its direction. These channels encode bearing relative to the paddle, not ball velocity or a labelled hit prediction.
The world is 1,000 units wide and 500 high. The paddle is centred at horizontal
position 100, starts at vertical position 250 and has half-height 50.
Two effectors move its centre by 100 * (left - right) units per tick,
clamped between 50 and 450. There is one neural frame per world tick.
The ball starts at horizontal position 995 with random vertical position and vertical direction. Horizontal speed starts at −5 and vertical speed has magnitude 5 units per tick. Wall reflections, paddle interception and misses advance the world; a miss resets the ball using the declared world stream.
from brainlesslab import CompositionSpec, NodeSpec, TaskSpec, profile, resolve
target = resolve(profile(CompositionSpec( node=NodeSpec("sorn"), task=TaskSpec("pong", options={"sensory_gain": 1.0}), count=32,))).targets[0]print(target.horizon, target.n_inputs, target.neural_frames)Expect 7200 46 1. sensory_gain is a nonnegative task option; composition
input_gain is a separate scale applied between encoding and the model.
Count scored events
hit_rate is scored hits divided by scored hits plus misses. It is zero if the
scored interval contains neither event. The default horizon is 7,200 ticks and
the minimum scored interval is 6,000. Warm-up advances physics without adding
events to the scored counters.
The random-action null samples a uniform signed paddle command each tick. A matching empirical calibration is required for adjustment. The upper bound is 1; it does not establish that a reference controller attains every hit.
Inspect completed ticks and event counts when interpreting a hit rate. Selected website recordings demonstrate trajectories, not estimated performance. Continue with evaluation and task comparisons.