r/reinforcementlearning • • 5h ago

P [Paper + code] Deployment-time plasticity in a compact recurrent RL agent, with pre-registered decision rules and the failures reported

35 Upvotes

We're a small team in Rawalpindi/Islamabad, Pakistan. We just released the code and data behind our paper "Deployment-Time Plasticity and Experience-Driven Memory in a Compact Recurrent Reinforcement Learner: An Empirical Study with Pre-Specified Decision Rules".

Repo: https://github.com/zOthix/mimi-brain4-paper

Setup

- The agent (libbrain4) is a compact recurrent learner in C, meta-trained, then evaluated on lives it has never seen. Each life is 12,000 steps, with 32 lives per task family.

- It has a failure memory: a fixed hash table keyed by rounded observations. It stores actions that failed in each place (no observation change, or negative reward through a fading trace) and leans the next action away from them. It is reset every life.

- Baselines: PPO, recurrent PPO and an RL2-style learner (Stable-Baselines3 / sb3-contrib), tuned with successive halving and trained to 77M steps.

- For a fair comparison, we ported the same failure memory to the baselines in Python, with a unit test checking that it matches the C header on recorded streams.

- Every experiment's pass/fail rule was committed before its first run. CPU evaluation is bit-identical on the same platform and build.

Results

- 10 held-out families, 10 meta-trained minds, 3 fresh seed blocks: mean 0.498 (95% CI 0.480 to 0.515). Best tuned baseline without memory: PPO, 0.0977. Best baseline with the same failure memory: PPO+memory, 0.271. Pass.

- 8 task families written blind to our results by a separate process and sealed before evaluation: agent 0.067 vs PPO 0.057. Pass, but narrow.

- DareFightingICE: pre-registered tests passed against PyThunder and ERHEA_PI. The other conditions were inconclusive.

- Omniglot 5-way 1-shot: 0.883 vs 0.963 for a prototypical network. Fail.

- XLand-MiniGrid: 3.66 vs 5.33 for RL2. Fail.

- A revised failure memory, tested as a follow-up and not pre-registered, improved the blind families from 0.063 to 0.118, but made no real difference on the held-out families (+0.0015).

Reproducing

- Every verdict can be re-read from the committed result files in minutes, with standard-library Python.

- A check of about 1 minute on 4 threads re-runs one mind's lives and diffs them against the published output.

- Not included (available on request): the baseline checkpoints (about 2 GB) and the end-of-fight minds.

Where we'd value critique

  1. Is the memory-wrapped PPO a fair enough baseline for the failure memory, or would you want something like an episodic-control baseline?
  2. The gap shrinks a lot on the blind families (0.067 vs 0.057). What would you read into that?
  3. Which public benchmark should come next? Atari 100k at 10 seeds is on our roadmap.

The code is under a non-commercial licence (free for research). If you want to support the compute: https://labs.khive.io/fund


r/reinforcementlearning • • 44m ago

Production ML Engineering Workshop: Deployment, Validation & Monitoring (Dec 5)

1 Upvotes

hey everyone, sharing this for people working on machine learning who are interested in the engineering challenges beyond model development.

developing a model is one thing. making sure the complete system can be reproduced, deployed and monitored reliably is another.

some important areas include:

  • reproducible training and inference workflows
  • validating incoming data
  • monitoring model performance
  • detecting distribution changes
  • managing deployment and model updates
  • building applications around trained models

Packt is hosting a hands-on Production ML Engineering workshop on December 5 covering these areas.

the practical tools include scikit-learn, XGBoost, LightGBM, CatBoost and Streamlit.

it's a live online session at 9:30 AM EST.

Full workshop details and registration

happy to answer questions about the workshop!


r/reinforcementlearning • • 9h ago

Robot Motubrain 2.0: From large-scale World Action Model pre-training to recursive self-improvement

2 Upvotes

motubrain 2.0 released its 20B World Action Model, trained on 2M hours of internet videos and 500K hours of embodied data.

they livestreamed 25 days of training, covering pre-training, post-training, agent development, and early experiments with RSI.

