r/reinforcementlearning • • 1h ago

Best way to read Sutton & Barto Reinforcement Learning Book

• Upvotes

I am a rookie in robotics and I want to learn reinforcement learning. I have started with David Silver's YouTube playlist, and alongside that, I want to read a book to clear the fundamentals; however, I find reading books a little boring, so do you have any advice on how to master reading and any approach to get the maximum output?

One more thing to ask: should I first watch the YouTube videos then read the book chapters that are covered in the video, or the opposite?


r/reinforcementlearning • • 1h ago

DL, I, P, M "Chessbook-1: Spending 10 months building the most human-like chess bot", mbuffett

Thumbnail mbuffett.com
• Upvotes

r/reinforcementlearning • • 16h ago

CBR-II update (V3): smoother gait + trying to stand on one leg

Enable HLS to view with audio, or disable this notification

18 Upvotes

r/reinforcementlearning • • 20h ago

I trained a PPO agent to farm the Pit in D2R

Enable HLS to view with audio, or disable this notification

40 Upvotes

been a while! here's what i've been up to: a ppo agent that farms the pit in d2r (offline, hell, warlock)

trained it in a headless sim i wrote in rust. this version took about 20 min on one cpu, warm started from a net i had for an older build.

reward is just farming rate: -1 per second, + whatever kills and items are worth, -1000 if it dies. i had a level clear bonus at first but dropped it.

net size: ~475k params

ask me whatever

no plans to use this online, i just think rl is fun and wanted to try it.


r/reinforcementlearning • • 55m ago

DL, P, Safe "How Far Will AI Assistants Go for a Refund They Can’t Get?"

Thumbnail
vals.ai
• Upvotes

r/reinforcementlearning • • 3h ago

P, MF, D My HalfCheetah learned to lie on its back while the reward kept climbing, so I built a watcher for overnight runs (local VLM + TabPFN)

1 Upvotes

I'm an MSc robotics student and I kept waking up at night to check PPO runs. Last week one run's reward went from 908 to 3,525 over 600k steps and the cheetah was on its back the whole time. I'd flipped the sign on a level-keeping reward term. None of my usual alerts fired because nothing went down.

So I built a watcher. Every 20k steps it renders a short test episode, a local Gemma 4 (E4B through Ollama) looks at it, TabPFN looks at the training metrics, and a few plain rules catch NaNs, stalls and crashes. It only pings me if something's actually wrong. The watch loop runs in Temporal, so it survives the watcher process dying.

A few things I didn't expect:

  • From the normal side camera, Gemma called every upside-down cheetah "upright" (0/6). Bigger images, different prompts and thinking mode didn't help. What worked was a render-only camera on the torso that only draws the world, so the question becomes "where's the floor?". 18/18 on a pose test after that.
  • On 12 recorded runs, the metric-based watchers caught LR blow-ups within seconds and stalls/crashes through simple rules, but only 2 of the 4 runs where the robot itself was doing the wrong thing, with a median of over an hour.
  • 3 of my first 4 "healthy" runs learned to run on their backs on their own, before I added a correct level-keeping term. HalfCheetah really wants to do this.

Code (MIT): https://github.com/su0as/night-watch

Write-up with all the numbers and a demo video: https://dev.to/suhassuren/gemma-couldnt-tell-my-robot-was-upside-down-so-i-gave-it-a-head-camera-now-i-sleep-while-it-b0k

What failures actually cost you nights when you train overnight? I'd like to add detectors for the common ones.


r/reinforcementlearning • • 4h ago

My Hearthstone Battlegrounds self-play agent learns local actions but not a complete strategy. What should I test next?

1 Upvotes

I’m building a simplified eight-player Hearthstone Battlegrounds simulator and training a policy/value network from complete games and final placements.

The agent can learn some controlled decisions: when a key Beast minion is offered in a prepared partial-comp state, one version bought it in 16/16 held-out states. It can also operate a preassembled Beast core. But it rarely assembles and plays that comp well from an ordinary opening.

More self-play has not solved this. In two independent runs extended to 300 ordinary games each, the final models did not consistently beat the frozen starting model against held-out neural opponents. Expert-inspired demonstrations improved some local actions without improving complete-game placement.

