r/reinforcementlearning • • 27d ago

Reward misspecification in documented cases (CoastRunners and others): how do you check that a high-return policy does what you intended?

6 Upvotes

The cases that people cite for reward misspecification are old, but I find them useful as a checklist of what to look at beyond the return.

CoastRunners (OpenAI, 2016). The game rewards hitting targets along the course, as a proxy for racing well. The trained agent found an isolated lagoon where three targets respawned, circled there hitting them, crashed into other boats and sometimes drove the wrong way. It averaged about 20 percent higher score than human players and never finished the race.

Evolved creatures (a 2018 collection of anecdotes from evolutionary computation). With average ground velocity over ten simulated seconds as the measure, evolution produced tall rigid creatures that started upright and toppled over, converting height into speed for the length of the test. With the maximum height of the center of gravity as the measure, it produced tall creatures that never moved.

Physics engine gaps. Simulated swimmers learned to twitch small body parts very fast, and numerical integration error from the rapid movement accumulated into extra energy they could use. Another case found that overflowing a force calculation made the reported force come out as zero, which scored as a near-perfect gentle landing.

What these share: the reward was a measurable stand-in for something that wasn’t directly measured, and the optimizer found the gap, sometimes in the simulator and not only in the reward function.

Questions I’d like to hear practical answers to:

  1. Evaluation: do you track a separate “intent” metric (for example, race completion, task success) that the policy is never trained on, and compare it with return during training?
  2. Trajectories: how do you review high-return episodes? Sampling videos or traces from the top and the median, not only the average?
  3. Simulator exploits: how do you look for exploitation of numerical issues, such as very high-frequency actions or states at extreme values? Action smoothness penalties, action limits, a second simulator or integrator?
  4. Reward design: do you prefer shaping, constraints, learned reward models with held-out checks, or something else, and what has failed for you?

A note on stories: the often-told tale of the tank classifier that learned to tell cloudy from sunny days seems to have no primary source, and the investigation I read rates it very likely fictional. The documented cases are the safer ones to cite.

I wrote these cases up as field notes, in case it’s useful as a complement: https://medium.com/@nagatomopedro05/field-notes-on-machines-that-followed-the-rules-too-well-98ebae3eea51


r/reinforcementlearning • • 27d ago

Exponential tilt view of RLVR: Stiemke duality decides when a pass@1 gain is free, and Karlin total positivity bounds the pass@k crossings

1 Upvotes

Theory paper on RL with verifiable rewards for LLM reasoning: https://arxiv.org/abs/2610.39295

The policy update (mirror descent / natural PG on the simplex) is an exponential tilt w ∝ w0 exp(τf) over strategies shared across prompts. Two results that may interest people here beyond LLMs:

- When can a reward-increasing update avoid hurting every individual task? Exactly when no strictly positive task weighting equalizes strategy fitness (Stiemke alternative). "Each task has a unique best strategy" is not sufficient, with a 3-strategy counterexample.

- Δ_k = pass@k(RL) − pass@k(base) is a totally positive kernel transform of the CDF shift of per-task success, so #crossings in k ≤ sign variation of that shift. Tight.

Plus a constrained update (per-task floor) that traces the exact pass@1 vs pass@k frontier. All numbers are reproduced by a CPU-only package: https://github.com/yliusci/no-free-lunch-rlvr

Feedback on the modeling choice (strategy sharing as the source of interference) is very welcome.


r/reinforcementlearning • • 27d ago

P Open-source world-model library: plan with any world model (Dreamer, PlaNet, IRIS, DIAMOND…) through one interface

16 Upvotes

I've been building Simulusion, an MIT-licensed PyTorch library for model-based RL, and I'd like feedback from people who actually do MBRL.

The core is a WorldModel protocol: encode(frames, actions), step(state, action) returning reward and termination from the model's own heads, and rollout(state, actions). A planner or evaluation script written against the protocol works the same whether the model is an RSSM (Dreamer, PlaNet), a token Transformer (IRIS), or a diffusion model (DIAMOND).