they also conducted over 10000 real-robot task trials and evaluated different model checkpoints on real robots.

model weights, code, data resources, processing tools, and training notes are now available.

some questions:

  • How much does large-scale video pre-training contribute to robot policy generalization?
  • How can robots use their own experience to improve their policies?
  • What are the main challenges in building a continuous self-improvement loop?

hope to discuss🙌

Technical blog: https://www.motubrain.cn/en/blog/motubrain-2/


r/reinforcementlearning • • 6h ago

We're opening up real industrial robot cells for 48 hours: cable insertion, assembly and inspection tasks, each with a dataset and a baseline to beat (Zurich, 11–13 Dec, free)

1 Upvotes

If you've wanted to see how your policy holds up on a real contact-rich task rather than in sim, this is a chance: each task has a dataset and a baseline policy to beat. From Fri 11 to Sun 13 Dec we're putting builders on real industrial cells at DARE Campus, Schlieren (10 min from Zurich HB) to work on contact-rich tasks: cable insertion, assembly, inspection.

What you get:

- a dataset collected on each task and a baseline policy to beat

- the Forgis codebase, with the engineers who wrote it on the floor with you

- every run recorded with force/torque ground truth; the runs become an open dataset and benchmark, released with a paper that credits every participant

- a 10K prize pool

