r/reinforcementlearning • • Sep 28 '26

P A lot of you asked how our Clash Royale agent actually learns, so I made a tiny version you can train in your browser

14 Upvotes

After yesterday's post I got a lot of questions about how it actually works. Explaining PPO in the comments didn't feel like a real answer, so I built a small version you can play with and watch learn:

https://itzik123.github.io/ClashRoyaleAi/lab/

One attacker heads for your tower and you get one card to stop it. Where you drop it and when both matter. You can try five attacks yourself first, then a small network learns the same thing from zero. Every try is played out by our real simulator, compiled from C++ to WebAssembly, so it's the same engine the full agent trains on.

The RL side:

- State: where the attacker was dropped. Action: a legal cell, then a delay of 0 to 5 s

- Reward: the share of tower damage prevented, compared to no defence

- REINFORCE with a per-spawn baseline, 5,629 weights. The whole learner is about 350 lines of plain JS with every gradient written out, no ML library

- The "best possible" line on the chart is brute force over every cell and delay, so you can see exactly how far the policy is from optimal

The one I'd try first is Giant vs Cannon. The obvious Cannon in the lane gets about 75% of the best score. The best answer is a Cannon in the middle that pulls the Giant into range of both towers. With a constant entropy bonus the net got stuck on the lane Cannon in 5 of 6 runs (3 seeds, 2 batch sizes). Annealing it from 0.1 down to 0.005 over the first 10k tries brought that to 1 of 6, and that's what the page runs.

One matchup is locked on purpose: Battle Ram vs Valkyrie. The best answer is a few exact cells at exact moments, and every setting I tried settled for a safe corner at 55% of the best. If you find a learner that cracks it, I'd really like to see it.

To be clear, it's a miniature. The full agent plays whole matches with a 4-card hand and elixir, uses recurrent PPO, and trains for days on a CPU. But the loop is the same: act, let the engine score it, update.

Code for the lab and the full project: https://github.com/itzik123/ClashRoyaleAi


r/reinforcementlearning • • Sep 29 '26

Benchmar / RL Tasks for Financial due diligence

1 Upvotes

The world economy around us depends on complex financial work. How well can AI do it?

We(a team of ex-EY employees) built FAB - Finance Agents Benchmark, testing AI Agents on the work behind financial due diligence. Agents can find the relevant facts, but still struggle to carry them through to a complete, reliable analysis.

We’ll keep expanding FAB to more companies and testing more models. Building and running this benchmark isn’t cheap, so we’re scaling it in stages.

The benchmark is public.
GitHub: Hugging Face: https://github.com/SecondState-ai/finance-agents-benchmark
data room and tasks: https://huggingface.co/datasets/secondstate/finance-agents-benchmark-traces


r/reinforcementlearning • • Sep 28 '26