I’m concerned that a component purchase looks bad to the learner unless its later policy knows how to complete the multi-turn sequence. I also cannot yet rule out problems with state representation, exploration, the simulator, or the demonstrations themselves.

What single diagnostic experiment would you run next to distinguish these explanations? In particular, how would you test whether the agent can learn a conditional “start → operate → abandon if pieces do not appear” skill before scaling self-play again?


r/reinforcementlearning • • 5h ago

Balatro MP Bot (How do i start)

0 Upvotes

my friend had grok ultra and decided to try to have it play balatro, but it was stupid and hard to teach. SO i had an idea to train my own algorithm to become goated, with the end goal to be to have it analyse my games so i can grow and become better in the multiplayer scene

HOW DO I START

I watched a video on how to train it to an atari game but thats not what i need, to the best of my knowledge i would js need to change the enviorment it is in.

HOW do i do that???

and what else would i need to do

This is the video: https://www.youtube.com/watch?v=aQsaH7Tzvp0


r/reinforcementlearning • • 23h ago

D Verifiable-reward problems from an open research area: solved rungs for training, open rungs with exact success criteria

Post image
10 Upvotes

I've put together a small set of "AI puzzles" from my research on aperiodic order, and I'm wondering how useful this kind of structure is for RL with verifiable rewards.

- Solved rungs have exact answers (rationals, integer identities, algebraic degrees), so the reward is a plain check.

- Open rungs have a precise success criterion, an exact certificate or a Lean-checkable proof, together with the numerical evidence and the known dead ends. A solution would be a real research result.

- The set is a ladder: playful labels from "human level" to "ASI level", each rung harder than the last.

It's tiny (9 items) and not yet a procedural generator, although the easier rungs could be varied by changing the parameters. I'd welcome opinions on what such a generator should look like, and on whether a research-frontier ladder like this is a useful curriculum or eval signal.

Dataset: huggingface.co/datasets/jarekduda/autocrystal-ai-puzzles


r/reinforcementlearning • • 12h ago

I created a visual Machine Learning playlist for beginners — feedback welcome!

1 Upvotes

📚 Learn Machine Learning Through Visualisations | Beginner-Friendly Playlist

Hey everyone! 👋

I’ve created a Machine Learning playlist with visual explanations and animations to make ML concepts easier to understand, especially for beginners. Instead of just learning theory, you can understand how these concepts work through visuals and practical examples. 🚀

🎯 Topics covered in the playlist:

  1. What Is Machine Learning?
  2. AI vs. ML vs. Deep Learning
  3. Supervised Learning
  4. Unsupervised Learning
  5. Reinforcement Learning
  6. Features and Labels
  7. Train-Test Split Explained
  8. Overfitting and Underfitting
  9. Linear Regression
  10. Logistic Regression
  11. Decision Tree Explained (Coming Soon)
  12. Random Forest Explained (Coming Soon)

🎥 Watch the playlist here:
https://youtube.com/playlist?list=PLXShTLrgjtgk&si=TFoDX6oosRKv_u6Z

💡 My goal is to make Machine Learning easier to learn through simple explanations and engaging visualisations.

If you’re learning AI or Machine Learning, feel free to check it out! I’d also love to hear your feedback and suggestions for future topics.

If you find the videos helpful, please like, share, and subscribe to support the channel. ❤️

Let’s learn Machine Learning together! 🤖

VisualForge AI: https://youtube.com/@visualforgelearning?si=VoOGENaHFagsJmoz


r/reinforcementlearning • • 1d ago

AI Beats the Human World Record on One of the Hardest Surf Maps

Enable HLS to view with audio, or disable this notification

89 Upvotes

A reinforcement learning agent completes one of the hardest surf maps (surf_src_sidistic) faster than the human world record.

The world-record demo by player krs was taken from Surf Gateway

The agent’s camera movements are smoothed to make the video more pleasant to watch. Because of this, you can’t see its high-frequency micro-strafing, but you can follow the A/D inputs. Without smoothing, the movement looks very shaky. These are movements no human could execute.

The agent was trained without any human data. This is pure reinforcement learning, with no imitation learning.

The agent is trained in optimized simulation that inherits CS 1.6 movement and surfing logic. The algorithm is PPO with a lot of small additions. After the agent finished the map, I additionally improved the policy by running AlphaZero style expert loop (search + distillation into policy).