Free, food covered (travel's on you), 18+. Apply solo or as a team of up to five; we complete the teams. Applications close Sun 6 Dec, rolling acceptance.

Details and the application: https://luma.com/oj617tvc?utm_source=reddit-rl&utm_campaign=hk-community

Happy to answer anything about the cells, the tasks or the data format below.


r/reinforcementlearning • • 10h ago

On-policy distillation vs. GRPO and SFT on Qwen3-0.6B (GSM8K): dense reverse KL vs. sparse reward & single-TPU constraints

2 Upvotes

Ran an empirical comparison of on-policy distillation (student generates rollouts, frozen teacher scores every token with per-token reverse KL log p_teacher - log p_student and zero discount) against GRPO and SFT on teacher samples over ~1M tokens each on a single Colab TPU v5e (15.75 GiB), using Qwen3-0.6B (student), Qwen3-1.7B (teacher), and Tunix 0.1.7 (JAX/Flax NNX, LoRA rank=16, alpha=32 across all 7 projections).

Why compare them side-by-side:

  • GRPO relies on sparse outcome rewards on student rollouts, which made stopping behavior and learning rate sensitivity immediately visible.
  • SFT trains off-policy on teacher completions, risking distribution mismatch when the student goes off-script.
  • On-policy distillation gives dense per-token signal on states the student actually visits without the teacher authoring the trajectories.

RL & training observations on GSM8K (1,312 test problems, 640-token cap, greedy eval with 95% bootstrap CIs vs. untrained Qwen3-0.6B at 65.5%**; teacher at** 82.0%**):**

  • Tight accuracy cluster: Across ~1M tokens, on-policy distillation across two seeds (66.9%, 68.1%), SFT warm-started distillation (67.3%), SFT (67.8%), filtered SFT (67.2%), and lr=3e-5 GRPO (68.0%) all landed within +1.4 to +2.6 points of the untrained student, with 95% intervals touching zero and a 1.2-point gap between identical distillation seeds.
  • KL went down while accuracy stayed flat: Mean per-token reverse KL dropped consistently from ~0.34 to 0.24 nats/token across seeds, so the student aligned closer to teacher token distributions/style than raw pass@1 gains reflected.
  • GRPO reward & LR traps: Rewarding only final boxed correctness led the model to stop emitting <|im_end|> and hit the token cap; requiring completion fixed stopping, while lr=1e-4 collapsed to a short-answer shortcut (36.9% pass@1) vs. 68.0% at lr=3e-5.
  • Sampling & memory gotchas: In Tunix 0.1.7, setting temperature=1.0 without top_p=1.0 still decoded greedily (zeroing rollout diversity for GRPO until top_p=1.0 and per-step seeds were set), and batch_size=32 with a 512-token KV cache (16,384 positions) fit cleanly while 32,768 positions hit decode memory limits.

Narrow setup (single model pair, GSM8K, ~1M tokens, mostly single seeds on a single TPU chip), so treat it as a practical single-chip check rather than a general claim.

Repo with code, configs, and logs: https://github.com/Brayanbrayan/on-policy-distillation


r/reinforcementlearning • • 1d ago

I built a tiny PPO agent to speedrun an RTS challenge

Thumbnail
youtu.be
2 Upvotes

Here’s how I did it: https://cyb3r17.substack.com/p/my-world-record-attempt

Feedback and suggestions welcome, I’m trying to get it to beat the human world record! 😊


r/reinforcementlearning • • 1d ago

What my Pokémon Gold agent learned and where it got stuck

1 Upvotes

Wanted to share some success I had with my first reinforcement learning project. My goal was to train a neural net to beat Pokémon Gold, inspired by a similar project from Peter Whidden.

Video · Code and logs


r/reinforcementlearning • • 1d ago

Re-running the 10-armed bandit testbed: how much does epsilon matter? (numbers inside)

1 Upvotes

I wanted to reproduce the classic multi-armed bandit experiment from Sutton & Barto (Chapter 2) to see the effect of ε in ε-greedy with my own code, not just the figure from the book.

Setup: 2,000 independent bandit problems, 10 arms each. True action values are drawn from N(0,1), rewards are N(q*(a), 1). Sample-average value estimates, random tie-breaking, 1,000 steps per run. Everything is averaged over the 2,000 problems. NumPy 2.5.3.

greedy = np.where(Q == Q.max(1, keepdims=True),
                  rng.random((runs, k)), -1).argmax(1)     # random tie-break
explore = rng.random(runs) < eps
a = np.where(explore, rng.integers(0, k, runs), greedy)
r = rng.normal(q_true[idx, a], 1.0)
N[idx, a] += 1
Q[idx, a] += (r - Q[idx, a]) / N[idx, a]                    # sample average

Results:

eps=0.0   first 100 steps: 0.948 | last 100 steps: 1.022 | optimal action (last 100): 34.7%
eps=0.01  first 100 steps: 0.972 | last 100 steps: 1.292 | optimal action (last 100): 58.4%
eps=0.1   first 100 steps: 1.005 | last 100 steps: 1.367 | optimal action (last 100): 80.0%

What I take from it:

  • Pure greedy gets stuck. It picks the best-looking arm after a few noisy samples and mostly stays there, so it ends up choosing the true best arm only about 35% of the time.
  • ε=0.01 is slower to learn but would catch up given more steps. At step 1,000 it's at 58%, still improving.
  • ε=0.1 learns faster here, but will always explore 10% of the time, so with enough steps its optimal-action rate would be capped near 91% (90% greedy plus a share of random picks that happen to be optimal), while smaller ε could eventually do better. I haven't run longer horizons to confirm that.
  • This depends on the setup: stationary arms, Gaussian rewards, sample averages. In a non-stationary problem, or with a constant step size, things change.

I haven't tried optimistic initial values, UCB or a decaying ε, which the book also covers.

If anyone has suggestions: which of those would you compare next, and is there something about this testbed that tends to mislead beginners (like the average hiding the variance between runs)?


r/reinforcementlearning • • 2d ago

Psych Looking for people with experience in alignement to take a look at my model spec

1 Upvotes

I'm a psychotherapist exploring how clinical psychology can contribute to alignement. And I wrote a paper about where values come from. It ends with an arm training four-arm training experiment to see if alignment improves. Tbh, I'm not confident about the design in its current state so I'd love to have the input of experts from the field. We can talk in Dms or we can have a 30 minute call. I'll pay you for your time. Thank you!


r/reinforcementlearning • • 1d ago

Local AI Model Plays Super Mario Bros. (NES)

Post image
0 Upvotes

I was bored this weekend, so I vibe-coded an app to watch AI play Super Mario Bros. I first made the application in Claude Code. For now, it uses a local LLM model with Ollama (QWEN3.6). I need to experiment with more models.
I coded this over the weekend, let it run on its own at first, then spruced up the interface and used some other knowledge to make this emulator. Currently only for Mac, but I am building a Windows/Linux version soon. *I am sure there are others out there, but I can't find anyone who has done this.

Check out my project and love some feedback to make this more EPIC! Zelda is next.

https://github.com/thededman/ai-plays-mario


r/reinforcementlearning • • 2d ago

DL, M, Robot, R GPT-6 Astra on robotic manipulation

Thumbnail
openai.robocurve.org
6 Upvotes

r/reinforcementlearning • • 2d ago

DL, D, M, Robot, MetaRL "The End of Robot Learning and the Last Research Agenda", Kyle Vedder 2026-11

Thumbnail
vedder.io
7 Upvotes

r/reinforcementlearning • • 2d ago

DL [P] Chasing the Shadow of SAI: Stabilizing Muon Optimizer & Hybrid Transformers in AlphaZero Self-Play (9x9 Go)

3 Upvotes

GitHub Repo & Full Logs: https://github.com/MAOmao000/Sayuri-TensorRT

I ran a series of 8 single-GPU experiments extending the open-source Sayuri Go engine with Muon, Hybrid ResNet-Transformer blocks, and Gumbel AlphaZero to see if a compact model (`b6xc128h32`) could match the larger `SAI b8c160` baseline in 9x9 Go.

**Key Takeaways:**

- **Result:** Reached 52.25% point win rate (+16 Elo over 200 games) against `SAI b8c160` in 310K steps (~400K self-play games) without warm restarts.

- **Head-Split Muon:** Splitting attention projections by `head_dim=32` prior to Newton-Schulz orthogonalization was critical for parameter efficiency.

- **Preventing RL Mode Collapse:** Mixing 3 distinct MCTS worker personalities (Balance, Offense, Defense) kept exploration entropy alive and prevented draw-overfitting.

- **SWA & Cosine Cycle Trap:** Terminating SWA strictly before the cosine annealing cycle reset avoided a -50 Elo drop caused by post-reset LR spikes.

- **Loss–Strength Paradox:** Lowest self-play training loss did not equal highest Elo when rule/komi distributions were narrowed.

All training configs, loss curves, and evaluation logs are documented in the repo. Feedback and thoughts on RL + Muon stability are very welcome!


r/reinforcementlearning • • 2d ago

[WIP] Adaptive Kp/Kd gain tuning across 4 RL architectures (MLP vs. LTC/CfC vs. SANE vs. early GraphMamba) in 100% JAX + MuJoCo MJX on a GTX 1650 (4 GB)

Post image
4 Upvotes

Early work-in-progress results from a Sim-to-Real two-wheeled self-balancing robot (Arduino + MPU-6050 + wheel encoders + 10 Hz Bluetooth). Instead of outputting raw torques, the RL policy adapts PD gains online at 10 Hz while the Arduino runs the inner loop — all trained with 800 parallel MJX envs on a single GTX 1650 (4 GB).

Hardware note: Initial zero-shot tests of MLP, LTC, and SANE on the physical robot already showed LTC and SANE stabilizing and controlling the robot well, while the symmetric MLP struggled. All policies still need further curriculum stages, refinement, and controlled physical disturbance tests.

Any thoughts on log_std control in logit-mapped action spaces or GNN+SSM / Liquid policies for Sim-to-Real control?


r/reinforcementlearning • • 2d ago

GPT-6 Astra on robotic manipulation

Thumbnail
openai.robocurve.org
1 Upvotes

r/reinforcementlearning • • 3d ago

Network structures for RL: are Transformers SOTA/the new standard?

10 Upvotes

In recent competitions I saw that many people use Transformers or many attention layers as their ANN structure. I wonder if I missed that they are now the best approach or is it just a trend? Are MLP + LSTM still good enough? I didn't find a paper showing that attention layers are generally better.


r/reinforcementlearning • • 2d ago

DL, M, Robot, N "Gemini-4 Argon: Built to solve your hardest problems § Speeding up robotics development", Koray Kavukcuoglu 2026-10-13

Thumbnail
blog.google
1 Upvotes

r/reinforcementlearning • • 3d ago

Safe Success rate plummets from 98.2% to 0.2%! 360 × Peking University expose the "score gaming" reality of safety training | ACL'26

3 Upvotes

What happened: The 360 AI Brain team and Peking University's Yang Tong team, through the PKU-360 Large Model Joint Lab, proposed TriPlay-RL, which puts attacker, defender, and evaluator into one reinforcement learning loop.

Why it matters: The authors argue that a high attack success rate on a single target can reflect repeated templates rather than real capability, and that training the evaluator alongside attack and defense keeps safety training supplied with new challenges and feedback.

https://stockduty.xyz/s/162b6e

https://arxiv.org/pdf/2601.18292


r/reinforcementlearning • • 3d ago

Link AI learns to cheese dark link

8 Upvotes

Part of my recent experiments. I woke up to a sudden upward trend of him winning, turns out he found an optimal strategy lol.
Some details, i only use the screen video as the observation, reward for hits and winning, punish for timeout, taking hits, and death.
https://github.com/tomorroisnew/mupen-env


r/reinforcementlearning • • 3d ago

3-on-3 Soccer with AI

3 Upvotes

I’ve been building a 2D soccer sim, and I’d like to play against bots built by other people. I’ve spent enough evenings making my own bots play each other.

Here’s the problem I keep running into. My positional bot can pass, move into space, and receive the ball under pressure. But when I take a learned bot that can do those things and train it further in self-play, it starts keeping the ball longer and passing less. In full matches against the same opponent, it also does worse.

I want to see whether a bot that creates space and uses its teammates can make that work consistently against an opponent that presses and cuts off passing lanes.

Anyone up for building a bot and playing a series of full matches? Hand-coded or learned, either is fine. We can swap sides, compare scores, and share the replays. If your bot beats mine by pressing hard and kicking long, I want to see that replay too.

If you're interested, send me a private message, and I'll share my weights with you


r/reinforcementlearning • • 3d ago

Firm policy with ppo

1 Upvotes

Hi, I'm training a policy with PPO (rsl_rl) for a manipulation task.

The policy is able to learn how to complete the task, but it starts to fail if I require a stable and sustained condition. For example, if the goal is to move an object to a specific position and keep it there for 10 seconds, the policy is able to learn that but it's very shaky. I've also tried to add a big penalty on actions/acceleration but still it's not really achieving the desired results.


r/reinforcementlearning • • 3d ago

Messing with Mujoco & a Biped

1 Upvotes

Hello,
I spent my weekend writing up a simulator & PPO policy for a 8 DOF bipedal robot (6DOF legs, 2DOF wheels). It's written in Python using MuJoco & PyTorch. Here is a video of an example run, it tends to drive away in a circular fashion (kinda reminds me of an exaggerated 3D LIPM falling trajectory but more so due to wheels). Any advice?

The actor network is a 34 - 64 - 64 - 8 tanh architecture. 34 observation states, 8 action outputs. The critic network is a 34 - 64 - 64- 1 tanh architecture as well. The state space is the gravity vector (ref. base frame), base linear velocity (3), base angular velocity (3), leg joint positions (6), leg joint velocities (6), wheel angular velocities (2), previous action state (8). The reward structure is a little funky and is attached below in the code snippet below:

        r_upright = (
            -5.0 * tilt + 3.0 * math.exp(-12.0 * tilt))
        r_motion = (
            -1 * (vx**2 + vy**2)
            -0.15 * vz**2
            -0.5 * (wx**2 + wy**2)
            -2 * wz**2
        )
        symmetry_error = (
            # (left_hip_roll + right_hip_roll) ** 2 +
            (left_hip_pitch - right_hip_pitch) ** 2 +
            (left_knee - right_knee) ** 2 +
            (left_wheel_vel - right_wheel_vel) ** 2
        )
        r_symmetry = -2 * symmetry_error
        knee_bend = 0.5 * (
            abs(left_knee) +
            abs(right_knee)
        )
        r_crouch = 0.30 * tilt * knee_bend
        # State from previous step
        avg_vel = 0.5 * (left_wheel_vel + right_wheel_vel)
        prev_avg_vel = self.prev_avg_vel
        # Encourage synchronized wheels
        sync_reward = math.exp(-(left_wheel_vel - right_wheel_vel)**2 / 2.0)
        # Encourage sign changes (oscillation)
        osc_reward = 2.0 if avg_vel * prev_avg_vel < 0 else -2
        # Damping
        energy_penalty = 0.01 * (left_wheel_vel**2 + right_wheel_vel**2)
        r_wheel = (
            5 * sync_reward
            + 2 * osc_reward
            - energy_penalty
        )
        self.prev_avg_vel = avg_vel
        stable_factor = math.exp(-15.0 * tilt)
        r_leg_motion = -0.00 * stable_factor * leg_motion
        r_ctrl = -1e-5 * ctrl_effort
        r_smooth = -0.01 * float(
            np.sum((action - prev_action) ** 2)
        )

https://github.com/rithvikpillai/companion

Footnotes:

Post & replies written by human author.

Code directed by human, written by 2 agents: MS Copilot for architectural troubleshooting and nvidia-nim/nvidia/nemotron-3-ultra-550b-a55b for code writing & minor bug fixes.


r/reinforcementlearning • • 3d ago

I trained a PPO agent to land SpaceX's Starship on Mars

0 Upvotes

I created a custom 2D simulation where a PPO agent learns to land Starship on Mars through trial and error.

I wanted to visualize the learning process, from the initial crashes to successful landings.

For absolutely no scientific reason, I gave the entire simulation a Cuphead-inspired art style.

Full experiment: https://youtu.be/cI2NyXshdwo

The video is in Italian, but mostly visual.

Feedback on the simulation and training approach is welcome!


r/reinforcementlearning • • 4d ago

Reward bugs in coding-RL graders: a wrong answer gets reward 1 on Terminal-Bench 2, and a conftest.py hack passes SWE-bench Verified

1 Upvotes

If you use benchmark tests as an RL reward, a test that accepts a wrong answer is a reward bug, and a policy will find it.

Two I found and filed this week:

  1. Terminal-Bench 2, constraints-scheduling (https://github.com/harbor-framework/terminal-bench-2/issues/107). Two of three tests read the first DTSTART in the output file, not the scheduled meeting. Put a decoy event at the right time first and book the real meeting at a clashing slot: 3/3 tests, reward 1, in the official image.
  2. SWE-bench Verified (https://github.com/SWE-bench/SWE-bench/issues/733). With the official harness, a patch that only adds a root conftest.py hooking pytest_runtest_makereport to mark every test passed is graded resolved in 4 repos (pytest, sphinx, scikit-learn, xarray). That's the classic reward hack, and it gets past the exit-code check added for the earlier report #631 because pytest exits 0. Separately, wrong or incomplete patches graded resolved on 9 instances.

I built Aethens (Apache-2.0, v0.1.0 out now) to check this kind of thing before training. It runs a task's tests in Docker against the gold, labelled-wrong answers, mutants of the gold, and reward-hack probes (exit-zero, atexit, framework patching, sitecustomize, always-equal objects, lookup tables of visible answers). Every finding has a one-line repro. No LLM judge.

Limits: Python tasks in its own format only. The TB2 and SWE-bench converters I used aren't released yet. It doesn't probe conftest.py hooks yet; that's next. On its own planted-defect bench (34 tasks) it scores precision 1.0, recall 1.0 (20/20) and 116/116 reward-hack probes, which only shows it catches what I planted. On HumanEval judged by HumanEval+, the mutation check's precision is 0.8158 (31/38).

pipx install aethens · https://github.com/beastrog/aethens/

If you train on coding environments: which reward hacks have you seen policies find that a tool like this wouldn't probe?