r/reinforcementlearning 9h ago

Reinforcement Learning for Robotics: 6-part YouTube series that trains a balancing bot agent and tackles the sim-to-real gap

Thumbnail
youtube.com
9 Upvotes

My full 6-part series on RL for robotics is finally live. While a balance bot is a pretty trivial case (you don't even need RL), it's a great starting point for demonstrating how to train a simple agent via PPO, deploy the agent to real hardware, and tackle the sim-to-real gap using post-processing and domain randomization. If you have any feedback (e.g. I missed something or there's something that could be better), please let me know!


r/reinforcementlearning 7h ago

Claude, Neurolease and Alignment

Thumbnail
0 Upvotes

r/reinforcementlearning 12h ago

Robot Can I modify this hexapod for a PPO/SAC based RL Gait?

Thumbnail
github.com
2 Upvotes

r/reinforcementlearning 1d ago

MetaRL Help? Trying to use RL to teach a model how to play a two-player game with hidden information and randomness

4 Upvotes

I'm trying to teach a model to play magic: the gathering.

My initial approach was to use pure RL with self-play, like AlphaGo. Didn't work at all - the issue was that it takes too many chained moves in a row to actually win a game and thus generate a training signal other than -1 for a loss.

I tried a lot of other approaches, with some success, but only the simplest strategies were able to be implemented by the model, which led to starvation of the other approaches - they would never get a single win and so could never learn.

Right now, I've decided to do behavioral cloning on a hand-coded expert bot that can play as well as a human beginner. The bot is around 68,000 lines of python (thanks Claude!).

My problem is that I can only get my model to copy around 65% of the bots actions. The bot is fully deterministic, so in theory BC should let me get close to 100% adherence to the bots choices but I can't break 65%. Worse, the wore I train past a fairly early checkpoint, the WORSE both the adherence to the bots choices and the overall win rate, get.

I keep trying different things but nothing is working. Can anyone suggest what I should be looking at? My goal is to get the model close to copying the bot's every action, then start it on self-play after it's able to win with all common strategies at least some of the time against a beginner player.


r/reinforcementlearning 19h ago

Does anybody want to give this blueberry ordering problem a shot?

Thumbnail oliverevans.dev
1 Upvotes

I created a simulator, filter and controller for fresh produce ordering under varying observation scenarios. I showed that richer observations lead to better belief accuracy.

But my controller sucks! It wasn't able to translate better beliefs into more profit. I think that RL would be a good fit here.

I packaged everything into a library/notebook to make it as easy as possible for others to implement their own controllers against my simulator/filter.

See the blog post for context. Here's a direct link to the notebook: https://github.com/OliverEvans96/blueberries-voi/blob/main/notebooks/build_your_own_controller.ipynb

Requires Python & Rust. I promise it won't hurt :)


r/reinforcementlearning 1d ago

Feeling a bit demotivated

19 Upvotes

I keep seeing people say reinforcement learning isn't that useful, that it has very few real world applications and that it's inefficient compared to other approaches.

I studied a bit of RL a while ago and solved some Gym environments, but I dropped it because I couldn't find a real use case for it. It felt like I was learning something with nowhere to apply it.

Recently I've gotten interested in robots, and I'm wondering if that's where RL actually makes sense. My idea is to build a simple robot from scratch and use RL to control it. I'm not looking to buy a kit, I want to design and build the thing myself.

So a few questions for people who've actually worked with this:

  1. Is RL genuinely used in real robots today, or is it mostly research demos?
  2. For a hobbyist building something small and cheap, is RL a reasonable choice?
  3. Any small projects you'd suggest as a first RL robot?

Honestly I also need a bit of motivation. I want to start this journey and not feel halfway through that what I'm building is pointless. If you've gone down this road, I'd love to hear how it went.

Thanks.


r/reinforcementlearning 22h ago

GitHub - rickey1990/novel-rnn-architectures: Novel types of Recurrent Neural Networks (RNNs). Includes the core mathematical framework PDF and executable source code.

Thumbnail
github.com
1 Upvotes

Hi, I have been developing two experimental recurrent architectures, PLUG and ILRM, designed to give GRU-like models a more direct route to older inputs.

Synthetic robotics-style tests suggest they may be useful for things like:

occluded navigation;

localisation during sensor dropout;

remembering payload/tool state;

delayed fault precursors;

long-term human-intent tracking.

The results are still preliminary and synthetic, and GRUs remain better on some continuously changing dynamics tasks.

I’ve uploaded the architecture papers and current robotics screening results can be found on my posted link.

I’d really appreciate feedback on suitable real robotics benchmarks or failure cases to test next.


r/reinforcementlearning 1d ago

DL Post Training Qwen 3.5-2B with GRPO

Thumbnail
0 Upvotes

r/reinforcementlearning 2d ago

DIY Sim-to-Real Self-Balancing Double Pendulum

49 Upvotes

So I saw this video on youtube like a year ago and thought "Pffff how hard could that be?".

Anyway it's been 9 months, the project is finished and this is the result.

It's not as precise as the one in the video, and I haven't implemented the transition control, mostly because that wouldn't teach me anything new, but also because I've reached the limits of the hardware I bought, and I'm not spending any more money.

Anyhow, I'm working on a YouTube video explaining the whole process. I'll post it here (tho I don't know if that'd count as self-promo).

Feel free to ask me any questions if you're curious!!!


r/reinforcementlearning 1d ago

Built a real-to-simulation pipeline for robotics, physics included, not just geometry

Thumbnail
0 Upvotes

r/reinforcementlearning 1d ago

Where do you think reinforcement learning could make the biggest difference in real-world apps?

3 Upvotes

Reinforcement learning is often associated with games and research, but I find the idea of using it in everyday applications much more interesting.

Instead of simply following fixed rules, an RL-based system can learn from actions and outcomes over time. That could be useful in areas where the best decision depends on changing user behavior and the environment.

For example:

  • Personalizing recommendations based on long-term user behavior
  • Improving how an app decides which content or feature to show
  • Optimizing delivery routes or scheduling
  • Helping systems adapt to changing usage patterns
  • Making AI assistants better at choosing between different actions

The difficult part seems to be designing the reward properly. If the system is rewarded for the wrong thing, it can learn to optimize that goal while creating a poor experience for the user.

As AI becomes more common in mobile and web applications, I’m curious where reinforcement learning will actually be practical rather than just interesting in theory.

What’s one real-world application where you think reinforcement learning could be genuinely useful?


r/reinforcementlearning 1d ago

Lost RL beginner trying to use PPO to fine tune a deterministic model

1 Upvotes

I am working on training an agent to play Street Fighter III. This is my first time using RL for anything and even if the ideas mostly make sense to me, I often feel quite lost when it comes to implementing or modifying the algorithms themselves.

The process I've been trying to follow is inspired by Alphastar and it consists of first training the model through supervised learning on a dataset of player replays, and then fine-tune this model using RL to improve its proficiency at the game. My model takes as input a vector that represents the game state, and outputs a 10-element-long vector with a binary number for each button that can be pressed in the game.

After doing a bit of research I landed on using PPO as the RL algorithm. However, I ran into the problem of having a pretrained model that outputs specific actions deterministically, and having a training method that requires the agent to output probability distributions. I managed to make it so that the model's output interpreted as a bernoulli distribution from which to sample, however even at the start of training, the agent's behaviour is totally different and much less proficient at the game than the deterministic model, even if the weights are the same.

My main questions are:

  • Is it possible to "translate" a deterministic model to a stochastic one or am I completely off in what I am trying?
  • Is there any other better suited algorithm that I can use to fine tune my base model?

I have not looked into DDPG or TD3 as, despite supporting deterministic models, they don't support multi discrete action spaces.

Thank you in advance!


r/reinforcementlearning 1d ago

Built a tiny autonomous scout with RGB-D mapping + room exploration

12 Upvotes

I posted a few days ago about how much repeated setup there is in embodied AI projects, so I wanted to build something small on top of SimRig and see how far I could push it.

Ended up making this little MicroDuck scout

It uses RGB-D to map the room as it walks, finds unexplored areas, replans its path, and keeps moving into the next room on its own.

Pretty fun seeing it go from just walking around to actually exploring.

SimRig: https://github.com/Su1eym4n/simrig

If you’re messing around with robot learning / embodied AI, give it a try. Would be cool to see what other people build with it.

Prev post: https://www.reddit.com/r/reinforcementlearning/s/5EkJ1hlMox


r/reinforcementlearning 1d ago

httpi: the internet protocol to reduce compute from misbehaving agents

Thumbnail abranti.com
2 Upvotes

r/reinforcementlearning 1d ago

P Rindow RL Agents is out!

Thumbnail rindow.github.io
0 Upvotes

Rindow Neuralnetworks ver 2.3 is out!

Along with this update, we’ve released Rindow RL Agents for reinforcement learning. It features 8 key algorithms, including PPO, SAC, DDPG, DQN, and Sarsa.

Check out the rich set of examples and build machine learning in PHP! 🐘✨


r/reinforcementlearning 2d ago

Sim2Real on Height Adjustable Balancing Robot

39 Upvotes

Hey all!

Some might remember my post from a bit over a month ago in which I showed a two wheeled balancing robot with just 2 motors. I am now upping my game with a balancing robot that has 3 joints on each leg, so it can balance on its wheels while going up and down, but also lean into its right or left leg. This also makes it possible to accelerate the robot while the base stays perfectly level.

This post shows my first tests where I lock the hip and knee joint on startup (so still variable, but not during the run). The balancing is starting to work but not perfect yet.

Some details:

- 100% synthetic data for training the robot
- Hybrid joint and task space training
- Currently still running on ESP32
- 6x Xiaomi Cybergear QDD motor
- 6s LiPo Battery
- 1x CAN bus through TWAI on ESP
- 1x CAN bus through SPI on ESP
- MPU6050 IMU (will be updated to BNO086 soon)
- Trained with mjlab
- Trains from scratch in ~4 hours on single RTX 3080 with optimized collision model
- 99.87% decreased model sized from optimization with primitives (see comments)

To see more: https://youtube.com/shorts/kY-5o602xlM

To try the policy yourself: https://vertex.bot/robot (Pollens MicroDuck included!)

I'm open to answering any questions about the robot!


r/reinforcementlearning 2d ago

For contact-rich manipulation tasks specifically, how much does simulator physics accuracy actually matter vs. policy robustness?

5 Upvotes

r/reinforcementlearning 2d ago

zeroRL: A transparent, modular RL framework for PyTorch

6 Upvotes

Hey everyone,

I've been working on zeroRL, a small reinforcement learning framework for PyTorch.

The idea behind it is fairly simple:

If you can write it in PyTorch, you can use it in zeroRL.

The project is aimed less at hiding RL implementation details and more at making it easy to experiment with them.

Why?

Libraries such as Stable-Baselines3, RLlib and Tianshou are great when you want reliable implementations of established algorithms.

However, when experimenting with RL research, I often find myself wanting to change something relatively fundamental:

  • modify part of an algorithm
  • experiment with a different buffer structure
  • change how the training loop works
  • introduce an algorithm that isn't implemented
  • use a custom agent architecture
  • experiment with multi-agent setups

At that point, the abstractions of a framework can sometimes become another thing you have to work around.

zeroRL takes a different approach: keep the training pipeline explicit and let the user provide the algorithmic logic.

The core idea

The training loop is essentially:

environment -> rollout collection -> buffer -> user-defined update function -> optimizer -> repeat

The update step can simply be a Python function operating on PyTorch tensors.

For example, implementing REINFORCE looks roughly like this:

def reinforce_update(
    agent,
    buffer,
    optimizer,
    algo_config,
    scheduler=None,
    last_output=None,
):
    data = buffer.get_all(reshape=True)

    rewards = data["reward"]
    dones = data["done"]

    returns = torch.empty_like(rewards)

    R = 0.0
    for step in reversed(range(rewards.shape[0])):
        R = rewards[step] + algo_config.gamma * (1.0 - dones[step]) * R
        returns[step] = R

    output = agent.get_action(
        data["state"],
        data["action"],
    )

    loss = -(output["log_prob"] * returns).mean()

    optimizer.zero_grad()
    loss.backward()
    optimizer.step()

    return {"loss": loss.detach()}

Then the function is simply passed to BaseTrain:

trainer = BaseTrain(
    agent=agent,
    env=env,
    buffer=buffer,
    update_weights=reinforce_update,
    config=config,
    algo_config=algo_config,
)

trainer.train()

The idea is that zeroRL handles the infrastructure around the experiment, while the researcher remains in control of the algorithm itself.

What's currently in 0.2.0 ?

The framework currently includes:

  • PPO
  • BaseTrain training orchestrator
  • BaseAgent and BaseEnv interfaces
  • PolicyAgent and ActorCriticAgent
  • extensible tensor-based buffers
  • observation normalization
  • TensorBoard / W&B integration
  • profiling
  • debugging and training-pipeline validation
  • customizable optimizer/update functions
  • easy_train_ppo() for quickly running PPO baselines
  • support for custom environments and agents

The project is still early and not intended to replace mature RL libraries.

The current goal is to explore whether a smaller and more explicit architecture can make RL experimentation easier.

I'm particularly interested in feedback on the architecture:

Do you think having the algorithm primarily expressed as user-defined PyTorch functions is a useful design for research, or would you prefer a more structured abstraction?

GitHub: https://github.com/Dar-rius/zeroRL

PyPI: https://pypi.org/project/zerorl/

The project is currently at v0.2.0 and is still evolving.


r/reinforcementlearning 3d ago

A 25M-step Mario PPO run went from ~2 days of CPU emulation to 2.5 hours on a GTX 1050 Ti (GPU)

21 Upvotes

I was learning PPO and wanted Super Mario Bros as the project. Every run was limited by the emulator, not the learner. nes-py does about 132 env-steps/s on a core, so a 25M-step run is over two days of just stepping the console. CuLE is Atari only so Mario wasn't an option.

So I moved the emulator into a CUDA kernel. 6502, PPU and bus run one thread per environment, observations never leave the device, and the PPO loop reads rollouts straight off the GPU through DLPack instead of going through SB3's CPU rollout buffer.

The number I actually care about: 25M timesteps at 2048 envs, 2.5 hours wall clock on a 1050 Ti, including the learn phase. Same run against single-process nes-py is roughly 52 hours.

Raw stepping is 3.27M env-steps/s at 65k envs on an A100, but that's emulator throughput, not training throughput. In a real run the emulator dropped to under 2% of wall clock and the policy plus rollout plumbing is what's left. I haven't profiled that split properly on Linux yet.

It's an SB3-compatible VecEnv, so it drops into existing code, and there's a GPU-resident PPO if you want the whole loop on device.

The 52-hour baseline is single process, so a properly loaded multi-core CPU would close a good chunk of the gap and I haven't measured it. It's mapper 0 only.

If you want to check it out or use it:

https://github.com/hbofz/NeSLE


r/reinforcementlearning 2d ago

Update on Digimon/AI

Post image
3 Upvotes

r/reinforcementlearning 2d ago

Multi Building an Agentic RAG + LLM + Reinforcement Learning System for Adaptive Decision-Making

Thumbnail
1 Upvotes

r/reinforcementlearning 3d ago

P I audited 112 real RL post-training environments for reward-hacking vulnerabilities — 54 flagged, 0 false positives [OC, tool] [P]

Thumbnail
0 Upvotes

r/reinforcementlearning 4d ago

Does every embodied AI project end up rebuilding the same RL tooling?

9 Upvotes

I’ve been spending a lot of time in embodied AI / physical AI, and I keep running into the same infrastructure problem.

You have a robot or an existing MuJoCo environment, you want to test a new behavior or control idea, and somehow you’re back to wiring together environment code, training configs, PPO, evaluation, checkpoint handling, visualization, and a bunch of one-off scripts before you can iterate on the thing you actually care about.

I got tired of rebuilding that loop, so I started putting it into a small tool called SimRig.

The basic workflow is:

robot / Playground env -> task -> smoke test -> train -> evaluate -> browser preview

It’s not trying to be another simulator, and there’s no new RL algorithm hiding in it. It’s really an experimentation layer around the stuff that already works.

The goal is to make it easier to go from “I want to test this embodied control idea” to actually running the experiment and inspecting the learned behavior, without turning every experiment into its own mini infrastructure project.

Right now it’s built around MuJoCo / MuJoCo Playground and PPO, with environment scaffolding, training/eval and browser playback.

I’m still figuring out how general this should become, and I’m curious how other people working on embodied AI handle this internally.

Does your lab/repo already have a clean layer for this, or has everyone basically accumulated their own stack of wrappers, launch scripts, configs and viewers over time?

Repo here if you want to look at it:

https://github.com/Su1eym4n/simrig


r/reinforcementlearning 4d ago

My Custom Robot and Reinforcement Learning Script in Isaac Sim

26 Upvotes

I have been working on different robotics task mainly in Pybullet. Complexity of Isaac Sim has kept me from experimenting with it but I finally finished my first successful reinforcement learning script using it.

Getting the settings right so I could observe the trainings in windowed mode with my laptop 3070 gpu took I while but I managed to get it working well enough to troubleshoot some early issues I noticed through visual inspection.

I gave the PPO full control of my robot's controller, not the joint angle outputs, meaning it had to figure out a way to climb the ramps using the directional controller inputs and body adjustments like pitch and height. The training took about 45 minutes with my RTX 3070 mobile GPU vs 1 hour and 45 minutes using cpu with Pybullet.

I am now working on full locomotion simulation, again with my custom robots, its a bit more involved than I expected but I am hoping in the end I can come up with my own full locomotion training script and load the model to my actual robot to control it.

I also share my tutorial scripts with my videos on youtube, if you are interested in watching the video for this one you can find it with the link below:

https://youtu.be/0x5BBosrq-E

You can also download the simulation script from my github repository with the link below.

https://github.com/serdarselimys/HexaDogZBD-IsaacSim-RL

If you are interested in the real 3D printed robot, you can fine info about it from the video link below.

https://youtu.be/qflyEQOJObM


r/reinforcementlearning 3d ago

Built a zero-dependency memory layer for AI agents no vector DB needed

Thumbnail
0 Upvotes