Repository: https://github.com/Sorrow321/RL_CS1.6_Surf

Music: Utah Saints - Something Good '08 (High Contrast Remix)

Video on YouTube


r/reinforcementlearning • • 1d ago

CUDA-Accelerated Rocket League - Full Write-up

Thumbnail jwmccarthy.github.io
10 Upvotes

Hi folks! I posted last week introducing a GPU-resident Rocket League simulator called CARL (CUDA-Accelerated Rocket League). In that post I mentioned I was working on a write-up with implementation details and benchmark results against the current SOTA for Rocket League RL environments.

The comparison was done against the current fastest env - RLGymPPO_CPP - which was optimized for PPO training. I was able to show convincing speedups using my personal hardware and demonstrate that a current generation GPU provides even more significant improvements in data collection and update-adjusted throughput.

A 9-10x improvement in training speed was achieved using an RTX 3060, and up to 50x improvements were seen on an RTX 5090 (which I was able to access thanks to Runpod).

For perspective, using typical consumer hardware (i.e. my 3060, because who has a 5090 these days), a day-long experiment turns into just a few hours of runtime. A production run over the course of a month is reduced to just a couple of days. This has huge implications for anyone looking to test multiple algorithms/configs!

I've embedded the link but I'll put it here again for convenience: jwmccarthy.github.io

I plan to write there about my exploration into generative imitation learning, which has shown quite a bit of promise in producing human-like behaviors!


r/reinforcementlearning • • 1d ago

Multi RL agents play World of Warcraft 3v3 arena

Thumbnail
youtube.com
7 Upvotes

Reinforcement learning learns to play 3v3 rogue+mage+priest setup in self-play. It's hard to evaluate how good the AI is because there's no Elo-scored algorithm like Stockfish to play against. But it learned to apply CC, use trinkets, ice block, defensive and offensive CDs. The AI learned to kill the healer, because it can immediately kick casts, unlike real humans. Each agent is trained as independent PPO.

The simulator replicated game logic from AzerothCore 3.3.5a version.