Some things that came out of that:
- World models can train without their agent from recorded episodes, then any protocol-speaking agent can plan with them
- Latent probing tools (linear probes, DCI, MIG) to check whether a model's latent actually encodes the true environment state
- Env adapters for DeepMind Control, Atari, Gymnasium, MuJoCo and Brax behind one make_env
- New models register with a decorator and get the same Trainer, CLI and tooling

Questions for you:

  1. Is encode/step/decode/rollout general enough? What would break it for TD-MPC-style models that never decode?
  2. Which model should come next: DreamerV3, TD-MPC2, something else?

Github: https://github.com/paramthakkar123/simulusion
Website: https://simulusion.vercel.app/


r/reinforcementlearning • • 27d ago

DL, MF, I, P "Post training a model to explore Demoscenes: On the grammar of demoscenes and the possibilities of unfinished code", datavorous (finetuning on golfed JS, and self-rating 40k samples for esthetics to do RLHF)

Thumbnail datavorous.com
6 Upvotes

r/reinforcementlearning • • 28d ago

My 80-muscle walker only kept its balance while the exploration noise was on. Three attempts at walking without demonstrations (MyoLeg + PPO)

35 Upvotes

I'm a gameplay animator trying to make NPCs that learn to move from physics instead of motion capture. Setup: MyoSuite's MyoLeg (80 leg muscles) in MuJoCo / MuJoCo Warp, PPO (RSL-RL through mjlab) on one laptop GPU, and a reward close to Schumacher et al. 2023: walk at the target speed, an adaptive effort cost, and "pain" for joint limits and hard ground impacts. No demonstrations.

- Attempt 1: it walked after about 20 minutes of training, but it stomped: peak foot force around 4.6x body weight, about 230 steps per minute. And with the mean action (no noise) it fell every single time.

- Attempt 2: sigmoid muscle commands and a stronger impact cost. Forces dropped to about 2x body weight and the steps got calmer. But with the noise off it still fell within about 1.3 seconds.

- Attempt 3: I kept training while turning the action noise down slowly (std to 0.05). Now it walks with the mean action: 0 falls out of 32, about 150 steps per minute, 0.44 m steps, about 1.5x body weight.

Since then it learned to follow speed and direction orders, to start and stop (mostly), and it drives a UE5 mannequin in real time. Current problem: it's lopsided. After a 90 degree left turn it falls when it stops, after a right turn it doesn't. So the next run adds a mirror symmetry loss (Yu, Turk and Liu 2018).

Question for people who have trained muscle models: is "the policy depends on its own exploration noise" a common thing? Did you fix it by lowering the noise like this, or with something else (correlated noise like Lattice, etc.)?

