← trajectories

How close to optimality are current state-of-the-…

Title truncated in the source doc — replace with the full research question.

Synthetic SFT

sft.json

Multi-turn tool-using investigation as a clean demonstration.

id
ml_research_trajectory_mountain_car_optimality_001
domain
machine_learning_research
task_type
multi_turn_autonomous_research_investigation
variant
A_reasoning_externalized

provenance

source:human-steered research session, 2026-07-20 to 2026-07-21
construction:The human researcher's steering turns and the orchestrator's execution turns were collapsed into a single assistant agent. All experiment results, metrics, solver checks and policy fingerprints are taken from the real runs. Infrastructure failures, provisionin…
note:Assistant turns are the training target. Design criteria are moved before proposals, so the assistant proposes each experiment in its final intended form. The only mid-run steering is triggered by a real preliminary measurement showing that trajectory correlat…

tools

Functions available to the assistant

8 tools
  1. 01search_literature

    Search the research literature and return relevant papers with findings.

    querystring*categoriesstring[]date_fromstringmax_resultsinteger
  2. 02search_findings

    Search findings previously recorded by this lab, to reuse established results instead of re-deriving them.

    querystring*max_resultsinteger
  3. 03propose_experiment

    Draft a runnable experiment specification. Returns a proposal id and a compute estimate. Does not run anything.

    titlestring*research_questionstring*methodstring*controlsstring[]evaluationstring*experimentsstring[]*deliverablesstring[]computeobject
  4. 04launch_experiment

    Launch a proposed experiment on compute. Returns a run id. The run executes autonomously.

    proposal_idstring*
  5. 05read_experiment_results

    Read output from a running or finished experiment.

    run_idstring*sectionstring*detailstring
  6. 06steer_experiment

    Send an instruction to a running experiment to change what it does mid-flight.

    run_idstring*instructionstring*
  7. 07stop_experiment

    Cancel a running experiment and release its compute.

    run_idstring*reasonstring*
  8. 08record_finding

    Record a durable finding so later experiments can build on it without re-deriving it.

    titlestring*statementstring*evidencestring*caveatsstring
* required

messages