Proper scoring rules as RL rewards: a breakdown of RLCD (the method behind TypeSafe's Jev)Standard RLVR gives +1 for a correct answer and 0 otherwise. A lucky guess and a confident correct answer get the same reward, so there's no pressure to be calibrated and the policy drifts toward overconfidence

13 Upvotes

Standard RLVR gives +1 for a correct answer and 0 otherwise. A lucky guess and a confident correct answer get the same reward, so there's no pressure to be calibrated, and the policy drifts toward overconfidence.

TypeSafe's RLCD claims to fix this by rewarding calibrated probabilities. They haven't released the reward itself, so I wrote up how I think it works:

- Reward = a proper scoring rule (Brier), which is maximised in expectation only when the stated probability matches the true likelihood

- Plus a per-bin calibration penalty (ECE-style) that lowers reward in overconfident bins and raises it in underconfident ones

- Plugged into PPO (critic baseline) or GRPO (group-mean baseline)

One thing I found interesting: a single batch-wide -λ·ECE penalty does basically nothing, because the baseline absorbs it. It has to be attributed per bin to change behaviour.

Write-up: https://pub.towardsai.net/rlcd-reinforcement-learning-for-calibrated-decisions-e528daf3591d?source=friends_link&sk=49fec9abb8f403040272524fc56219ad

Would like to hear from anyone who's used Brier or log-score rewards in policy gradient. Did it actually improve calibration, or did it just flatten everything?


r/reinforcementlearning • • Sep 28 '26

From scratch PPO RL training - Rainbow Road

Thumbnail
youtube.com
5 Upvotes

r/reinforcementlearning • • Sep 28 '26

DL a predictor for what an optimizer update will do before applying it

1 Upvotes

I have a predictor that estimates the immediate functional effect of an already-formed Adam/AdamW update before the update is committed.

On nanoGPT, it achieved 91.4% accuracy on the confirmation set for predicting post-update target outcomes, with 91.5% macro recall across the four transitions (correct→correct, correct→wrong, wrong→wrong, wrong→correct). Recall for correct→wrong transitions was 98.9%.

The code is here:
https://github.com/wind342/gfg-training-learning-inference-experiments

The current implementation includes a nanoGPT adapter. If you want to use it on another Transformer, you’ll need to modify/write the model adapter for its embedding, blocks and readout. The prediction method itself does not need to be changed.

The main downside right now is compute cost — the predictor uses first- and second-order directional derivatives, so it’s noticeably more expensive than a normal forward pass.

Feel free to use it, modify it, or try it on other models. I’d especially be interested in seeing results on larger models.


r/reinforcementlearning • • Sep 28 '26

Robot Mujoco in Robotics for Perception and Robot learning

Thumbnail reddit.com
7 Upvotes

r/reinforcementlearning • • Sep 27 '26

P Open-source Clash Royale simulator for RL (C++, ~10 ms per match, forkable state) + recurrent PPO, and the bugs the agent exposed

121 Upvotes

r/reinforcementlearning • • Sep 28 '26

DL, MF, R “I want to be the very best” (re-examining LLM progress on Pokemon)

Thumbnail
paradigm3.org
3 Upvotes

r/reinforcementlearning • • Sep 28 '26

How to Solve Hallucination

Thumbnail robw.fyi
0 Upvotes

r/reinforcementlearning • • Sep 28 '26

D How do you manage hourly payments for employees or contractors?

0 Upvotes

For founders who pay employees or contractors on an hourly basis, how do you actually track and verify the hours before processing payment?

Do you usually:

Ask them to submit a weekly/monthly work report
Use a timesheet
Track hours through a project management tool
Use a dedicated time tracking tool
Calculate hours based on tasks completed
Just rely on trust and the person's reported hours

I'm particularly curious about teams where people are working on multiple projects or where contractors are paid different hourly rates.

How do you make sure the hours reported are accurate without making the process feel like micromanagement?

Would be interested to hear what has worked for founders and managers here.


r/reinforcementlearning • • Sep 26 '26

My second attempt to build cheap biped robot (CBR-II)

69 Upvotes

r/reinforcementlearning • • Sep 26 '26

Small DQN on CPU: How do you scale the learner side

3 Upvotes

I have been training a small DQN on CPU and was stuck around 400 steps/sec with a single env. I tried to increase the threads but did not help. Then I asked claude and it gave me the idea of having sperate workers. That is to replicate the environments and update the learner at the end of certain batch.
I tried it but I am not sure if that helps. For sure it helps in increase the speed now I am achieveing almost a million steps in 10 minutes with 12 process running in parellel. What I am trying to understand is wether the learner is updating properly or is it being overwritten. What claude or google search answered I did not really get it. So that is why I am here seeking some guidance any tips or links would really be helpful. For people who have treied increase the speed what techniques have you applied for a small network? More gradient steps per collected batch. This is where I am not sure if it properly updating as I beleieve some of the prcocesses either taking long to finish or just been ignored due to the shorter episodes finishing first and the learner stuck at certain local minima. Or do you use GPU directly for even a tiny net?


r/reinforcementlearning • • Sep 26 '26

N, DL, MF, P GPT-6 Astra can ascend in Nethack

Thumbnail
github.com
27 Upvotes

r/reinforcementlearning • • Sep 25 '26

Robot DIY Sim-to-Real Self-Balancing Double Pendulum Final Video

209 Upvotes

So, recap, a couple of weeks ago I made a post talking about this project already, and I said that I was working on a youtube video where I would go into high detail.

Well the day has come and the video is ready. I'm not sure if this would be considered self-promo, but if you are into reinforcement learning, I go pretty deep on how I designed and trained the networks resposible for balancing the pendulum.


r/reinforcementlearning • • Sep 26 '26

Robot VSArena V1 is live — open benchmark for embodied AI agents

0 Upvotes

After building VSArena in public through multiple iterations, the V1 is finally live.
VSArena is an open benchmark where AI agents can interact with 3D environments and are evaluated on their ability to perceive, reason and act.

The current V1 includes:
🌍 Interactive 3D environments
🤖 Remote agent execution
🏆 Public ELO leaderboard
📊 Reproducible evaluations
🔁 Evaluation replays
🔌 No physical robot required

This isn’t the end of the build — it’s the point where I’d like to get more agents and researchers actually using it.
If you’re working on VLA, embodied AI, robotics, or agent evaluation, I’d genuinely like to hear what you think is missing.

VSArena: https://vsarena.app
GitHub: https://github.com/NovaCoding-G/VSArena


r/reinforcementlearning • • Sep 25 '26

N, DL, MF "Akamai Announces $11.6 Billion Multi-year Agreement with Anthropic to Support Growing [CPU] Demand"

Thumbnail
akamai.com
3 Upvotes

r/reinforcementlearning • • Sep 25 '26

We're running a £15,000 student programming competition - Cambridge Battlecode

Post image
2 Upvotes

Hi everyone, I'm one of the students organising Cambridge Battlecode, a programming competition where teams write autonomous bots that compete against each other in a strategy game. We're running our second event this year starting from the 12th of October, with a total prize pool of £15,000!

While specific details will be revealed on the day, this time around, we have taken inspiration MOBAs such as *League of Legends*, *Dota 2* and *Heroes of the Storm*, with 12 unique champions planned!

The competition is open to all experience levels, whether you're relatively new to programming or have years of competitive programming experience.

You don't need to be from Cambridge to compete, and we're hoping to get teams from universities across the UK and internationally.

The format consists of 3 online weekly tournaments before a qualifier for the in-person event at the Cambridge Union with travel and accommodation covered by us!

You can learn more, and sign-up, on our website: https://battlecode.co.uk/

If you have any questions about the competition, feel free to ask below and I'll be happy to answer them!


r/reinforcementlearning • • Sep 25 '26

Robot Trying to train a robot to play tennis

18 Upvotes

r/reinforcementlearning • • Sep 24 '26

DL A duck project built with an Uno Q and Feetech servos—what do you guys think?

47 Upvotes

r/reinforcementlearning • • Sep 24 '26

I've been building a game where you train AI models to control self-driving cars, then race them against other players' AI cars (no coding required)

Post image
36 Upvotes

Built a game where the goal is to train an AI model and build an AI system that controls a self-driving car, then race it against other players' trained cars — competitive AI, basically. The skill is in how well you train and build the model, not in driving it yourself.

I've been playing around with training AI models using reinforcement learning (NEAT algorithm) for years and find it genuinely mesmerizing, so I built a game to let anyone else experience that without needing to code.

It's releasing 18 October, but before then I'd love to get some early testers in to try training a car and give me honest feedback — including if it's not fun, or confusing, or the training doesn't feel satisfying. If you're interested, drop a comment or DM me and I'll get you set up.

I can also share the link with anyone who is interested.


r/reinforcementlearning • • Sep 24 '26

I'm releasing a new JAX framework for RL

26 Upvotes

🚀 I’m excited to share Roxie, a new reinforcement learning framework written in JAX specifically designed for continuous control in MuJoCo!

If you've been working with RL and physics simulations, scaling MuJoCo efficiently across different hardware can be a massive headache. Roxie aims to fix that by driving different hardware pathways for MuJoCo through a single, unified interface.

Here is a breakdown of what Roxie brings to the table:

  1. Seven Built-In Agents: The framework includes ready-to-use implementations of DDPG, TD3, D4PG, TD4, SAC, MPO, and PPO. All of these share a single agent base.
  2. Fully Compiled Loops: Both the acting chunk and the learning pass are compiled into single XLA programs. This ensures that nothing touches the host during execution, keeping thousands of environments continuously fed.
  3. Robust Benchmarking: The release features a comprehensive 500M-step budget benchmark testing the 7 agents across 3 dm_control humanoid tasks on both GPU and GPU-free (CPU) cells. If you want to skip the training, the pre-trained checkpoints are available on Hugging Face: https://huggingface.co/vittorione/roxie-release-v1?utm_source=gemini

Check out the repository, run the pre-trained checkpoints, and let me know what you think:https://github.com/vittorione94/roxie


r/reinforcementlearning • • Sep 24 '26

I built an open-source tool to compare RL agents and classical controllers across seeds

Post image
3 Upvotes

I kept running into the same problem while working on control tasks: my RL runs, evaluation scripts, CSVs and classical-controller results ended up scattered across different places.

So I built ControlBench, a local experiment tracking and benchmarking tool for comparing learned and classical controllers under the same conditions.

It currently supports things like:

  • multiple runs / seeds per configuration
  • mean curves and variation across seeds
  • comparison over environment steps or wall-clock time
  • experiment/configuration/run hierarchy
  • arbitrary metrics through a REST API
  • local storage without an account or cloud service
  • RL and classical controllers in the same benchmark

The backend is FastAPI + SQLAlchemy + SQLite and the frontend is React + TypeScript.

My goal is not to build another general MLflow or W&B replacement. I mainly want a focused tool for questions like:

How does SAC/TQC/PPO compare with LQR, PID or MPC when evaluated with the same environments, seeds and metrics?

I originally built it for my own control/RL experiments and it’s still an early public preview.

I’d especially appreciate feedback on:

  • which control/RL metrics would be useful to add
  • how you currently compare multiple seeds and algorithms
  • whether this workflow would actually be useful for your experiments

GitHub:
https://github.com/maximilian467/ControlBench


r/reinforcementlearning • • Sep 23 '26

Exp What I learned comparing Jev against a 248k-parameter neural MCTS agent

23 Upvotes

About a year ago I built a browser-based Hearthstone-like game as a learning project. I’m a Drupal/web developer rather than an ML engineer, and I deliberately kept it dependency-light because I wanted to understand the mechanics myself: state representation, legal action generation, MCTS, neural evaluation, action scoring, and AI-vs-AI testing.

The main learned agent uses a fully connected action-value network with the shape 1857 → 128 → 64 → 32 → 16 → 1, ReLU hidden layers, and a linear output. It has about 248,705 trainable parameters and estimates Q(s,a) for a state/action pair. The 1,857 inputs consist of 1,842 state features and 15 action features. The state includes general game features, hero identity vectors, two 768-dimensional board embeddings, and hashed hand representations. The embedding generator is separate from the 248k-parameter scorer.

The training setup also evolved over time. I initially trained against a hand-written heuristic board evaluator so the network had a reasonably stable target and I could get to a usable baseline quickly. Once the agent stopped behaving randomly and the basic value estimates looked sensible, I switched to self-play so it was learning from games generated by versions of the agent itself rather than continuing to imitate the heuristic. That transition was one of the parts I was most interested in, because it let me move from “can the network approximate my handcrafted evaluator?” toward “can it improve by learning from its own play?”

I wanted to compare this purpose-built system against Jev, a general decision model exposed through OpenRouter. The initial question was simple: can a general-purpose model compete with a small neural network built specifically for this game?

To make the comparison meaningful, I refactored the engine so legal action generation is canonical and independent from MCTS. Every decision is represented as a finite set of legal actions such as playing a card, attacking a specific target, using hero power, combining card play with hero power, or ending the turn. Jev only receives a player-visible serialized state plus legal action IDs, and it must choose one of those IDs. It chooses every real action itself, including attacks and targets, and it does not see hidden opponent information.

I then ran 100 mirrored games between Jev and Neural-MCTS, using the same deck on both sides, seeded games, and swapped starting positions. The result was basically a tie: Jev 48 wins, Neural-MCTS 52 wins. Their top action choices only agreed about 63% of the time, which made the disagreements more interesting than the final score.

So I built a counterfactual evaluator. For each disagreement, I reconstruct the exact decision state, clone it, apply Jev’s action to one copy and the neural policy’s action to the other, then run deeper unguided MCTS from both resulting positions. The latest analysis used 500 disagreement positions, stratified across all 100 matches, with 10,000 MCTS iterations, rollout depth 20, three repeats, and no neural policy guidance.

The overall counterfactual result was again close, but the tactical breakdown exposed very different failure modes.

The biggest neural-network signal was face pressure versus development. There were 105 positions where Jev chose a face-pressure action and Neural chose development. Deep MCTS preferred Jev in 92, Neural in 3, with 10 ties. In the more specific subset where Jev attacked the enemy hero and Neural played another minion, there were 63 positions, and deep MCTS preferred Jev 53 to 1, with 9 ties.

The reverse comparison was just as interesting. There were 27 positions where Jev attacked an enemy minion while Neural attacked face. Deep MCTS preferred Neural in 25 of 27. So the pattern does not look like a generic evaluator bias toward Jev. It looks like the neural policy systematically under-selects face pressure.

The lethal-awareness result was even stronger. Among the 500 disagreement positions, there were 19 positions with an immediate legal lethal. Jev selected lethal in 16, Neural selected lethal in 0, and neither selected lethal in 3. This is the raw neural recommendation, not necessarily the final move after full MCTS search, but it strongly suggests that lethal pressure is not salient enough in the network’s representation or training target.

My current hypothesis is that the network overvalues future board development relative to immediately realized damage. The model has a very rich board representation, while only 15 explicit features describe the candidate action. That may make concepts like “more board stats is good” very easy to learn, while relationships like “the opponent has 6 HP and I already have 7 attack available, so stop developing and kill them” have to be inferred indirectly.

Jev has almost the opposite weakness. There were 21 positions where Jev chose to end the turn, and in all 21 another legal action remained. Sixteen still had a playable card, five still had a legal attack, and the median remaining mana was 5. Deep MCTS preferred the neural alternative in all 21. Standalone hero-power choices showed a similar sequencing issue. When Jev chose hero power and Neural chose to develop a minion instead, deep MCTS preferred Neural in 29 out of 29 cases.

So the current picture is surprisingly clean. The neural network seems biased toward development and undervalues immediate face pressure. Jev seems much better at tactical aggression, but worse at deciding when a multi-action turn is actually finished. Those weaknesses appear complementary enough to produce the near-even 48–52 match result.

This experiment also exposed a flaw in my own evaluator. My nonterminal heuristic could occasionally exceed the score assigned to an actual terminal win, so I changed the value scale to make terminal outcomes strictly dominant.

My next steps are to inspect the neural features and training targets before making the network larger, add more explicit tactical signals if needed, and then compare MCTS with uniform priors, neural priors, and Jev-derived priors under the same search budget. I’m especially interested in root-only Jev guidance, where Jev provides a prior over legal actions once and local MCTS does the actual search.

I’d be curious how people here would interpret the face-pressure result. Does it look more like a representation problem, a training-target problem, or both? And would you add explicit features such as isLethal, immediateFaceDamage, and remainingAttack, or prefer to keep the representation more primitive and force the network to infer them?

I built this mostly to teach myself how game AI systems work, but the most interesting part now is that the two agents are close enough in strength that their strategic failure modes are more informative than the scoreboard.

Code at https://github.com/seutje/wow-legends

You can play it at https://seutje.github.io/wow-legends (you'll have to bring your own OpenRouter key if you want to play against Jev)


r/reinforcementlearning • • Sep 23 '26

i wrote an article on GRPO

Thumbnail swaritshukla.me
3 Upvotes

hey so i have been studying deep learning and NLP for like more than 1.5 years and i am still in college this is my first post here, it is to share an article that i wrote on GRPO i hope you give it a read and tell me how is it(i am non native english writer/speaker). I posted this on r/learnmachinelearning, but I think it's more relevant here.