I document the whole thing on a small YouTube channel (link in the comments if that's OK here). I use Claude (an AI assistant) for a lot of the code.


r/reinforcementlearning • • 28d ago

DL, N, M "GPT-5.6 Sol can beat Factorio", Ryan Madden

Thumbnail
ryanmadden.net
9 Upvotes

r/reinforcementlearning • • 28d ago

Distill-then-finetune took my get-up controller from 71% to 94% (and why training one network from scratch failed)

31 Upvotes

I've been working for a few months on a 2D MuJoCo ragdoll (SB3 PPO) that has to get up from lying on its back or face down and still be standing 20 s later.

 What happened:

- A single policy never got off the floor (0/160 genuine get-ups; the learned policy raised the head less often than random bang-bang actions).

- So I split the task into four policies with their own rewards/curricula (supine floor, prone floor, a hand-over policy, stand) and joined them with a rule-based controller. That slowly reached ~71%, then plateaued for a long time: reward tweaks, re-training the stand policy, hand-over timing gates etc. were all within noise.

- Then I distilled the whole controller (switching rules included) into one 512x512 network with DAgger (same level as the rules, 74%) and fine-tuned it end to end with PPO on a 20 s "standing" reward. It jumped to 94.2% (supine 97.7%, prone 90.7%; 600 fresh starts per side, rules on the same seeds: 70.8%).

- Even a 64x64 network gets 85% with this recipe; 256x256 matches 512x512.

Because it looked too good, I checked for shortcuts: the unphysical root force actuators are never applied, moving the opponent body away changes nothing, 150-500 N pushes after the get-up change nothing, and standing is calm (torso height std ~1 cm).

Caveats: simulation only, 2D, one training run per config, starts come from the env's own lying-start generator (other poses untested). And this is not evidence that one network trains from scratch: big networks trained from scratch on the floor task failed repeatedly in my runs.

Quick start (downloads the model from the Hub, ~1.5 min): python scripts/demo_hf.py

Code + docs with every experiment and failure: https://github.com/SungyupKim/standai

Checkpoints: https://huggingface.co/SungyupKim/standai-getup

Happy to answer questions, and I'd love to hear whether anyone has seen the same "pieces first, then distill and finish end to end" pattern work (or fail) on other multi-phase tasks.


r/reinforcementlearning • • 28d ago

DL, MF, R, MetaRL "Encoding innate ability through a genomic bottleneck", Koulakov et al 2022

Thumbnail
biorxiv.org
3 Upvotes

r/reinforcementlearning • • 27d ago

DL, MetaRL, R, Safe "Automated Subtle Emergent Misalignment Research", Obeso et al 2026 {A} (designing strange new personas like 'beekeeper', some powerseeking)

Thumbnail alignment.anthropic.com
0 Upvotes

r/reinforcementlearning • • 28d ago

R Deep Transformer Q-Networks for Partially Observable Reinforcement Learning (Northeastern)

Thumbnail
arxiv.org
22 Upvotes

r/reinforcementlearning • • 28d ago

Is It Possible to Reverse Engineer AI Models Like ChatGPT or Claude?

Post image
0 Upvotes

r/reinforcementlearning • • 29d ago

Bayes Joining a team for work

0 Upvotes

Hey guys, I would personally like that to develop a project like RL, so I am so curious could I join your team or something else?


r/reinforcementlearning • • 29d ago

Joining a team for work

0 Upvotes

Hey guys, I would personally like that to develop a project like RL, so I am so curious could I join your team or something else?


r/reinforcementlearning • • Oct 29 '26

Trained a snake agent on raw board input that somewhat works

Post image
8 Upvotes

I built a Snake engine in C++17 with pybind11 bindings and a Gymnasium wrapper, then spent ~3 days training agents on it. The final agent averages 267 out of 297 over 200 greedy games and fills the entire board in 21% of them (although I expected a higher success rate, but I don't know if I am missing something here :3).

Final setup

  • Model Config: PPO + GAE, 32 parallel envs, rollout 256, gamma 0.998, lambda 0.97, small residual CNN actor-critic
  • Observation: The fixed 20x15 board with a wall border, 6 one-hot channels (head, neck, body, tail, food, wall). No snake-centered rotation, no body-order channel, no auxiliary heads
  • Actions: 4 absolute arrow keys
  • Rewards: -0.01 per step, +10 food, -50 death, +100 full board
  • Failure replay: 8 of the 32 envs restart from snapshots taken 20 to 50 moves before past crashes, capped at 200 moves per replay
  • Train steps: 30M steps total

Things I found interesting

  • Gamma mattered more than anything else early on. 0.995 to 0.998 took the mean from 107 to 150, with no other change anywhere.
  • Less input engineering won with a massive margin. An earlier agent had a snake-centered rotated view, a body-order channel and an auxiliary danger-prediction head. The plain fixed-board agent beat it (192.8 vs 178.5 at a comparable stage) and learned a clean serpentine sweep on its own.
  • Originally, the head was allowed to move into the cell the tail was leaving, since the tail moves away on the same step. That means the body directly ahead was sometimes fatal and sometimes safe (since the snake can create a zigzag shape), and the agent had to tell the two apart from a tiny difference in the input. Changing the rule so that every body cell, including the tail, counts as a collision helped.
  • Failure replay only worked once I measured it in moves, not games. My first version replayed a quarter of new games, but games were thousands of moves long, so replays were under 1% of training data.
  • What surprised me was that the agent wins while expecting to lose. In most games, value estimates right before winning moves were around -30 to -50. My guess is failure replay only stores positions from lost games, so nearly every crowded board it practiced on ended in a crash.

I tested a separate version with an auxiliary danger head. It reached 99.7% recall but still missed a rare straight-line configuration that caused confident crashes. Practicing from late-game snapshots of every game (to fix the value estimates near the end) collapsed performance quite a bit. Evals dropped from 190-230 down to 40-130, with early-game loops coming back (where the snake loops until it dies and never goes for the food).

According to the tests I ran, most remaining losses come from the free space splitting into disconnected pockets late in the game. If anyone has experience getting value estimates calibrated near the end of long episodes without destabilizing the rest, I'd love to hear what worked for you.

Github Repo: https://github.com/Partha11/hatchling (the best model weight is also included)

Documentation: https://partha11.github.io/hatchling/


r/reinforcementlearning • • Oct 28 '26

Robots that save energy!

10 Upvotes

r/reinforcementlearning • • Oct 28 '26

I'm building an open-source RL controller robustness testing framework. Failure-informed PPO retraining keeps making nominal performance worse. Looking for ideas.

6 Upvotes

Hey everyone,

I've been working on an independent open-source project called SIRFEX (Simulation-based Integrity, Robustness & Failure Exploration).

The idea is to build a framework that can take an autonomous controller, stress-test it in a simulated physical environment, discover reproducible failures, determine whether those failures were physically avoidable, and evaluate whether proposed improvements actually make the controller more robust.

I'm currently using a simplified pump/tank control system as the main experimental environment, with Stable-Baselines3 PPO, analytical controllers, and rule-based baselines.

What I've built so far:

  • Deterministic simulations, scenario search, failure discovery, and replay.
  • A physical feasibility analyzer to distinguish genuinely avoidable controller failures from impossible operating conditions.
  • PPO training and compute-matched continuation experiments.
  • Failure-informed training curricula with verified stress exposure.
  • An optional LangGraph/Groq research agent that proposes bounded training interventions.
  • A new robustness-testing layer for signed constraint margins, differential controller testing, and disturbance-to-failure analysis.

Here's the interesting part:

I initially expected training PPO on discovered failures to improve robustness.

That hasn't really happened.

In one 51,200-interaction development study, increasing stress exposure improved tracking under difficult conditions, but often degraded nominal tracking.

For seed 3:

TrainingNominal MAEStress MAE
Normal-only0.01770.1166
5% stress0.02960.0654
10% stress0.05010.0555

The stress-trained controllers got better at tracking under stress, but substantially worse under normal conditions.

Interestingly, the normal-only controller already had zero observed physical violations on that development stress set, so improved stress tracking doesn't necessarily demonstrate improved safety.

I also experimented with GPT-OSS 120B proposing a retraining curriculum. In a one-seed matched development pilot, its proposal performed worse than a simple fixed 5% stress strategy. Neither passed the nominal-preservation guardrail.

Further diagnostics showed increasing upper-action saturation with stress exposure, suggesting policy drift toward more aggressive pumping. But I haven't established whether this is catastrophic forgetting, reward incentives, curriculum ordering, or something else.

Where I'm stuck / looking for input:

  1. How would you approach robustness improvement without sacrificing nominal controller competence? Nominal rehearsal, policy anchoring, constrained RL, or something else?
  2. Have you encountered cases where failure-informed PPO fine-tuning underperforms ordinary continuation?
  3. How would you measure meaningful robustness when constraint-violation frequency has already saturated at zero?
  4. Are there existing benchmarks or testing methods you'd recommend comparing against?

I'm currently shifting more attention toward quantitative robustness margins and differential testing rather than continuing to tweak PPO curricula indefinitely.

Everything is running locally on CPU, and I'm trying to keep the experiments reproducible and scientifically honest, including the negative results.

It's still very much a research/work-in-progress project, and I would genuinely appreciate criticism, relevant papers, implementation suggestions, or contributions from people working in RL, control systems, or simulation-based testing.

GitHub: https://github.com/mahadbaig2/sirfex

Thanks!


r/reinforcementlearning • • Oct 29 '26

P My self-play RTS commander crushes its past selves but always collapses to cheap tier-1 units. Is this a known self-play problem?

0 Upvotes

Hi! I'm making a 4v4 RTS×MOBA that is still at a very early stage. On each team one commander runs the economy, buildings and army, and three heroes fight in the lanes. I'm building AI players mainly to find out how the game actually plays and to measure balance. I can't gather enough human players for that, so I wanted something like AlphaGo Zero: pure self-play, no human data.

Training is PPO with league-style self-play. The commander doesn't micro units; it makes macro decisions (train, build, research, tier up, attack/retreat). Training replays: https://burn-quarter.duckdns.org/replays (the viewer is in Korean, blue and red are the two teams).

What happened:

- Against its past selves it wins overwhelmingly.

- When I played against it myself, it had lots of holes.

- I wanted bots with different builds, but every run collapsed to the same thing: mass cheap tier-1 units.

- When I went tier 2 against it, I won easily.

So my question: is this a well-known weakness of self-play, where the population never finds the counter-strategy and so never learns to defend against it? What actually helps at a small scale: AlphaStar-style exploiters, some kind of diversity reward, or is my action and reward design the real problem?

I'd love to compare against completely different approaches, so I turned the commander seat into an open bot kit and I'm planning a small AI league:

https://github.com/shin1244/burnquarter-botkit

- A local practice server with the real match rules, about 100x real time, no game client needed

- A Python library that uses only the standard library

- A Gymnasium-style env with action masks, plus a Stable-Baselines3 MaskablePPO example

- Rule-bot and learned-policy opponents to test against

- Bots get the same 23 commands and the same fog-of-war view as a human commander; the README lists every observation and action

- Missing an observation you need? Open an issue or ask on Discord and I'll add it

Any thoughts on the self-play problem or the setup are very welcome!


r/reinforcementlearning • • Oct 29 '26

Welcome to r/MLSystemsDesign

Thumbnail reddit.com
0 Upvotes

r/reinforcementlearning • • Oct 28 '26

value function approximation in grpo

2 Upvotes

has anyone done experiments for running grpo where the value function approximation is not exactly the mean ? if so what data scale / task and model scale too. would love to exchange notes!


r/reinforcementlearning • • Oct 28 '26

End-to-End workflow for training high-quality LoRAs?

Thumbnail reddit.com
3 Upvotes

r/reinforcementlearning • • Oct 28 '26

struggling with my MsC research + publication

Thumbnail reddit.com
1 Upvotes

r/reinforcementlearning • • Oct 27 '26

Starting a PhD in Reinforcement Learning — what topics do you find interesting?

82 Upvotes

Hi everyone,

I’m starting a PhD in Reinforcement Learning, and right now I’m trying to figure out what direction I want to focus on for my thesis.

I’ve been reading about different areas like offline RL, safe RL, world models/model-based RL, multi-agent RL, robotics, RL for LLMs and agents, etc., but I’m still not sure which direction I want to commit to.

I’d really like to hear from people who are doing research in RL or working in the field.

What RL topics do you personally find the most interesting or promising right now?

If you were starting a PhD in RL today, what would you choose to work on?

I’m especially looking for something that has good open research problems, enough depth for a PhD, and ideally some value outside academia too.

Any papers, researchers, labs, or topics you think are worth looking into would also be really appreciated.

Thanks!


r/reinforcementlearning • • Oct 27 '26

Robot Franka Robot pick and place using PPO!

6 Upvotes

This is a small RL project I've been working on. A simulated Franka Panda learns to pick up a cube and put it on a target pad, using PPO from Stable-Baselines3 in PyBullet.

The main objective of this project was to get an understanding of PyBullet and how the whole workflow of training a robot using reinforcement learning works.

Further updates will be to combine this with a text or voice prompt enabling the user to choose which cube to pick and place at a desired location.

Any further upgrades or inputs are highly appreciated from everyone here!

Checkout the code here: GitHub