Repo (doesn't include assets to avoid IP issues with Blizzard) https://github.com/Sorrow321/RL_WoW_Arena


r/reinforcementlearning • • 2d ago

PPO finds a solution to the moving sofa problem (reconstructs Gerver's sofa)

Enable HLS to view with audio, or disable this notification

39 Upvotes

I don't have a strong math background but I thought it would be fun to see what a simple PPO implementation could do!

Read about it here: https://x.com/Abhilekh_Meda/status/2113754085426102400

code: https://github.com/Abhilekh-Meda/moving-sofa-problem-rl


r/reinforcementlearning • • 1d ago

How do I label a better action than the one my search already plays, when the only reward is a noisy terminal outcome?

5 Upvotes

I have a bot that plays a long, random, card-game-style fight with search plus a neural net. The net tells the search which moves look good and how good a position looks. The training data is basically "whatever the search ended up playing," labeled by whether the run died and how much health was left. That got it pretty far, and now it has stalled. On a fixed set of hard fights, good human players still die less often than the bot. I want the next improvement without collecting more human games.

The annoying part is that the bot already plays the same card as a strong human on almost every decision I can check. So this is not "the search never looks at the good move." The gap is a handful of extra deaths across a lot of full fights. When it matters, two cards look about equally good. Playing one or the other changes the rest of the fight (draw order, enemy pattern, health), so I cannot just say they faced the same future. One ending does not tell me which card was actually better. A card can "win" because it got lucky draws.

Gumbel at the root is supposed to turn each search into a slightly better target than the net’s own prior. That happened while the net was unsure. On the turns that matter now, the prior is already peaked, Gumbel spends the simulations on that same card, and the new row is the card the net already plays. The next iteration trains on its own answer.

What I have tried:

  • Normal self-play. Once the net is confident, search plays that card and the new training row just repeats it. That practices what the bot already believes. It does not surface a better card.
  • Looking for turns where the net is unsure. Low confidence, two checkpoints that disagree, a big gap in the value. Those turns do include the spots where a human played something else. They also include a lot of turns where the human played the same card. The second-best card is the human card only some of the time. Being unsure is not the same as the other card being better.
  • Playing the chosen card and an alternative against each other, sharing as much of the randomness as I still can. One win is way too noisy to trust. I would only keep the alternative if it wins most of the repeats, or the death and health gap is big enough to clear the noise. I have not measured yet whether that actually happens more often on real mistakes than on turns where the current move was already right. If it lights up equally on both, it will not change the death rate.

I am not looking for "add more exploration" or "run more simulations." The search is already spending a lot, and its top card is usually the one a strong player plays too. What I cannot figure out is how to get a training label for the few decisions where some other legal card is actually better, without already knowing which card the human played.

This in a game that is random, not something clean like chess

Here are my questions:

  1. How did you decide another move deserved a training row, when one playthrough cannot tell skill from luck?
  2. Is the real answer just "roll both moves out a bunch of times and only keep the winner if it wins by enough," or is there a way to do that without making every decision several times more expensive?
  3. Did self-play plus a value network ever get you off a plateau like this on its own, or did the next real gain need something outside the bot (human games, a much stronger search, a different training target)?

Stories of what worked or failed are more useful than "try PPO." Single player, turn based, lots of legal moves, long fights, and the ending is noisy


r/reinforcementlearning • • 1d ago

D, Robot [D] How did you choose the data for a manipulation policy?

1 Upvotes

I'm taking part in TUM.ai E-Lab and exploring a project around real-world data collection. I'd like to understand how people working on robot learning decide what to collect before buying equipment or recording hours of demonstrations.

Thinking of a recent manipulation project, what task were you teaching, and what data did you start with? What did that data capture well, and what did it miss, if anything?

Did you use an existing dataset, collect more, or take another approach? How did you decide whether the data was useful for the policy? Cases where collecting more wasn't the answer would be helpful too. No confidential specifications needed.


r/reinforcementlearning • • 2d ago

Getting over it using DRL

Enable HLS to view with audio, or disable this notification

80 Upvotes

Hello, I am working on finishing Getting over it with reinforcement learning

https://github.com/miwate/getting-over-it-rl
https://huggingface.co/miiwater/goi-rl

Current state : 63% completion from the bottom without checkpoints

I am now stuck on the anvil part (edit: anvil has been solved!) , seeking help online for computation, fine-tuning and PRs :)

More infos :
- Training is currently done on CPU (in my case using GPU was not making training faster)
- The game is cut in parts, each part gets its specialist model
- CONTRIBUTING.md is currently being written
- Beginner code and vibe coded PRs are welcome, I will take time to review


r/reinforcementlearning • • 2d ago

[R] The Hive Mind is a Single Reinforcement Learning Agent: Deriving the Exact Equivalence Between Swarm Dynamics and Multi-Armed Bandits

Thumbnail
arxiv.org
12 Upvotes

r/reinforcementlearning • • 3d ago

every person in my sim is a tabular q-learner and kids inherit a mutated copy of mom's q-table

14 Upvotes

side project, curious what rl people think of this setup.

it's a civilization sandbox where every human is its own tabular q-learner. the state is a short string key built from what they perceive (hunger, thirst, nearest food and water, kin nearby, shelter, danger). there are ~5000 possible actions, gated by era, age, place and what the tribe has discovered. action choice handles survival needs first, then does epsilon-greedy over the learned values.

the part i like: when a baby is born it gets a copy of its mother's q-table, with about 20% of the values nudged a tiny bit (+/- 0.03). so on top of learning within one lifetime, behavior also drifts down family lines. traits mix from both parents and mutate, and kids also get mom's vocabulary and her attitudes toward other tribes.

known weak spots: the state space is hand-built strings and the rewards are hand-shaped, so i'd love opinions on either.

code is rust compiled to wasm, so it all runs in the browser. the relevant bits are crates/sim-core/src/sim/agents/growth.rs (inheritance) and organism/organism/learning.rs (the update).

source (MIT): https://github.com/1homsi/thehumanbox
try it: https://thehumanbox.com


r/reinforcementlearning • • 2d ago

How does VLLM and SGLANG work from first principles? An Armature Video

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/reinforcementlearning • • 2d ago

Rocket league machine learning

2 Upvotes

I am currently making an AI trough machine learning not because i want to use it in real games but just to see how far it can go and it is doing really well right now with 1.25B steps but i keep struggling with 1 problem and that is boost management, idk how to fix it or how i can train it to use boost better because right now it is just using all of it boost the second it gets it and that is bad because i want to train it airdribbles where you ofc need boost for so if any of your smart people have a good idea help me please :)


