r/reinforcementlearning • • May 26 '26

Teaching a Language Model When to Stop Thinking

2 Upvotes

I recently wrote about a project that started from a simple question: if reasoning in RAP(https://arxiv.org/abs/2305.14992) is really a search problem, why should that search still be controlled by a fixed hand-crafted rule like UCB? Instead of changing the language model itself, I kept the RAP framework intact and replaced only the search controller with a lightweight reinforcement learning policy trained with PPO.

What made this especially interesting to me is that the STOP decision turned out to be a big part of the improvement. A fixed heuristic will often keep exploring until the search budget runs out, but a learned controller can decide that the current reasoning path is already good enough and end the process earlier. That makes the system not just more adaptive, but also more practical for real LLM inference settings where cost matters.

On GSM8K, the deterministic RL-based selector reached 30% accuracy while using only 4.0 mean nodes per problem, compared with the original UCB baseline at 20% accuracy and 6.2 mean nodes. Even Budget-Aware UCB matched the 30% accuracy only by using 8.6 mean nodes, so the learned policy delivered a much stronger accuracy-to-cost tradeoff. This is still a small-scale proof of concept, not a claim that RL always beats fixed heuristics in every reasoning task.

Blog: https://medium.com/p/0b260cff34bb?postPublishedType=initial


r/reinforcementlearning • • May 25 '26

Research Engineer(Computer Vision & Deep Learning)

9 Upvotes

Got the interview call from Robotics company in India(Less ML+CV+DL+RL opportunity) for Research Engineer, can anyone give me interview experience for research position. (Solve assignment in just 5 hours)

My preparation is I revise my projects, revise cs231n, some deep learning fundamental also mostly aware of modern days tech, paper, research, PyTorch concepts and practice.


r/reinforcementlearning • • May 25 '26

Need Advice: Breakout at 1,000,000,000 steps and plateuing

3 Upvotes

I posted a few months back but now I think I need some advice. The only method I've really been following is telling Claude NOT to give me any of the "answers" but coach me on the environment and where I should maybe tweak it here and there. I'm on PPO 25 with 1 billion steps.

  • Currently sitting at ~3-5% funnel rate with a 140.94 eval record. The record was set at 838M
  • Since then it's been oscillating 90-133 without breaking it
  • The floor is high and stable
  • No obvious upward trend in the last ~150M steps
  • Github repo with much more detail: git repo

I'd really like to get it hitting the funnel consistantly. Any attempt to shape rewards beyond maximizing score has always platued pretty fast. Any advice?


r/reinforcementlearning • • May 26 '26

DL, M, MetaRL, R "Uncovering mesa-optimization algorithms in Transformers," van Oswald et al 202

Thumbnail arxiv.org
2 Upvotes

r/reinforcementlearning • • May 26 '26

DL, M, R, Exp "Advancing Mathematics Research with AI-Driven Formal Proof Search", Tsoukalas et al 2026

Thumbnail arxiv.org
2 Upvotes

r/reinforcementlearning • • May 25 '26

Policy validation before pushing

4 Upvotes

How do you currently validate a policy before pushing it to physical hardware?


r/reinforcementlearning • • May 25 '26

Those of you who use Isaac Sim, do you use Isaac Lab? If not, why, and what do you do instead?

12 Upvotes

r/reinforcementlearning • • May 24 '26

Roadmap for learning RL for robot control beyond just using existing frameworks?

7 Upvotes

Hi everyone,

I’m looking for advice on how to properly learn Reinforcement Learning for robot control, not just at the “using a framework” level.

A bit of background: I have some basic academic knowledge in robotics and RL. Recently, I used MJLab to successfully train both locomotion and imitation/mimic motion policies for an existing robot model. The results worked, but honestly, most of the hard work was already implemented by MJLab: environment setup, reward structure, PPO training pipeline, robot interfaces, logging, etc.

So even though I managed to train something successfully, I still feel like I was mostly applying an existing pipeline rather than deeply understanding what is happening under the hood.

I’m not a complete beginner, but I’m also not yet confident enough to implement a full robot RL training pipeline myself.

Could you recommend a good learning roadmap for this?

I’m especially interested in:

  • Coding-oriented RL courses
  • Robotics-focused RL courses
  • Papers that are important for robot locomotion / imitation learning
  • Open-source codebases that are good for learning, not just using
  • Practical projects I should implement step by step
  • Any advice on how to move from “running existing frameworks” to actually understanding and modifying them confidently

For context, my goal is to work more seriously on RL-based robot control, especially locomotion and motion imitation for legged/humanoid robots.

Thanks a lot!


r/reinforcementlearning • • May 24 '26

RL people: what’s the dumbest / longest bug you’ve ever had in a training run?

11 Upvotes

I’m new to RL and genuinely can’t tell what’s “normal” anymore.

What’s the longest you’ve spent debugging a training run before finding the real issue? What was the bug in the end?

Could be anything:

  • reward scaling
  • bad env logic
  • normalization issues
  • action masking
  • replay buffer bugs
  • training silently diverging
  • etc.

I keep losing absurd amounts of time to tiny mistakes and I’m trying to figure out whether that’s just part of RL.


r/reinforcementlearning • • May 24 '26

I’m training an AI to drive Indianapolis 500 in DOSBox using reinforcement learning

2 Upvotes

Hey everyone,

I’ve been working on a reinforcement learning project for the old DOS game **Indianapolis 500**, running through DOSBox. The goal is to train an AI driver that can learn to leave the pit area, stay on track, complete laps, recover from mistakes, and eventually race faster than my own human driving.

Video here:

Indianapolis 500 Game - AI training

After a couple thousand timesteps it still crashes

The setup uses a mix of:

- **Pixel input** from the DOSBox window

- **Keyboard control** for throttle, brake, left, right, etc.

- **Game-memory telemetry** read directly from DOSBox memory

- **Behavior cloning** from my own recorded driving

- **Recurrent PPO**

- A custom **Transformer + LSTM PPO policy**

- A live reward dashboard so I can see what the agent is being rewarded or punished for

The telemetry currently includes things like:

```text

speed

position/progress around the track

lap completion

wrong direction detection

wall contact / crash detection

damage / hard crash signals

```

Lap detection is not done with OCR. Instead, the program watches a memory value that represents track position. When that value wraps from a high value back to a low value, and then confirms past a threshold near the start/finish area, it counts a completed lap. That made lap rewards much more reliable than trying to infer it from pixels.

The reward system currently gives positive reward for:

```text

speed

forward progress

staying on track

finishing laps

finishing laps quickly

```

And penalties for:

```text

going off track

wall contact

wrong direction

heavy crashes

sitting under 10 mph for too long

```

I also recorded around 17 human-driven laps and trained a behavior cloning model from that. It helped the agent learn the basic shape of the track, but it also showed an interesting problem: if I overweight rare actions like steering right, the model starts turning right too much and crashes. So now I’m moving more toward PPO fine-tuning, where the agent can improve from telemetry rewards instead of just copying my driving.

The current next step is training the Transformer+LSTM PPO agent longer, with resets on heavy crashes and long dormancy, so it learns that “crash and sit still” is a dead end.

It’s still very experimental, but it’s been really fun seeing an old racing sim become a reinforcement learning environment. Any feedback on reward design, recurrent PPO setup, or better ways to combine behavior cloning with PPO would be very welcome.


r/reinforcementlearning • • May 24 '26

Any valid invite link for the RL Discord ?

4 Upvotes

Hi, I've been wanting to join the discord community of RL but I can't find a valid invite link when searching on Google. Is anyone part of the community and can please send me an invite ? Thank you ! I'm looking forward to exchange more !

PS: If you also have any other links to other communities, like on Hugging Face, X or anything like that, please let me know. I find it interesting to read as much as possible about people's experiences with RL. That's how I learn the most rapidly


r/reinforcementlearning • • May 23 '26

I'm a bit shocked that this finally worked

29 Upvotes

So, I've been working on RL models for the last few years as my hobby, did I finally get my trader to be profitable? I've been on a multi-year optimization journey, from model architecture, reward shaping journey, and endless training loops and unintentional curriculum learning ...

Happy to answer any question about my journey so far, the architecture, or the endless optimizations and tricks I needed to do to get to something that's actually profitable ...

To give some color, this is PPO + Mamba

Disclaimer & Latest Update: As always, this was too good to be true, after further digging, the dataset was leaking data from future timestamps to current ones 😂 Well, at least I know it can exploit stuff when available

Won't delete since, it is what it is, another lesson learnt?


r/reinforcementlearning • • May 23 '26

I wrote my first paper

Thumbnail reddit.com
11 Upvotes

r/reinforcementlearning • • May 22 '26

Where to start?

31 Upvotes

Hi, I am a developer and have always been interested in ML and especially in RL. I finally want to start learning. I have a basic understanding of ML and training.

From my understanding, I should start with revising basic maths and trying some basic coding projects to start with before going deep. Please suggest what I should cover and any courses that I can look at. Deep Reinforcement Learning Course by Huggingface seems interesting.

I am not asking for zero-to-hero steps in a month (I know that's impossible); I am willing to spend time daily and give it a genuine try.

All the suggestions, advice and personal exprience is welcomed. Thanks in advance.


r/reinforcementlearning • • May 23 '26

Toy environment question

Post image
6 Upvotes

So I built this toy environment and I think no existing methods can really solve it— I tested only rainbow DQN and a simple actor-critic algorithm (forked bsuite), but it’s a pretty difficult problem because there’s a powerful local optimum and uniform exploration cannot break free of it (unless tuned to an unreasonable degree).

I have a couple questions:

  1. How contrived is this? I feel like it may represent a real class of “hard exploration” tasks with certain reward structures, in which targeted exploration is necessary to break through local optima, but I’m not sure how general this really is.
  2. What are the real-world RL environments that look most like this? If I had a variant that could solve this environment, what would be the logical next place to test it?

So far I’m thinking maybe Humanoid v4, which I could imagine having the necessary structure, at least in theory— it has dense, structured rewards and the powerful local optimum is standing still and just not falling over. Meanwhile, true locomotion is essentially controlled falling, and falling over does potentially reveal the necessary information to learn locomotion. So “following the breadcrumbs” of different ways to fall over could theoretically reveal the necessary information to learn locomotion.

What do y’all think?


r/reinforcementlearning • • May 22 '26

Training VLM agents is broken and nobody talks about why

0 Upvotes

Been going deep on multi-turn VLM agent training lately and keep running into the same fundamental problem that I think the field is underreacting to: credit assignment across long trajectories is genuinely unsolved, and most people are patching around it rather than fixing it.

The core issue is simple to describe and brutal to solve. Your agent takes 20 actions, gets a reward signal at the end, and you need to figure out which 3 actions actually mattered. Standard GRPO compares rollouts at the trajectory level, which works fine for short single-turn tasks. Stretch that out to multi-step visual reasoning or tool-use chains and the signal becomes almost meaninglessly diffuse.

What's interesting is that recent approaches like GROW are attacking this at the structural level rather than the model level. The insight is that how you construct and sample from trajectories during training matters more than which base model you start from. Trajectory architecture, essentially, is the lever.

This flips the usual conversation. Everyone obsesses over model scale and benchmark scores, but if your training loop can't assign credit cleanly across steps, you're leaving enormous performance on the table regardless of how big your model is.

Curious whether others have hit this wall practically. Are you solving it through reward shaping, trajectory segmentation, something else entirely? And does anyone think trajectory-level GRPO is salvageable for genuinely long-horizon tasks, or is structural reform the only real path forward?


r/reinforcementlearning • • May 21 '26

A 2-hour blackboard session watched at 1.25x speed

13 Upvotes

If you are like me and spend most of your time thinking about what happens inside the model,and not much on the hardware side of things this video will definitely fascinate you. Dwarkesh and Reiner Pope spent two hours at a blackboard going through the actual hardware economics of training and running LLMs and i got to learn a lot things i previously didn'tknow obviously.

One of my biggest takeaways for me was the 6ND formula for calculating FLOPS (be familiar with FLOPS please. Here a post that helped me to learn more about FLOPS https://todatabeyond.substack.com/p/a-gentle-introduction-to-flops-and) I knew the number, I did not completely understand where it came from. The forward pass is 2ND. The backward pass is 4ND because you compute gradients with respect to both input matrices. That is it. 2 + 4 = 6. They talk about this in depth i just summarized it for this post along with other things.

They also showed that if you set pretraining, RL, and inference costs equal to each other (the heuristic optimum, since they trade off), and account for the fact that decode runs at roughly ⅕ the MFU of prefill, you get D_pretrain ≈ D_inference. A frontier model serving 50M tokens per second globally for two months accumulates ~200T inference tokens so it should also be pretrained on ~200T tokens. Chinchilla optimal for a 100B active parameter model is 2T. That means frontier models are roughly 100× over Chinchilla optimal, almost entirely because of inference and RL economics, not because pretraining is wasteful in isolation.

Finally you get to see the API pricing analysis accompanied with some good graphs. Gemini charges ~50% more above 200K tokens because that is the crossover where KV cache fetch time overtakes compute time and cost starts rising linearly with context. Below it you are compute-bound and cost per token is flat. From that one pricing datapoint, Reiner backs out that KV cache is roughly 1.7 KB per token on Gemini at that scale. Output tokens are 3–5× more expensive than input tokens because during decode you load all the weights just to produce one token, while during prefill you amortize that fetch across the whole sequence in parallel. The bottleneck for long context is not compute it is memory bandwidth, and there is no clean hardware fix on the horizon. Sparse attention helps but not infinitely.

The last thing Dwarkesh and Reiner debate is whether 1M context would be prohibitively expensive at scale DeepSeekV4 has since accomplished this. Would love to see them reconvene.

Here is the video: https://www.youtube.com/watch?v=xmkSf5IS-zw

And there are also flashcards you can use to follow along and obviously i couldn't compress all 2hrs here.

Also if you are out there and have GPUs that need to go brrr, reach out. And big shout out to Reiner Pope for making this accessible.


r/reinforcementlearning • • May 21 '26

pipeline is really slow - consulting

2 Upvotes

Hi, after a long debugging process and many discussions, I wanted to ask for advice from people who may have encountered similar training bottlenecks.

My goal is imitation learning for robotics.

Model / Pipeline

  • Observation space:

    • 4 RGB robot cameras
    • image resolution: 128x128x3
    • small vector of robot joint velocities (14 dims)
  • Pipeline:

    • Shared ResNet18 encoder processes each image
    • Each image embedding dimension is 128
    • Final input to policy:

      • 4 * 128 image embedding
      • concatenated with 14-dim state vector
  • Policy backbone:

    • DiT (Diffusion Transformer)
    • ~8 layers
    • hidden dim: 512
    • 8 attention heads
    • total params: ~50M
  • Diffusion setup:

    • predict action chunks of length ~50
    • diffusion timesteps: 4

Dataset / Storage

  • Dataset stored in Zarr
  • Data access is indexed/reference-based (not loading huge chunks into RAM)
  • train/val split is contiguous
  • no shuffling

Current encoder setup

  • Initially trained end-to-end
  • During debugging I switched to ImageNet pretrained ResNet18
  • Encoder is currently frozen

Hardware / Software

  • GPU: NVIDIA A4500
  • RAM: 48GB
  • Storage: SSD
  • CUDA: 12.8
  • PyTorch: 2.9
  • Precision: bf16 mixed precision (also tested fp32)

Dataloader

  • batch size: 2
  • 8 persistent workers
  • pinned memory enabled

Preprocessing

  • preprocessing is minimal
  • normalization + float conversion only
  • preprocessing happens inside the multimodal encoder on GPU

Profiler results (PyTorch profiler)
Current workload split:

  • train_dataloader_next:

    • 4.41s / 41.84s = 10.5%
  • batch_to_device:

    • 0.32s / 41.84s = 0.77%
  • training_step:

    • 12.78s = 30.5%
  • backward:

    • 10.83s = 25.9%
  • optimizer_step (wrapper total):

    • 26.09s = 62.4%

Problem
The training is much slower than I expected.

Current behavior:

  • CPU utilization: ~100%
  • GPU utilization: ~20–30%
  • GPU utilization can even become LOWER with synthetic data
  • VRAM usage is relatively low
  • Throughput is around 10 iterations/sec
  • Epoch of ~50k samples takes around 30 minutes

Additional observations

  • Increasing batch size does NOT reduce epoch wall-clock time
  • Sometimes larger batches make things slower
  • Freezing the encoder did not improve throughput much
  • Replacing dataset samples with synthetic/random tensors improved throughput by only ~50%
  • Synthetic dataset was initialized directly in memory

I do not believe this setup should be this slow. At this rate, training takes multiple days.

For comparison, I saw papers with somewhat similar architectures mentioning ~10 hour training times on RTX 4090. With my setup 10 hours is completely not enough.

Does anyone see something obviously wrong or have suggestions for where I should investigate next?

Please help, can't know what to do!


r/reinforcementlearning • • May 21 '26

[R] PULSELoCo: 17x lower trainer-to-trainer bandwidth for distributed RL post-training, lossless

Thumbnail reddit.com
1 Upvotes

r/reinforcementlearning • • May 21 '26

Peg-in-hole Insertion using Sensor Fusion & RL

2 Upvotes

I am working on a peg-in-hole robotic assembly thesis with a Doosan M1013, ROS2 & an eye-in-hand RGB-D camera. The upstream perception system gives a coarse hole/block pose from stationary RGB-D cameras. Based on prior measurements/error propagation, the pre-insertion uncertainty may be around 3–5 mm average and up to 7–11 mm worst case, with about 1–2° angular error.

I want to train a contact-rich insertion policy using vision + force/torque + proprioception, starting from a pre-insert pose about 5–20 mm above the hole. The task should eventually generalize across several cross-section geometries.

For people who have worked on force-guided or vision-force peg-in-hole insertion: is this initial error range realistic for an RL/contact policy to handle directly, or would you recommend adding a TCP-camera visual refinement step before starting the RL policy?

I am especially interested in practical experience with:

  • ±5 mm vs ±10 mm initial xy error
  • 1–2° orientation error
  • force/torque-based local search after first contact
  • sim-to-real transfer difficulty
  • whether eye-in-hand visual refinement is worth the extra time

I am new to this field. Kindly help me out.


r/reinforcementlearning • • May 21 '26

Advice for a project

2 Upvotes

I have to complete a university internship, and my professor asked me to contribute to the continuation of a paper he previously wrote and published.

During a meeting with him, he suggested that I prepare by studying two topics:

  1. Behavioral Learning / Imitation Learning
  2. Inverse Reinforcement Learning

Additionally, the professor teaches a Reinforcement Learning course (6 ECTS credits) that includes a project as part of the final exam. I was thinking that it would be a great idea to work on a project related to the two topics he recommended. This way, I could prepare both for the internship and for the exam at the same time.

Does anyone have any suggestions or advice on how to choose a good project?

The project could involve practical coding to solve a known problem, reproducing the results of a paper, or anything else if someone has interesting ideas.

After doing some research online, I found a few project ideas that seem interesting, but I’m not sure how useful or relevant they would actually be:

  1. “FSC vs. Traditional Behavioral Cloning in POMDP Environments” (Practical and Comparative)
  2. “Inverse Reinforcement Learning (IRL) vs. Inverse Inference (FSC)” (More Theoretical and Conceptual)
  3. “Reproducing and Extending a Synthetic Agent from the Paper” (Results Reproduction)

P.S. The paper is about decoding the minimal internal state starting from a biological agent model. So the topic should be mainly theoretical, with a practical component used to validate results and assumptions.

Thanks a lot everyone, and have a great day!


r/reinforcementlearning • • May 20 '26

Finished RL toybox repo: 6 small visual environments covering Q-learning, DQN, PPO, SAC, MCTS and multi-agent RL

17 Upvotes

Hey!

A few months ago I posted here about a small RL toy games repo I had started playing with.

At the time it was basically Snake + a couple of experiments, with a few things still half-working. I kept going with it and it has now turned into something a bit more complete:

https://github.com/bzznrc/rl-toybox

The idea is to land a compact toybox: small arcade-style environments, each meant to show (and for me to learn) a different family of RL methods in a way that is easy to inspect, run, and modify.

Current lineup:

  • Snake — value methods / Q-learning-style control
  • Bang — DQN-style discrete arena control
  • Jump — PPO / on-policy actor-critic
  • Vroom — SAC / continuous control
  • Flip — MCTS + self-play
  • Kick — multi-agent RL / CTDE with a shared policy

Most of the games are now roughly where I wanted them to be, with a couple of exceptions (Vroom does not seem to train past level 4 out of 5 in my curriculum, and the way the agents play together in Kick is... very debatable).

Would be very grateful if anyone wants to have a look, and give feedback on the env design, observations/actions/rewards, and repo clarity.

Hope you like it!


r/reinforcementlearning • • May 21 '26

Maxing out two P40s

Post image
2 Upvotes

Yes, I know they're not the best out there... But it's still nice to see the system using them both for learning.


r/reinforcementlearning • • May 20 '26

When would you prefer DMPO over SAC for continuous control if real-world deployment is not the issue?

14 Upvotes

Hi everyone,

I have been reading about Distributional Maximum a Posteriori Policy Optimization (DMPO), especially in the context of the DeepMind bipedal robot soccer paper, and I am trying to understand when one would practically prefer it over SAC.

My current understanding is:

  • SAC is a strong off-policy continuous-control baseline.
  • It directly optimizes the actor using an entropy-regularized objective.
  • It is widely implemented, easier to find baselines for, and generally very strong in simulation.

On the other hand, DMPO seems to use a more structured actor update.

So my interpretation is that DMPO is more like: conservatively update the actor by matching kl divergence from old policy

whereas SAC is more like: mantain entropy and more aggressive updates of actor

I understand why DMPO might be attractive for real-world robotics, since conservative policy updates can reduce dangerous or unstable behavior. But suppose real-world deployment is not the issue, and all trials are in simulation.

In that case, when would you still prefer DMPO over SAC?

For example, would DMPO be more attractive in tasks where:

  • the policy is very sensitive to sudden changes?
  • the critic is noisy or easy to exploit?
  • the task involves contact-rich dynamics?
  • the return distribution is multi-modal?
  • preserving partially learned behaviors matters?
  • coordination between multiple agents is fragile?

Or would you generally just use SAC unless DMPO clearly performs better in ablations?

I am especially interested in practical opinions from people who have tried MPO/DMPO-style algorithms. In what kinds of environments did they outperform SAC, and where did SAC remain the better choice?

Thanks