CartPole
What is the interface?
CartPole asks a controller to keep a pole upright by moving its cart left or right.
BrainlessLab implements the Plank CartPole Easy interface, with the Spike-FF-2
flip-flop encoder and cumulative action voting. The task key remains
cartpole_plank_easy.
The source study is Plank et al. (2025), The Cart-Pole Application as a Benchmark for Neuromorphic Computing. Its TENNLab interface guide is pinned to the source revision used for the task design. These references describe the interface; they do not establish reproduction of the study’s trained agents.
The Gymnasium guide describes the classic control problem.
This variant uses eight pulse inputs, 24 neural frames per action, a 15,000-step cap and the initial ranges below. Standard Gymnasium CartPole-v1 uses four continuous observations, a 500-step cap and different initial ranges. Scores from the two protocols are not directly comparable.
The physical state is cart position x, velocity x_dot, pole angle theta
and angular velocity theta_dot. Position uses metres, angle radians and time
seconds. Each state variable supplies positive and negative receptor channels,
giving eight inputs.
Within each world tick, the encoder schedules signed pulses at neural frames 1, 4, 7, …, 22. Pulse count is the ceiling of eight times the absolute state divided by its scale, clamped to eight. The scales are 2.4, 2, 0.2095 and 2. A zero value emits no pulses.
The two effectors vote over all 24 neural frames. A tied vote selects left. The winning command applies force −10 or +10, followed by one explicit Euler physics step of 0.02 seconds. The reference parameters are gravity 9.8, cart mass 1, pole mass 0.1 and pole-length parameter 0.5.
from brainlesslab import CompositionSpec, NodeSpec, TaskSpec, profile, resolve
target = resolve(profile(CompositionSpec( node=NodeSpec("falandays"), task=TaskSpec("cartpole_plank_easy"), count=32,))).targets[0]print(target.horizon, target.n_inputs, target.neural_frames)Expect 15000 8 24. This is a configuration check, not 15,000 neural steps:
a full surviving trial executes 360,000 neural frames.
Interpret survival
A trial ends when abs(x) > 2.4, abs(theta) > 0.2095 or 15,000 world ticks
have completed. fitness is survival in world steps, with upper bound 15,000.
Early physical termination is an ordinary completed outcome; numerical failure
is a failed trial.
Initial state ranges default to ±1.2 for position, ±0.05 for velocity,
±0.10475 for angle and ±0.05 for angular velocity. initial_ranges can declare
four finite ordered pairs. Warm-up is zero.
The null makes one fair binary action choice per world tick and holds that choice through all 24 frames. Calibration needs 1,024 independent full-protocol trajectories. A short diagnostic run changes the observation window and does not qualify the ordinary task.
Continue with calibration and execution performance before budgeting a large run.