system
You are an autonomous ML research agent with access to compute. You design, run, and interpret experiments to answer research questions. Work the way a good empirical researcher works. Before building anything, identify the assumption the whole idea rests on and test that first. Prefer the experiment that could kill the idea over the experiment that would showcase it. Do not pre-commit to experiment N+1 before seeing the result of experiment N. When a measurement could be produced by an artifact, run the control that would expose the artifact, and select on the controlled quantity rather than on how good the raw result looks. State negative results plainly and diagnose them mechanistically. Reuse prior results instead of re-spending compute on settled questions, and hold the evaluation set fixed across conditions so comparisons remain valid. Do not invent numbers: every quantitative claim must come from a tool result.
user
Reinforcement learning has become a powerful paradigm for control and decision-making tasks, yet it faces challenges when applied to real-world problems, including sample efficiency, explainability, interpretability, real-time capability, and training stability. The Mountain Car problem is a canonical low-dimensional continuous control benchmark: an underpowered car in a valley must build momentum through oscillation to reach a hilltop goal against gravity while minimizing propulsion effort. Its dynamics resemble typical physics and engineering systems yet are simple enough to invite analytic treatment. Despite decades of use as a benchmark, the true optimal solution and thus the actual gap to optimality of modern RL agents have not been established. Understanding this gap, and exploring policy representations beyond neural networks for such tasks, motivates the investigation. Research question I'm investigating: How close to optimality are current state-of-the-art RL agents on the Mountain Car benchmark, i.e., what is their regret relative to the optimal control?
assistant
The first question is not which agent to train. It is whether this benchmark is small and structured enough that the reference policy can be solved directly, and what definition of return the environment actually exposes. I want the dynamics, reward, termination and horizon pinned down before choosing an optimal-control formulation.
search_literature()
{
  "query": "MountainCarContinuous-v0 exact dynamics reward horizon optimal control value iteration regret",
  "categories": [
    "reinforcement-learning",
    "optimal-control"
  ],
  "max_results": 10
}
toolsearch_literature
{"environment":{"name":"MountainCarContinuous-v0","state":"position x in [-1.2,0.6], velocity v in [-0.07,0.07]","action":"a in [-1,1]","dynamics":"v' = clip(v + 0.0015*a - 0.0025*cos(3x)); x' = clip(x + v')","reward":"-0.1*a^2 per step and +100 on entering the goal","goal":"x >= 0.45 with nonnegative velocity","episode_cap_steps":999,"reported_episode_return":"undiscounted sum of rewards"},"research_gap":"The session source identifies no established numerical ground-truth optimum against which modern agents' regret is routinely reported.","implication":"Known deterministic dynamics and a two-dimensional state make direct dynamic programming and trajectory optimization appropriate reference methods."}
assistant
This should begin as optimal control, not reinforcement learning. The load-bearing object is the reference optimum: without it, an agent leaderboard only ranks algorithms against one another and cannot answer regret. The obvious direct solve is value iteration on the state grid, but a single implementation is not evidence of ground truth. Interpolation, terminal credit, or a transition mismatch can all produce a plausible-looking value surface and a wrong number. So value iteration will be primary, and the proposal will already include the checks needed to trust it: step-for-step agreement with the environment dynamics, Bellman residual, terminal handling, rollout-versus-value consistency, and grid refinement. Policy iteration is useful only as an independent dynamic-programming check; direct collocation is useful because it removes the state-grid approximation. Local shooting and multi-start methods would add breadth without directly attacking the likely bugs, so I am excluding them. I am also not launching the agent sweep in parallel. The optimum, its numerical uncertainty, and a reusable policy artifact determine every later regret calculation. Training first would merely produce returns waiting for a denominator. The direct solve comes first, and only the result decides how regret should be framed.
assistant
propose_experiment()
{
  "title": "Mountain Car exact optimum by value iteration, cross-checked",
  "research_question": "What is the trustworthy optimal control and return for MountainCarContinuous-v0 before any RL comparison is attempted?",
  "method": "Use global value iteration on the (x,v) grid with the exact deterministic transition and bilinear next-state interpolation as the primary solver. Refine from 300x120x21 through 600x240x41 to 1200x480x81. Cross-check with policy iteration on the grid and grid-free direct collocation from the canonical start. Compute the discounted agent objective and a near-undiscounted reference.",
  "controls": [
    "step-for-step transition equivalence to the benchmark",
    "Bellman residual convergence",
    "terminal +100 credit and absorbing-goal handling",
    "greedy rollout under exact dynamics versus predicted value",
    "policy-iteration agreement",
    "grid-free collocation agreement"
  ],
  "evaluation": "Agreement table across solvers and grid resolutions, with optimal return, rollout, effort, trajectory, value surface and policy surface.",
  "experiments": [
    "solver correctness tests before reporting values",
    "value iteration grid refinement",
    "policy iteration cross-check",
    "direct collocation cross-check",
    "persist a self-describing reference artifact"
  ],
  "deliverables": [
    "optimal return and numerical uncertainty",
    "value and policy arrays",
    "canonical trajectory",
    "reusable manifest"
  ]
}
toolpropose_experiment
{"proposal_id":"P-a13f","status":"drafted"}
assistant
launch_experiment()
{
  "proposal_id": "P-a13f"
}
toollaunch_experiment
{"run_id":"R-b24e","status":"finished","title":"Mountain Car exact optimum by value iteration, cross-checked"}
assistant
read_experiment_results()
{
  "run_id": "R-b24e",
  "section": "summary"
}
toolread_experiment_results
{"solver_checks":{"transition_max_error":"approximately 1e-7","terminal_mismatches":0,"bellman_residual":"below 1e-8","terminal_credit":"verified"},"discounted_gamma":0.99,"canonical_start":[-0.5,0],"value_iteration_refinement":[{"grid":"300x120x21","value_start":47.57},{"grid":"600x240x41","value_start":47.67},{"grid":"1200x480x81","value_start":47.713}],"greedy_exact_dynamics_rollout":47.791,"policy_iteration":{"max_value_difference":"7e-9","policy_disagreement_pct":0},"direct_collocation":{"return":47.807,"steps":66,"undiscounted_return":94.27},"discounted_optimum":{"estimate":47.81,"uncertainty":0.04},"standard_start_distribution_mean_value":47.65,"near_undiscounted_probe":{"gamma":0.9999,"undiscounted_return":98.18,"steps":165,"caveat":"effort was still decreasing with horizon; this is not the 999-step undiscounted optimum"},"artifact":"reference optimum arrays and manifest persisted for reuse"}
assistant
The discounted reference is established to the precision needed for comparison. The three independent methods agree: the refined value estimate approaches the grid-free return, policy iteration is numerically identical to value iteration, and the implementation-level controls passed before any headline was read. That makes the discounted optimum about 47.81, not just the best return somebody happened to train. But the near-undiscounted result changes what I need next. It takes a much longer trajectory and is explicitly still improving with horizon, so it is not yet the benchmark optimum. More importantly, the direct solve has exposed two potentially different controllers selected by two objectives. Before choosing a regret target or launching agents, I want to see the policy surfaces themselves. A scalar return cannot tell whether discounting merely changes a gain or changes the controller's topology. This is deliberately a short interpretability detour. Re-solving and plotting both regimes is worth doing because the shape determines the next scientific question; a large agent sweep does not.
assistant
record_finding()
{
  "title": "Discounted Mountain Car optimum is numerically cross-validated",
  "statement": "For MountainCarContinuous-v0 from the canonical start, the gamma=0.99 optimum is approximately 47.81 discounted return and its exact-dynamics rollout scores 94.27 undiscounted.",
  "evidence": "Value iteration converges 47.57 to 47.67 to 47.713 across grid refinements; policy iteration differs by 7e-9 with 0% policy disagreement; grid-free collocation returns 47.807 in 66 steps. Dynamics, Bellman and terminal-credit controls pass.",
  "caveats": "The gamma=0.9999 result, 98.18 undiscounted in 165 steps, is only a lower bound on the 999-step undiscounted optimum."
}
toolrecord_finding
{"finding_id":201,"recorded":true}
assistant
The plotting run must compare the two objectives on the same state grid and overlay the canonical trajectory. Looking only at the discounted winner would encourage a story about a switching curve without showing whether that structure is inherent to the physics or induced by discounting. I want saturation fraction, switching geometry and the trajectory, not a decorative heatmap.
assistant
propose_experiment()
{
  "title": "Plot the optimal policy surface under discounted and min-effort regimes",
  "research_question": "Does changing the return objective merely retune one controller, or select a qualitatively different policy geometry?",
  "method": "Recompute the two policy surfaces on a 600x240 state grid with 41 actions. Render action heatmaps with zero-action switching curves and overlay the exact canonical-start trajectory.",
  "controls": [
    "same dynamics and state grid for both objectives",
    "mark the goal region",
    "report saturated versus graded state-space fraction"
  ],
  "evaluation": "Direct visual and numerical comparison of switching structure, saturation and canonical trajectory.",
  "experiments": [
    "gamma=0.99 policy surface",
    "gamma=0.9999 policy surface",
    "canonical trajectory overlay"
  ],
  "deliverables": [
    "side-by-side policy surfaces",
    "switching-curve characterization",
    "trajectory overlay"
  ]
}
toolpropose_experiment
{"proposal_id":"P-c35a","status":"drafted"}
assistant
launch_experiment()
{
  "proposal_id": "P-c35a"
}
toollaunch_experiment
{"run_id":"R-d46b","status":"finished","title":"Plot the optimal policy surface under discounted and min-effort regimes"}
assistant
read_experiment_results()
{
  "run_id": "R-d46b",
  "section": "qualitative",
  "detail": "policy geometry, saturation and trajectory"
}
toolread_experiment_results
{"setup":"600x240 states and 41 actions under exact Mountain Car dynamics","discounted_gamma_0_99":{"saturated_state_space_pct":59,"geometry":"two large action plateaus separated by a thin softening band; S/boomerang switching curve rather than sign(v); momentum-building pocket pushes left near zero velocity and bends positive near the goal","switching_curve_rms_abs_velocity":0.021,"canonical_trajectory":"left/down swing followed by hard right","goal_steps":66},"near_undiscounted_gamma_0_9999":{"graded_state_space_pct":99,"geometry":"smooth graded spiral force field; switching curve collapses near v=0 and bends only near the goal","switching_curve_rms_abs_velocity":0.008},"mechanistic_interpretation":"discounting selects the saturated fast controller; the near-undiscounted objective selects smooth energy pumping","artifacts":"policy surfaces, comparison figure, trajectory overlay and raw policy arrays verified"}
assistant
The objective changes the controller qualitatively, not cosmetically. Under the discounted objective, most of the grid is saturated and the switching curve contains a momentum-building pocket; under the near-undiscounted objective, almost the whole field is graded and organized around velocity. That forces a correction to the regret definition. Agents may be trained with discounting, but the environment reports the undiscounted episode sum. If regret is supposed to answer performance on the benchmark's reported metric, the target is the finite-horizon min-effort optimum, not the discounted bang-bang controller. The current 98.18 reference cannot serve because its own run says effort is still falling at the observed horizon. The real target must respect the episode cap. The obvious next move would be a larger backward-DP sweep. I am not doing that first. The policy field suggests a much stronger theoretical simplification: smooth force in phase with velocity. In a frictionless system, the energy balance gives control power proportional to action times velocity. Cauchy-Schwarz then does more than lower-bound effort; it predicts the form of the minimizing law. If that form is right, a one-parameter controller becomes the explanation and dynamic programming becomes a confirmation. The relaxed derivation says action should be proportional to velocity, clipped only if needed. But the relaxation enforces total injected energy, not exact terminal geometry, and the continuous-time argument is being applied to a discrete environment. Those are the failure modes the next proposal must test. I want a gain sweep, the true finite-horizon dynamic-programming optimum, an executable time-varying rollout, scaling checks, and minimal augmentations only if the constant-gain law leaves a visible gap.
assistant
record_finding()
{
  "title": "Discounting changes Mountain Car policy topology",
  "statement": "The discounted optimum is a mostly saturated boomerang switching surface, whereas the near-undiscounted policy is a smooth velocity-organized force field.",
  "evidence": "On the common 600x240x41 solve, gamma=0.99 is 59% saturated and reaches in 66 steps; gamma=0.9999 is 99% graded. Switching-curve RMS |v| is 0.021 versus 0.008.",
  "caveats": "The near-undiscounted surface is not itself the exact 999-step finite-horizon optimum."
}
toolrecord_finding
{"finding_id":202,"recorded":true}
assistant
Before writing the validation run, I want the exact solver controls and discounted baseline carried forward from the recorded results rather than reconstructed from memory.
search_findings()
{
  "query": "Mountain Car validated dynamics discounted optimum policy geometry and undiscounted lower bound",
  "max_results": 5
}
toolsearch_findings
{"results":[{"id":201,"use":"validated exact dynamics and solver checks; gamma=0.99 collocation return 47.807, undiscounted score 94.27"},{"id":202,"use":"discounted surface is 59% saturated; near-undiscounted surface is 99% graded and velocity-organized"}],"unsettled":"true undiscounted optimum under the 999-step cap and the gap between it and a constant-gain velocity law"}
assistant
propose_experiment()
{
  "title": "Validate the closed-form minimum-effort law a = clip(k v)",
  "research_question": "Is the finite-horizon undiscounted optimum essentially the one-parameter velocity-feedback controller predicted by the energy argument, and what residual does time variation explain?",
  "method": "Sweep constant gains under exact dynamics to find the feasibility cliff within the 999-step cap. Independently solve finite-horizon backward dynamic programming at gamma=1 and execute the time-indexed greedy policy under exact dynamics. Compare actions along the optimal trajectory with velocity and position.",
  "controls": [
    "step-for-step exact dynamics",
    "grid refinement",
    "execute the time-varying policy rather than a stationary interpolation of V_999",
    "separate injected-work energy identity from endpoint-energy discretization error",
    "test terminal coast, action cap and two-phase gain only if needed"
  ],
  "evaluation": "Undiscounted return, effort, steps, gain threshold, gap to dynamic programming, action-velocity and action-position correlations, analytic effort/growth/period checks.",
  "experiments": [
    "constant-gain feasibility sweep",
    "finite-horizon backward-DP confirmation",
    "exact-dynamics time-varying rollout",
    "analytic scaling tests",
    "minimal augmentation checks"
  ],
  "deliverables": [
    "true undiscounted target",
    "closed-form controller and gap",
    "objective-mismatch baseline",
    "durable reference arrays"
  ]
}
toolpropose_experiment
{"proposal_id":"P-e57c","status":"drafted"}
assistant
launch_experiment()
{
  "proposal_id": "P-e57c"
}
toollaunch_experiment
{"run_id":"R-f68d","status":"finished","title":"Validate the closed-form minimum-effort law"}
assistant
read_experiment_results()
{
  "run_id": "R-f68d",
  "section": "metrics"
}
read_experiment_results()
{
  "run_id": "R-f68d",
  "section": "controls"
}
toolread_experiment_results
{"constant_gain_law":{"form":"a = clip(k*v, -1, 1)","reported_threshold_gain":4.9945,"return":99.452,"effort":5.48,"steps":933,"threshold_bracket":"k=4.99451 clears while k=4.9945 fails; the reported k is rounded"},"finite_horizon_dp":{"gamma":1,"horizon":999,"grid_values":[99.605,99.617],"exact_dynamics_time_varying_rollout_return":99.6195,"effort":3.805,"steps":968},"gap_constant_to_dp":{"return_units":0.167,"relative_pct":0.17,"captured_pct":99.8},"optimal_trajectory_fingerprint":{"corr_action_velocity":0.86,"corr_action_position":0.06,"clipped_pct":0,"linear_fit_r2":0.73,"fitted_gain":2.54,"interpretation":"velocity feedback with time-varying gain"},"objective_mismatch":{"undiscounted_optimum":99.62,"discounted_optimum_undiscounted_score":94.27,"gap":5.35}}
toolread_experiment_results
{"analytic_checks":{"injected_work_effort_identity_error_pct":0.0,"endpoint_energy_form_error_pct":26,"endpoint_error_cause":"discrete energy-conservation error at unit time step","amplitude_growth_observed":0.00368,"amplitude_growth_predicted":0.00375,"period_observed":74,"period_predicted":72.6},"execution_control":{"stationary_greedy_policy":"stalls because near-indifference and bilinear averaging suppress momentum","time_varying_policy":"reaches the goal and matches the finite-horizon grid value"},"augmentation_checks":{"terminal_push":"adds effort","coasting":"does not help at the minimum feasible constant gain because there is no energy slack","action_cap":"does not beat the constant-gain return","two_phase_gain":"does not beat the constant-gain return"},"caveat":"The residual gap is constant gain versus time-varying gain; the relaxed continuous-time law is near-optimal, not exactly equal to the discrete finite-horizon optimum."}
assistant
The analytic law survives the test, but the clean statement is near-optimality, not exact equality. The finite-horizon dynamic program reaches about 99.62, while the rounded threshold constant-gain law reaches 99.452. The residual is not a mysterious state dependence: along the executable optimal trajectory action correlates strongly with velocity and almost not at all with position. What dynamic programming adds is time-varying gain, allowing less effort over more of the horizon. The controls matter. A stationary greedy rendering of the final-horizon value stalls, even though the value itself is correct; using the policy indexed by remaining time makes the rollout attain the grid value. Likewise, the injected-work identity is exact while the endpoint-energy version is distorted by the coarse discrete step. Reporting either the stationary rollout or the endpoint-energy discrepancy without those diagnoses would falsely weaken the analytic result. This also fixes regret on the reported metric. A policy that is optimal for the discounted training objective scores 94.27 undiscounted, against a true undiscounted target of about 99.62. The resulting 5.35-unit gap is an objective-mismatch reference, not automatically the regret of every trained agent. I do not yet want a discount sweep. It is tempting because it directly tests the mismatch story, but it presumes the trained networks inhabit the expected controller family. Returns alone cannot tell whether a solver learned velocity feedback with the wrong gain, a position-dependent switching surface, or something topologically different. The cheaper discriminating measurement is the learned policy field.
assistant
record_finding()
{
  "title": "The undiscounted optimum is near-analytic velocity feedback",
  "statement": "The true 999-step undiscounted optimum is approximately 99.62. A constant-gain law a=clip(kv) reaches 99.452 and captures 99.8% of it; the remaining 0.167 comes from the optimal time-varying gain.",
  "evidence": "Refined DP values 99.605 and 99.617; exact-dynamics time-varying rollout 99.6195 with effort 3.805 in 968 steps. Constant gain returns 99.452 with effort 5.48 in 933 steps. Optimal-trajectory corr(a,v)=0.86 and corr(a,x)=0.06.",
  "caveats": "The gain threshold is razor-thin and reported k=4.9945 is rounded; the continuous-time law is near-optimal rather than exactly equal to the discrete finite-horizon controller. A stationary greedy policy is not a valid executable substitute for the time-indexed finite-horizon policy."
}
toolrecord_finding
{"finding_id":203,"recorded":true}
assistant
I want the final observational run to load the established targets and controller fingerprint instead of recomputing them, and I want the known distinction between a stationary display policy and the executable finite-horizon policy kept explicit.
search_findings()
{
  "query": "Mountain Car undiscounted optimum constant-gain law mismatch baseline and policy fingerprint",
  "max_results": 5
}
toolsearch_findings
{"results":[{"id":201,"use":"gamma=0.99 reference: 47.807 discounted, 94.27 undiscounted"},{"id":202,"use":"discount changes saturated switching geometry into graded velocity-organized control"},{"id":203,"use":"undiscounted target 99.62; constant-gain reference k approximately 4.99; optimal trajectory corr(a,v)=0.86, corr(a,x)=0.06; mismatch reference 5.35"}],"instruction":"Analyze failures separately from solving policies; compare policy fields on the full state grid so trajectory x-v collinearity does not masquerade as position dependence."}
assistant
The next run is an observational discriminator, not an omnibus explanation study. I considered a discount sweep, an entropy sweep, and a robustness-gain derivation. All are plausible, but running them now would commit compute before observing which structural discrepancy actually exists. The primary question is binary: do solving agents live in the velocity-feedback family, or do they learn a genuinely different state-space topology? The optimum gives a unusually sharp geometric reference. A full-grid action surface can separate velocity dependence from position dependence; a return cannot. Failures also have to stay separate from suboptimal solvers, because averaging a no-actuation collapse into regret confounds exploration failure with the quality of a learned controller. I will train the four established continuous-control algorithms with the same discount and evaluate deterministic policies on the undiscounted benchmark return. Ten seeds per algorithm is enough for this first pass because the deliverable is a set of solving policy portraits, not a high-precision leaderboard. Every solver gets a side-by-side surface against the constant-gain law, a residual map, a trajectory overlay, and gain/saturation/correlation fingerprints. Only after seeing that geometry will I decide whether discount, entropy, robustness, or representation deserves an intervention.
assistant
propose_experiment()
{
  "title": "Do solving RL agents implement velocity feedback?",
  "research_question": "Before designing causal sweeps, do trained Mountain Car solvers have the same a approximately k*v geometry as the near-analytic optimum, or a fundamentally different policy field?",
  "method": "Train SAC, TD3, PPO and TQC at gamma=0.99 with 10 seeds each. Evaluate deterministic undiscounted return. For each solver, sample the action over the full state grid and render it beside a=clip(k*v), with a residual map and canonical trajectory overlay. Fit effective gain and compute full-grid action-velocity and action-position correlations, velocity-fit R2 and saturation.",
  "controls": [
    "analyze non-reaching seeds separately from solver regret",
    "use full-grid correlations to disentangle state collinearity along trajectories",
    "same undiscounted evaluation and reference targets for every algorithm",
    "inspect policy portraits rather than selecting on return alone"
  ],
  "evaluation": "Solver counts and undiscounted returns versus 99.62 and 94.27, plus full-grid policy fingerprints that decide velocity feedback versus different topology.",
  "experiments": [
    "train and evaluate four algorithms across 10 seeds each",
    "regret plot with failures marked separately",
    "policy portraits for every solver",
    "full-grid fingerprints and structural verdict"
  ],
  "deliverables": [
    "per-seed regret table",
    "policy portraits and residual maps",
    "fingerprint summary",
    "plain-language verdict that scopes the next experiment"
  ]
}
toolpropose_experiment
{"proposal_id":"P-g79e","status":"drafted"}
assistant
launch_experiment()
{
  "proposal_id": "P-g79e"
}
toollaunch_experiment
{"run_id":"R-h80f","status":"running","title":"Do solving RL agents implement velocity feedback?"}
assistant
read_experiment_results()
{
  "run_id": "R-h80f",
  "section": "qualitative",
  "detail": "first completed solver: compare trajectory correlations with the full policy surface"
}
toolread_experiment_results
{"status":"partial","first_solver":{"algorithm":"SAC","undiscounted_return":93.78,"trajectory_corr_action_velocity":0.88,"trajectory_corr_action_position":0.38,"velocity_fit_r2":0.70,"effective_gain":25},"surface_inspection":"The action field is a steep velocity-organized switching surface. The trajectory moves through correlated x and v, so trajectory-only corr(a,x) may falsely suggest position dependence.","risk":"A trajectory fingerprint can confuse visitation geometry with policy geometry."}
assistant
This is exactly the artifact the surface control was meant to expose. Along one trajectory, action correlates with both velocity and position, but the rendered field looks organized primarily by velocity. Mountain Car trajectories make position and velocity strongly collinear, so an on-trajectory correlation cannot decide functional form. That is new measurement evidence, not a redesign of a bad draft. The run already samples full action surfaces; I am tightening the analyzer so the structural verdict is computed on the full grid, with trajectory statistics retained only as a visitation diagnostic. The qualitative portraits should also be regenerated with the full-grid fingerprints attached, so a visually tilted transition band cannot be overinterpreted.
steer_experiment()
{
  "run_id": "R-h80f",
  "instruction": "For every solving policy, compute corr(a,x), corr(a,v), the velocity-fit R2 and effective gain over the full rectangular state grid, not only along the rollout. Keep trajectory-based correlations as secondary visitation diagnostics. Regenerate portraits and the summary using surface-based fingerprints, because the preliminary SAC trajectory has x-v collinearity that inflates corr(a,x). Do not change training or the evaluation return."
}
toolsteer_experiment
{"run_id":"R-h80f","accepted":true,"analysis_change":"surface-based policy fingerprints are now primary; training and return evaluation unchanged"}
assistant
read_experiment_results()
{
  "run_id": "R-h80f",
  "section": "metrics"
}
read_experiment_results()
{
  "run_id": "R-h80f",
  "section": "qualitative",
  "detail": "full-grid policy fingerprints, failure modes and representative portraits"
}
toolread_experiment_results
{"training":{"algorithms":["SAC","TD3","PPO","TQC"],"seeds_per_algorithm":10,"total_runs":40,"crashes":0},"solvers":{"total":33,"SAC":10,"TQC":10,"TD3":9,"PPO":4},"non_solvers":"failures split between near-zero-action collapse and effort-wasting non-reachers","solver_return_band":"most solvers 93.5-94.5 undiscounted, around the gamma=0.99 optimum score of 94.27","references":{"undiscounted_optimum":99.62,"discounted_optimum_undiscounted_score":94.27,"mismatch_reference":5.35},"best_ppo_seed_return_band":"96-97"}
toolread_experiment_results
{"surface_fingerprints":{"corr_action_position":{"SAC":0.03,"TQC":0.08,"TD3":-0.07,"PPO":-0.29},"corr_action_velocity":"approximately 0.8 across algorithms"},"policy_families":{"SAC_TQC":"high-gain graded velocity switching fields, effective gain approximately 25, approximately 5 times the constant-gain optimum, little on-path clipping","TD3":"explicit bang-bang velocity-organized field, clipping approximately 0.8","PPO":"lower-gain nearly pure a(v) band, effective gain approximately 9-11; best seeds score 96-97 undiscounted"},"representative_portrait":{"PPO_return":96.73,"surface_corr_action_position":-0.07,"effective_gain":11,"description":"clean nearly horizontal velocity-feedback field with no clipping and a small smooth residual to the constant-gain reference"},"verdict":"Solving agents share the optimal controller's velocity-feedback topology. The main discrepancy is gain and saturation, not representational inability.","artifacts":"per-seed table, regret plot, solver portraits, fingerprint plot, models and analysis summary verified"}
assistant
The representational hypothesis is a negative result. Solving agents do not discover a different controller topology: the full-grid policy fields have near-zero position correlation and strong velocity correlation across all four algorithms. The preliminary trajectory statistic was misleading because visitation coupled position and velocity; the surface-based control reverses that interpretation. The gap collapses to gain and saturation. Most solvers sit around the undiscounted score of the discounted optimum. SAC and TQC implement steep graded velocity switching, TD3 is explicitly bang-bang, and PPO is the revealing exception: its lower-gain velocity field produces the highest undiscounted scores, moving toward the min-effort target even though that means not perfectly optimizing the discounted objective. So the 5.35 mismatch is a reference for a discount-optimal policy, not a universal lower bound on trained-agent regret. Failures must remain separate: near-zero-action collapse and effort-wasting non-reaching policies are exploration or training failures, not points on the regret curve of solving controllers. Among solvers, the next organizing object should be return versus effective gain. A discount sweep is now justified as one way of moving gain, alongside entropy and effort pressure; representation no longer deserves the next unit of compute.
assistant
record_finding()
{
  "title": "Solving Mountain Car agents share the optimal velocity-feedback topology",
  "statement": "Across SAC, TQC, TD3 and PPO solvers, the learned full-grid policy is velocity-organized rather than position-dependent. The reported-return gap is primarily gain and saturation, not representational inability.",
  "evidence": "40 runs produced 33 solvers: SAC 10, TQC 10, TD3 9, PPO 4. Surface corr(a,x) is 0.03, 0.08, -0.07 and -0.29 respectively, while corr(a,v) is about 0.8. Most solver returns are 93.5-94.5; lower-gain PPO seeds reach 96-97.",
  "caveats": "One environment, one training discount and tuned library configurations. Non-reaching seeds are a separate failure mode. Trajectory correlations are confounded by x-v collinearity and must not be used to infer policy topology."
}
toolrecord_finding
{"finding_id":204,"recorded":true}
assistant
All planned training, full-grid analysis and artifact checks are complete. I am terminating the run service rather than leaving auxiliary processes alive; this does not truncate any scientific condition.
stop_experiment()
{
  "run_id": "R-h80f",
  "reason": "All 40 planned training runs, policy portraits, surface fingerprints and persisted artifacts are complete and verified; release compute."
}
toolstop_experiment
{"run_id":"R-h80f","status":"stopped","science_complete":true,"completed_training_runs":40,"retained_artifacts":"models, regret table, policy portraits, full-grid fingerprints and analysis summary"}
assistant
The answer is now decomposed rather than compressed into one regret number. The reported undiscounted optimum is about 99.62, and a simple clipped velocity-feedback law reaches 99.452. A controller optimal for the standard discounted training objective scores 94.27 on that reported metric, defining a 5.35 objective-mismatch reference. Modern solvers mostly cluster around that discounted-policy score, but they are not representationally blocked: all four algorithm families learn velocity-organized action fields. Their scientifically relevant difference is effective gain, with lower-gain PPO policies reaching 96-97. What is established: direct optimal control supplies the missing benchmark reference; the nearly analytic controller is velocity feedback; and the network policies occupy the same family. What is refuted: the idea that the residual SOTA gap is primarily a failure to represent or find the optimal policy topology. What remains open is why each objective and optimizer selects its particular gain. That is a narrower and better-founded next question than another undirected agent sweep.

labels

successful_investigation:true
primary_conclusion:The true 999-step undiscounted MountainCarContinuous-v0 optimum is approximately 99.62 and is almost captured by an interpretable clipped velocity-feedback law. State-of-the-art solvers learn the same velocity-feedback topology, so their gap is primarily effec…
negative_result_reported:true
negative_result_diagnosed_mechanistically:true
ground_truth_computed_before_agent_comparison:true
solver_correctness_controls_load_bearing:true
objective_definition_reframed_from_reported_metric:true
analytic_law_tested_before_large_sweep:true
policy_shape_prioritized_over_scalar_return:true
trajectory_correlation_artifact_corrected_from_new_measurement:true
failures_separated_from_solver_regret:true
scope_cut_to_observational_discriminator:true
unsupported_claims_present:false
all_quantitative_claims_traceable_to_tool_results:true

steering_moves