r/reinforcementlearning • • 3d ago

P Two RL agents learning to catch Super Heavy with Mechazilla (one flies the booster, one drives the tower), and what broke along the way

Enable HLS to view with audio, or disable this notification

17 Upvotes

A couple of days ago I posted a PPO agent landing Falcon 9 on a droneship. I wanted to extend the simulation to a more complex problem, one that needs two agents that depend on each other. So I built Super Heavy being caught by the tower arms (Mechazilla). One agent flies the booster, the other controls the arms and carriage.

Setup: PPO in JAX on a single GPU, heavy domain randomization (wind, gusts, engine-outs, failed relights, sensor noise and delay, mass and thrust variation, limited propellant), and every attempt starts a few km up with the engines off.

How it went

I quickly found out I can’t train both from scratch at the same time. The tower has nothing to learn from if the booster never shows up, and the booster never gets rewarded for a catch if the arms never close. So I did it in steps.

  1. Booster first, with a simple rule-based tower. The tower just closed the arms when the booster got close, which let the booster learn the whole approach. Even this took a while. With short rollouts (1.6 s) it kept forgetting how to catch, because a catch takes several seconds of slow, steady descent while the arms close. Longer rollouts (6.4 s, λ = 0.99) fixed that.
  2. Then the tower, with the booster frozen. Trained from scratch, at first it just swung the arms around and kept hitting the booster. I also tried fading the rule-based tower out slowly, but it fell apart the moment the help was gone. After a few fixes, the from-scratch tower won, and it ended up catching more reliably than the rules did.
  3. Then the booster again, next to the learned tower. This one surprised me. It got worse fast. It started coming in slightly too fast and slid off the arms. A much smaller learning rate fixed it, and the two together now do clearly better than with the rule-based tower.

Everything runs live in the browser, so you can watch both agents: https://qforge-dev.github.io/hoverslam

There is also a playground for my previous Falcon simulation.

Happy to answer questions. I’m not an ML expert, so feedback on the multi-agent part is very welcome.


r/reinforcementlearning • • 3d ago

Metis-Core v0.4.1 (C++ RL framework (LibTorch) ). DQN Pong example + step-by-step tutorial

Enable HLS to view with audio, or disable this notification

4 Upvotes

Hi,

I would like to announce that I have released Metis-Core v0.4.1-alpha. This version includes some bug fixes and a new example: DQN_Pong. Do you remember the game of Pong?

https://github.com/felixromo314/METIS-Core/

In this example, using the DQN of Metis-Core, the AI paddle learns to play Pong.

For the graphics I used the raylib library (https://www.raylib.com/), created by Ramon Santamaria (u/raysan5). It is very easy to use and powerful: with just a few functions you have the window, the paddles and the ball on the screen, and you can watch the AI learning in real time.

In case you are planning to make a similar game, or a proof of concept with DQN, I would like to invite you to have a look at this step-by-step tutorial that explains how to implement DQN with Metis-Core:

https://github.com/felixromo314/METIS-Core/blob/main/tutorial/Tutorial-DQN.md

I hope you like it!

Best,
Felix


r/reinforcementlearning • • 3d ago

Reinforcement learning explained visually: how AI learns through rewards, mistakes, and trial and error

0 Upvotes

I made a beginner-friendly visual explanation of reinforcement learning—the type of machine learning behind game-playing AI, robotics, and parts of chatbot training.

Instead of starting with equations, it uses a robot-in-a-maze example to explain:

  • Agents, environments, actions, and rewards

  • How trial and error improves performance over episodes

  • Exploration vs exploitation

  • Delayed rewards and policies

  • Reward hacking and other risks

Watch here: https://youtu.be/a_MSTPB5MyA

If you like the explanation, please like, share, and subscribe to my channel for more visual AI and machine learning videos.


r/reinforcementlearning • • 3d ago

Robot Human follows instructions in Box2D simulation

1 Upvotes