← all tasks

cart-link-swingup

Cart-link swing-up · solved 10 of 10 agent attempts pass

The task. Hard tier in June: eleven from-scratch harness runs (120 proposals) failed before the first passing controller.

more

The May reference leaves the track; the June controller is the oracle.

Gate. |wrapped theta| <= 0.18, |theta_dot| <= 0.7, |x| <= 0.35, |x_dot| <= 0.7 for 25 consecutive steps within 700 steps; success rate >= 0.9 on 40 verifier-only seeds

Axes: dynamics:cart-pole-swingup, constraint:track-limit, actuation:force-limited, n_agents:1

Each video re-runs the attempt's final controller through the task's own evaluator on a public seed (never the grader's held-out ones). The table under each video is the official grade on the held-out seeds.

Best attemptGemini (cursor-cli (pre-clock), 16 min) · base

Graded on the held-out seeds: passes every gate on the grader's held-out seeds.

criteriongradedneeded
base:success1.000≥ 0.900

How the agent got there: 16 min · 54 tool calls · 1 edit-tool edits · 18 runs of its own Python (tests, experiments, rewrites) · no tuner runs · official verifier 5× (success rates in order: 0.00, 1.00, 1.00, 1.00, 1.00).

The agent's final message

The controller for the cart-link swing-up problem on a bounded track has been implemented and verified in `/app/work/controller.py`. ### Control Strategy The controller combines two complementary nonlinear and optimal control techniques: 1. **Energy-Shaping Swing-Up with Exact Partial Feedback Linearization:** - Computes total mechanical energy of the pole relative to the upright reference $E_0 = 0$: \[ E(\theta, \dot{\theta}) = \frac{1}{2} J \dot{\theta}^2 + m g l (\cos\theta - 1) \] - Calculates energy error $\Delta E = E - E_0$ and applies pumping acceleration proportional to $\Delta E \cdot \text{sign}(\dot{\theta} \cos\theta)$ with initial symmetry breaking. - Adds PD cart centering ($-K_{px} x - K_{dx} \dot{x}$) to keep cart motion bounded within the track ($|x| \le 1.4 \ll 2.4$). - Computes the horizontal actuator force $F$ matching desired acceleration $a_{\text{des}}$ via exact partial feedback linearization. 2. **Discrete-Time Linear Quadratic Regulator (DLQR) Catch & Stabilization:** - Switches to DLQR when the link enters the basin of attraction ($|\theta| < 0.45\text{ rad}$, $|\dot{\theta}| < 2.5\text{ rad/s}$). - DLQR gains $K_{\text{LQR}}$ stabilize $x \to 0, \dot{x} \to 0, \theta \to 0, \dot{\theta} \to 0$ with high convergence precision and zero steady-state error. ```101:144:/app/work/controller.py def controller(obs: dict) -> np.ndarray: """Compute the horizontal force action for the cart-link system. Args: …

Controller family: energy-based swing-up + LQR catch

Far from upright, it pumps pendulum energy toward the upright level by commanding a clipped cart acceleration (sign(theta_dot*cos theta) times energy error plus PD centering) converted to force via partial feedback linearization, then switches to a precomputed discrete LQR when the pole is within 0.45 rad and 2.5 rad/s of upright.

Shown: public seed 0 (base); this episode passes the default rung. This episode: final_upright_error 1.85e-11, final_abs_x 1.18e-10, max_track_violation 0, success_hold_steps 25, total_reward 573.

controller.py · trial cart-link-swingup__SLrW7Fu