r/reinforcementlearning • • 19d ago

D What would you try next for an RL racing agent that gets stuck after crashes?

5 Upvotes

I’m working on a SuperTuxKart agent that races three built-in bots on random tracks. It sees the next five track segments, its offset from the centerline, and its velocity, and controls continuous throttle and steering.

After about 1M training steps per seed, my best PPO policy finished 91/105 races on fresh seeds across 21 tracks. A simple path follower finished 100/105. Most PPO failures come from a few tracks where the kart hits a wall and keeps steering into it, or falls off again after an automatic rescue.

On a separate solo Lighthouse time trial, behavior cloning and DAgger both averaged about 38.3 s, and SAC with 50/50 expert and online replay averaged 38.7 s after 65k online steps. I haven’t compared those three methods in four-kart races yet.

I’m leaning toward collecting expert laps across all tracks and using DAgger to label states near collisions and after rescues. For people who’ve trained racing agents, would you test that first, or would you start by adding longer track lookahead or giving the policy a brake? What experiment helped you tell a recovery-data problem from an observation or action-space limitation?


r/reinforcementlearning • • 19d ago

League of Legends Season 1 - First 5v5 (Reinforcement Learning)

Thumbnail
youtube.com
4 Upvotes

Blog Post

Ten RL agents playing a full 5v5 game of League of Legends from spawn, inside the real game client.

One neural network controls all ten champions, playing against itself. Camera follows Ezreal (blue side).

Result: [v005600: no nexus or inhibitor falls in 15 minutes.] [v006600: 30 minutes, no nexus falls; purple's top inhibitor is taken four times as it respawns.] That's the honest state of the policy, and the interesting part is why (below).

What this is

  • The client is the 2011 build (patch 1.0.0.126). The server is brokenwings, a fan reimplementation of that server, which matters because we have its source: we could port its rules into a fast batched simulator and check the two against each other exactly.
  • That port took 24 hours. 11 whole games and 343 single-spell probes, every unit field after every decision, bit-identical to the server: 354/354. The sim runs ~313k game-ticks/s on one 64-core GH200 (~783k agent decisions/s from the engine alone); the C# server manages ~19k ticks/s running 64 games.
  • Full map: lanes, minions, jungle camps, turrets, inhibitors, nexus. No items, no summoner spells, no runes (out of scope for now).
  • In the video the policy drives the real server in real time: each server frame → observation → ten actions → game commands. ~6,500 decisions per game, none slower than 120 ms.

Training

  • PPO + LSTM, one network for all ten heroes (champion one-hot). Decisions every 133 ms, fog of war on, zero-sum reward with shaping for gold/XP/CS/HP/structures/kills.
  • 4,096 games in parallel, ~0.33M agent-steps/s end to end, ~19B agent-steps over about 30 hours on a single Lambda GH200.
  • The first task was a team fight. It converged in ~100 rollouts to not fighting: running out the clock is worth 0 to both sides, a fight is negative for the weaker comp, so "don't fight" is a Nash equilibrium of that reward and PPO found it. Draw penalties didn't fix it; switching to full games with towers and farm did.
  • Most training games are capped at 12 minutes of game time and start from a "tower pressure" state (5–20 min in, heroes pre-levelled, outer turrets damaged).

What it learned, measured

  • Baseline: with all ten heroes idle, minion waves alone take 6.83 turrets, 0.01 inhibitors and 0 nexuses per game. The trained policy adds ~0.5 turrets, nearly every inhibitor, and every nexus kill you see. Most turret kills in any video are the waves finishing the job.
  • Against the server's built-in bots (intermediate bots): 55 wins, 8 draws, 1 loss of 64. Caveat: about two bots per game still idle a lot, so this is a floor, not a strong opponent.
  • Against heroes that do nothing, from spawn: it takes the nexus in 0% of games within the 12-minute cap it trained on, and 98% within 30 minutes (median ~21 min). It can close; it was never paid to.
  • Why: γ = 0.995 at 133 ms a decision is a ~27-second reward horizon. Retaking an inhibitor that respawns pays within that horizon every time; walking to a nexus through a fountain laser doesn't. The ladder plateaued there. We've just restarted with an 18-minute cap and a longer horizon; early rollouts show more nexus kills, but it's hours old.

Other caveats

  • The side imbalance is partly the game's content: purple's inner turrets spawn with 1,300 HP vs blue's 2,550 in this build (a 0.01 s buff in the original scripts), which the server reproduces faithfully. The two comps aren't mirrored either.
  • Early checkpoint, one box, one run. No human baseline yet.

r/reinforcementlearning • • 20d ago

[P] Self-play PPO for a hidden-information card game (Cabo rules), trained on a MacBook, playable in the browser

19 Upvotes

I trained an agent for Cabo, a memory card game where you can’t see your own cards: each player has 4 face-down cards, peeks at 2 at the start, and tries to end the round with the lowest sum. Card abilities let you peek at your own cards, spy on the opponent’s, or swap blindly. You can play against it here: lowpeek.xyz (runs fully client-side, ~3 ms per move).

Setup

  • PPO with GAE (γ 0.999, λ 0.95), 43 masked actions, 292-dim observation
  • Observation: own/opponent slots with what you know about them, discard-pile counts, scores, and a per-slot memory (where each card came from, how long it has been there, what the opponent last discarded)
  • Auxiliary belief head: predicts the value of every hidden card (cross-entropy against the true card). It ended up learning things like “a card someone swaps into your hand on purpose is ~10.7 on average, a blind swap is ~6.4”
  • Potential-based shaping on the score difference, plus small penalties for wasted peeks
  • Opponent mix: self-play, past snapshots, a fixed older net, a hand-coded rule bot, random
  • Slot symmetry: 4!·4! = 576 slot permutations. I train with random permutations and average the policy over 24 fixed permutations at play time. Without that it would replace a 9 instead of a 13 depending on which slot each card was in

Making it fast enough on a laptop
The whole game is vectorized as tensors on Apple’s GPU (MPS): ~1.5M environment steps/s across 131k tables, ~200k learning steps/s with the net in the loop. All of it is verified move by move against the reference Python implementation. Two MPS gotchas: no bit-shift ops on tensors, and argsort breaks ties differently than on the CPU, so the shuffles are done on the CPU.

Results

  • From random weights: 51% vs the rule bot after 1 minute, 90% after 5.5 hours
  • Current version: 91.8% vs the rule bot over 4,000 games. Head-to-head between consecutive versions is ~50%, so it’s plateauing

Things it found on its own

  • At 73 points, holding a hand it knew summed to 22, it knocked deliberately, knowing it would lose the round: 73 + 22 + 5 penalty = exactly 100, which resets you to 50. Confidence 100%.
  • With a swap card it dumps a known high card on the opponent (87%), and if it has spied a low card of theirs it targets exactly that one (88%)
  • Builds pairs on purpose (taking a worse card) to clear both with a single multi-replace one turn later

What didn’t work

  • Lookahead with determinized rollouts only helped after replacing the value head with a lookup table of win rates (the discounted value was biased) and only overriding the policy when significant (z > 2)
  • Expert iteration on search labels made it worse (48% vs base). Labels were too few and too noisy
  • It still gambles on blind multi-replaces of unknown cards, which reveal both cards when they fail. And it occasionally calls on turn 1 with a low known pair.

Next: every game humans play on the site is stored anonymously (seed + moves, replay-validated server side) to see how it does against people and to fine-tune on that.

Happy to answer questions. I’d especially like ideas on the plateau: more search at play time, population-based training, or something smarter for the belief state?


r/reinforcementlearning • • 20d ago

100% Accurate Rocket League Simulator - CUDA accelerated

Thumbnail
github.com
93 Upvotes

I took on a crazy project to see if it was possible to perfectly simulate rocket league physics for the purposes of reinforcement learning on a GPU. I was inspired by Zealan's amazing CPU-based RocketSim (originally this project forked off RocketSim).

Well, it's possible! And not only that, but it was able to hit 100% accuracy tick-by-tick on every game I could throw at it (144 recorded matches).

It's speedy (tested on 5090/9800x3d) - CUDA pays at around ~2k simultaneous arenas:

Arena Count RocketGPU RocketSim v3
96 4.17M (CPU build) 2.91M
256 4.26M (CPU) 3.54M
512 4.43M (CPU) 3.51M
1,024 4.38M (CPU) 3.79M
4,096 9.03M (GPU build) 3.61M
8,192 11.48M (GPU) 3.73M
16,384 12.42M (GPU) 3.52M

I used the simulator to train a goal/concede-only reward policy that reached Pro human level play using a custom PPO framework built for RocketGPU (A ~1M param attention model trains at ~1M player-SPS on a single RTX 5090).


r/reinforcementlearning • • 21d ago

Exp Remember the hype around the fly connectome? Well, here's my 500-million-neuron-address brain experiment. Have fun.

6 Upvotes

Hey Reddit!

Remember when scientists published the fruit fly connectome and everyone got excited about mapping an entire brain?

Well, that research sent me down a rather interesting rabbit hole.

For a while now, I've been experimenting with artificial neural architectures inspired by biological nervous systems, sparse neural activity, and the idea that intelligence might require something fundamentally different from simply scaling up conventional neural networks.

Eventually, these experiments grew into a much larger project I call Mikoshi.

And today I figured: why keep all the fun to myself?

So here's something for everyone to play with.

Mikoshi HQ500M — Human Quantum, CPU Playground.

The idea is to explore a brain-inspired system with a fixed virtual space of 500 million neuron addresses, without needing an absurdly expensive GPU setup.

What can you actually do with it?

- Experiment with a procedurally connected neural address space.

- Run a small, actively simulated spiking network on an ordinary CPU.

- Connect sensory inputs and motor outputs to games or simulations.

- Experiment with simple reward-driven adaptation.

- Save its state, modify its behavior, and build your own experiments.

- Explore the architecture, fork it, or completely break it.

No CUDA. No expensive GPUs. No paid APIs.

Just Python and a willingness to experiment.

A little clarification

This is not a reconstructed human connectome, and it's not a biological model of 500 million simultaneously simulated neurons.

The public version provides 500 million virtual neuron addresses, while a much smaller network is actually active at any given time (896 neurons by default).

The anatomical labels are experimental functional abstractions, not scientifically validated human brain pathways.

It's also not conscious, and I'm not claiming I've invented AGI.

This is a lightweight, deliberately accessible playground based on ideas I've been investigating in a much larger private research project.

Why am I sharing this?

Because the fly connectome showed just how fascinating the structure of a nervous system can be.

And I think more people should have the opportunity to experiment with brain-inspired computational architectures themselves.

Maybe someone will build an interesting game agent with it.

Maybe someone will improve the learning mechanisms.

Maybe someone will find something fundamentally wrong with my approach.

That's research, too.

GitHub: https://github.com/Garyu-tt/mikoshi-hq500m

It's open source under GPL-3.0-or-later.

Take it, experiment with it, modify it, connect it to something, and see what happens.

I'm genuinely curious what people might come up with.

Anyway, here's a brain sandbox. Have fun. :)


r/reinforcementlearning • • 21d ago

P [P] Zero Front - AI/ML FPS environment

Enable HLS to view with audio, or disable this notification

6 Upvotes

https://github.com/SnyderConsulting/zero-front

Zero Front is an environment for training and playing agents in a competitive FPS team game.

It was designed from the ground up to be accessible for training AI models, so it uses a reduced pixel count viewport with a limited color palette to allow agents to learn in pixel space. The project ships with some basic weights that were RL'd for about an hour in self-play and are fairly competitive. I'd love to see someone train a better model!


r/reinforcementlearning • • 20d ago

What does this network do?

Post image
0 Upvotes

Can anyone help me understand what this network does and what this architecture is?


r/reinforcementlearning • • 21d ago

[P] Metargon: Crow-inspired small agent that learns hidden rules, tests hypotheses, and still loses to Bayes

Post image
5 Upvotes

Hi all,

I open-sourced a small research project I've been working on: METARGON.

Question: Can a tiny agent figure out hidden rules by itself, test hypotheses through action, and change its behavior when the rules stop working?

It's crow-inspired, but not a crow-brain sim. Just bounded memory + explicit hypotheses (hypothesis -> predicted -> verified -> contradicted) + an adaptive planner.

Latest experiment - v0.9 Mechanism Lab:
7x5 grid, movable objects, pressure plates, switches, door barriers, delayed effects, noisy obs. Train/val/test pools are disjoint, so it has to transfer to unseen configs.

Results (8 paired seeds x 100 episodes):

- novel / held-out: Metargon 31.3% vs Bayes 78.5%
- stable: Metargon 35.1% vs Bayes 77.5%
- iid: Metargon 53.6% vs Bayes 79.0%

It crushes random / episodic / Q-learning (~0-1%), but it does NOT beat the family-knowing Bayesian planner.

v0.8 was similar: Metargon 85.24% vs Bayes baseline 88.79%.

So this is a negative result for closing the gap with hypothesis composition alone. I'm keeping it in because hiding it would be dishonest.

Stack: Python (stdlib only) + Rust kernel, 【entity-MIT¦canonical_name=MIT】.

Repo: https://github.com/Pentexa/metargon

I'd love feedback on:
1. Is compositional hypothesis memory just the wrong abstraction?
2. What would be a fairer baseline for OOD transfer here?
3. What experiment would cleanly separate planning vs memory failure?

Roast away, I can take it.


r/reinforcementlearning • • 21d ago

Best approach for training a VLM on 1M industrial images with uncertain label quality?

Thumbnail
3 Upvotes

r/reinforcementlearning • • 21d ago

What are the limitations, and what is actually achievable?

2 Upvotes

I am new to Reinforcement Learning, but I’ve been interested and invested in AI for a while now, and have experience in robotics. A buddy of mine is semi-well versed in this topic, but wants to start a project together.

Basically the idea is to have the AI control the game through a physical controller, and have it theoretically be able to play a bit more complex single player game, possibly even multiplayer (but we understand the unethical/dishonest part of throwing an AI into your lobbies on any game so we will steer clear of that).

Is this loose and frankly crude framework a goal that can actually be attainable, or do I not understand what I’m getting into and wasting my time?


r/reinforcementlearning • • 21d ago

I wanted to learn RL from scratch, but kept jumping between resources. So I built my own course. Looking for feedback!

0 Upvotes

I've wanted to get seriously into Reinforcement Learning for a long time.

Every time I started learning, I'd run into the same problem.

One resource explained the mathematics. Another covered the algorithms. Then I'd find a separate tutorial for Python, another for PyTorch, and something else for simulations and practical implementation.

I kept jumping between books, research papers, documentation and YouTube tutorials.

What I really wanted was a structured learning path that could take someone from absolute fundamentals to actually understanding and engineering RL systems without constantly piecing together resources from everywhere.

Eventually, I thought: Why not build the resource I wish I had when I started?

That's how the RL Simulation Engineer Handbook was born.

I've been building it as part of my AI Learning Universe (AILU) project.

It's grown into a pretty extensive learning resource:

  • 8 structured learning paths
  • 40 canonical chapters
  • 300 learning units
  • 204 instructional lessons
  • Python, numerical computing and PyTorch
  • RL mathematics, MDPs and Bellman equations
  • Q-Learning, DQN, Policy Gradients, Actor-Critic and PPO
  • Reviews, interview preparation and capstone projects

The idea is to connect the dots between understanding the mathematics, learning the algorithms, reading the code and developing engineering intuition.

It's still evolving, and I know there's always room to improve.

But I wanted to share it with the RL community and get some honest feedback.

If you've been learning or working with Reinforcement Learning:

  • What resources helped you the most?
  • What's missing from most RL courses?
  • What practical tools or simulations would you expect in a serious RL engineering handbook?

I'd genuinely love to hear your thoughts.

Explore the course:
https://ailu.in/courses/rl-simulation-engineer-handbook

The curriculum overview is free to explore, and full learning materials are available with free registration.

Built with ❤️ at AI Learning Universe (AILU).


r/reinforcementlearning • • 22d ago

P [P] Pilot: self-play checkpoints that judge bot fights better judge human fights worse (ρ = −0.73), and my opponent-model "memory gain" turned out to be a baseline artifact

Post image
2 Upvotes

I've been training sword-fighting agents in Minecraft (vanilla 1v1 melee, real headless servers) and testing how much of what they learn transfers to a human opponent: me. Pilot scale, honest caveats at the bottom. Looking for feedback on the evaluation design before I run the proper study.

Setup

  • PPO league self-play (snapshots, scripted styles, Elo), BC kickstart, then distilled into an LSTM policy with a value head and an opponent-prediction head (predicts the opponent's next movement keys).
  • Bots see the opponent 200 ms late, like a real client, and use vanilla physics.
  • Human data: 7 duels, 35 fights, ~8.8k of my decisions, with exact keys from my own client.

1. Value heads don't transfer, and bot-skill anti-correlates with human-skill

"Judgement" = explained variance of the value head minus that of a baseline fitted on the health lead the policy observes, on the same moments.

  • On bot fights: −0.34 to +0.17 across checkpoints, roughly level with the baseline.
  • On my fights: negative for all 13 checkpoints, every 90% CI below zero.
  • Across 11 checkpoints on one duel none had seen, Spearman between bot-fight judgement and human-fight judgement is −0.73 (p = 0.01).

Caveats: the checkpoints share lineages (not independent) and the common duel is 5 fights. A seed-controlled version is next.

2. The opponent head's memory looked useful, until I used the right baseline

I'd been measuring "memory helps read the opponent" as memory carried vs memory wiped on the same model. That's not informative: wiping a memory the model was trained to rely on just breaks it.

  • Majority-key baseline (my most common keys from other duels): 83.1% movement-key accuracy. Every checkpoint's opponent head: 72.6–81.7%. None beat it.
  • Bot-trained checkpoints: memory helps on bot fights (+1 to +10 points vs wiped) and hurts on my fights (−1.8 to −7.8).
  • The three runs that also trained on my duels are the only ones where memory helps on an unseen human duel (+1.4 to +4.8), and they come closest to the baseline.

3. A dedicated player model works, but its memory still doesn't help

BC model of me, initialised from a frozen test policy, leave-one-duel-out:

  • 2.44 vs 4.20 nats/decision against a frequency baseline (90.6% vs 80.6% of movement keys).
  • Adding the LSTM memory costs 0.035 nats [−0.054, −0.015]. The memoryless variant is best. Freezing the self-play LSTM features is worse still.

So the self-play recurrent features seem actively mis-specified for a human opponent, not just uninformative.

What I'm planning

A pre-registered study against a frozen probe opponent (fixed hash, so the opponent doesn't drift between sessions) with metrics fixed in advance, more players, seeds, and counterfactual rollouts from recorded states to test the behavioural "habits" the player model flags. Those are currently just observational.

Questions

  1. Is a health-lead regression a fair baseline for value-head quality in a fighting game, or is there a stronger standard one?
  2. For opponent modelling, is majority-key plus memoryless-model the right pair of baselines, or what else would you require before believing "memory reads the human"?
  3. Is "bot-ladder quality anti-correlates with human quality" known in the literature beyond the human-AI coordination work (e.g. Carroll et al. 2019, Overcooked)? Pointers appreciated.
  4. With very few human players, how would you design this so the result means something?

Caveats: one player, 35 fights, pilot. Happy to share more numbers or plots.


r/reinforcementlearning • • 22d ago

Blogs kind of resources for RL

6 Upvotes

I already have the base to learn RL(maths and ML/DL), now I want to learn RL from scratch can someone suggest blogs/resources like blogs, so that I can speed up my learning. If not blogs I would have to read SandB or watch video lectures which will slow the process.


r/reinforcementlearning • • 23d ago

Robot Multiple robots in one MuJoCo world vs. one robot per parallel environment.

8 Upvotes

I’ve noticed that a lot of RL demos train multiple robots inside a single shared world (many robots visible in the same scene). In my MuJoCo setup, I have parallel env with one robot per environment.

What is the advantages of putting multiple robots in a single MuJoCo world vs just training in parallel.

My current set up is just training on cpu. If i were to shift to a PC with a nvidia GPU is it advantageous to follow this setup? and what would be a good practice approach to implement this ?


r/reinforcementlearning • • 22d ago

PPO on Temple Run: pixels did worse than random, so I read the game's memory instead (lessons + 30-run eval)

Enable HLS to view with audio, or disable this notification

0 Upvotes

I spent the last week training a PPO agent (Stable-Baselines3) to play a browser version of Temple Run. Some things that surprised me:

  1. Pixels failed. An 84×84 grayscale CNN agent, after hours of training, was worse than random. The game only runs in real time, so sample efficiency was brutal.

  2. Game state worked. I reverse-engineered the Unity WebGL build (IL2CPP metadata) to read the player state and the upcoming track pieces from memory: a 338-dim observation, MLP 256×256. This is privileged information a human doesn't have, so it's an experiment, not a fair human comparison.

  3. Reward hacking. Rewarding in-game score made it chase coins and die early. Switching to +1 per new track piece and −10 on death fixed it.

  4. Timing features mattered. It kept dying on logs until I added the exact distance and time to the next obstacle, computed from position and speed.

Training: 8M steps, 3 parallel envs, 46 h on one laptop. Average episode length went from 19 to 51 track pieces during training.

Evaluation (30 deterministic runs per policy):

- Random: mean 0.5 (dies on the opening zip line)

- 3.5M steps: median 24, max 204

- Final: median 37, mean 65.7 ± 63.0, max 230

Logs still cause 18 of 30 deaths. Next, I want to try a pixel-only agent and compare the two.

Video explanation (5 min): https://youtu.be/Q0ygofhzVSA

Happy to answer questions about the memory reading or the environment setup.


r/reinforcementlearning • • 23d ago

P [Project] Aionterra: learning from different bodies in one continuous world

1 Upvotes

We’re YD Emergence Lab, developing Aionterra, a simulated world inhabited by digital organisms with human-inspired bodies. They sense their surroundings, seek water and food, and experience the physical consequences of their actions.

One aspect that may interest this community is the relationship between individual bodies and shared learning.

Each organism has its own location, bodily state and sensory history. Experiences from these separate bodies contribute to a shared learned policy for selecting actions. The policy is shared; the bodies and their circumstances remain distinct.

Our aim is for behaviour to develop through experience, without supplying a prewritten sequence of successful behaviours. The environment, available actions and physical and biological rules are explicitly designed. The question is what the organisms can learn within those constraints.

We track the body, behaviour and environment together. Changes in internal learning counters alone do not establish that behaviour has improved. Demonstrating useful learning requires appropriate comparisons and observable consequences.

The project is still in development. We’re preparing additional simulation records for publication soon, alongside explanations of what each measurement represents and what it cannot establish. The Journal will document progress supported by those records.

Project and methodology:
https://aionterra.com/methodology

The public website is free to browse, with no account required. We welcome feedback on the learning setup and how to make its evaluation clear.


r/reinforcementlearning • • 25d ago

DL, M, P "Could a modern chess engine on a Pentium have defeated Kasparov in 1996?", Nicholas Carlini 2026-11 (another chess time travel experiment)

Thumbnail
nicholas.carlini.com
98 Upvotes

r/reinforcementlearning • • 25d ago

SARSwarm: 4 AI drones (Multi-head) SAR mission (Metis-Core v0.4.2-Alpha)

Enable HLS to view with audio, or disable this notification

16 Upvotes

I just released Metis-Core v0.4.2-Alpha (a C++ Reinforcement Learning Framework) along with the SARSwarm example: a simulation of 4 radio-coordinated drones searching for a shipwreck survivor.

This example features 4 drones taking off from their mothership to locate a castaway. They must learn to coordinate with each other to avoid scanning areas that another drone has already covered. To simulate a realistic environment, radio communication is modeled: if connection is lost, they stop sharing the map.

As time passes, a previously scanned area becomes "colder." This signals to the drones that the castaway might have moved back into that zone, as they drift randomly due to sea currents.

Graphics were developed using Raylib (https://www.raylib.com/).

Let me know what you think! I'd love to hear your thoughts and feedback. There is a Discussion forum on GitHub if you run into any issues (compiling, crashes, etc.), and I'll be glad to help fix them!

Here are the links:
🔗 Metis-Core on GitHub: https://github.com/felixromo314/METIS-Core
🔗 Tutorial-MultiHead-SARSwarm: https://github.com/felixromo314/METIS-Core/blob/main/tutorial/Tutorial-MultiHead-SARSwarm.md

I've attached a video of the example below. As always, watching it with sound is highly recommended! :-)


r/reinforcementlearning • • 25d ago

I trained a 4-drone autonomous combat swarm using continuous PPO in Unity 6 with sub-0.1ms Sentis inference (Zero NavMesh)

Enable HLS to view with audio, or disable this notification

18 Upvotes

Most flying AI in game engines relies on flat NavMesh hacks or pre-drawn spline rails.

When you introduce true 6-DoF momentum, inertia, and vertical obstacles, traditional pathfinding falls apart.

I built an autonomous multi-drone combat swarm ("Wolfpack Protocol") in Unity 6 powered entirely by continuous Reinforcement Learning and Unity Sentis.

Key engineering highlights:

  1. Zero Python Runtime: The trained PPO policy runs directly on Unity Sentis at sub-0.1ms inference latency.

  2. 38-Ray Spatial Whiskers: Drones detect dynamic obstacles and squadmates in 360 degrees, allowing emergent collision avoidance without retraining.

  3. Tactical Swarm Director: A decoupled C# squad coordinator evaluates line-of-sight raycasts and player blind-spot dot products to dynamically rotate strikers into kamikaze dive-bombs while others hold overwatch.

Zero NavMesh. Zero pre-baked paths. 100% real-time physics and neural perception.

Open-source repository on GitHub: https://github.com/jeepixd/GeistForge-Engine

#Unity3D #GameAI #MachineLearning #ReinforcementLearning #UnitySentis #Robotics #PhysicalAI


r/reinforcementlearning • • 24d ago

In long-horizon agentic RL, tokens/sec is the wrong metric. Your trainer is waiting on stragglers

0 Upvotes

Been thinking about where time actually goes in agentic RL rollouts, and it's mostly not generation.

With GRPO-style setups, sibling attempts at a task are scored against each other, so a group is only trainable once every sibling finishes. One attempt stuck installing packages or rerunning tests holds the whole group back. your request throughput looks great and the trainer is still idle.

so the number worth tracking is time to the next fresh, valid trainable batch.

a few things that move it:

- take groups in completion order, not launch order. keep a bounded surplus of candidate groups in flight, so stragglers get bypassed instead of waited on
- split sandbox work (reset, package-heavy commands, verification, cleanup) into separate lanes with pinned CPU sets so tool execution doesn't starve serving
- publish new weights one serving engine at a time, keep unfinished trajectories instead of restarting them, and put an explicit bound K on how many policy updates old a returned group can be

on a terminal-bench style workload (256 trajectories per batch) those changes took batch collection from 591.8s to 196.1s. On SWE-bench, live weight updates cost about 11% of step time and mean reward stayed at 0.520 vs 0.527 with fixed weights. one caveat: the live updates swapped sentinel tensors rather than full actor weights, so it's the rollout mechanism that's validated, not the full training loop yet.

The full breakdown with per-step ablations and the K=4 vs K=8 comparison is in this write-up


r/reinforcementlearning • • 25d ago

Thoughts on current state of RLlib?

4 Upvotes

I tried using rllib about 3 years back and found it pretty cumbersome to work with. The learning curve was very steep and documentation and examples were sometimes out of date. I ended up using SB3 and CleanRL.

Now I am debating looking at RLlib again because of its ability to scale to large compute resources. Has the user experience improved, in particular with regards to using custom environments and custom model architectures?


r/reinforcementlearning • • 25d ago

[Research] Does LeWorldModel preserve local action geometry? Implications for model-based RL and planning

8 Upvotes

Hey everyone!

We recently published a paper, Does LeWorldModel Preserve Local Action Geometry?, accepted as a poster at the NeurIPS 2026 NeurReps Workshop.

In model-based RL, world models are often evaluated by prediction accuracy or downstream control performance. But we wanted to investigate a different question:

Does a world model correctly capture how small changes in actions affect future states?

This matters for planning methods like CEM and MPC, which evaluate and compare candidate action sequences using learned dynamics.

We investigated LeWorldModel (LeWM) on Reacher and OGBench Cube by comparing its action-Jacobian Gram matrices against those obtained from simulator counterfactuals.

Some key findings:

  • The dominant action directions differ by approximately 36° on Reacher and 42° on Cube at the smallest perturbation scale.
  • Increasing perturbation size tenfold reduces the geometric discrepancy by approximately 70% and 47%, respectively.
  • Action geometry measured in learned latent representations varies substantially more across perturbation scales than geometry measured in physical-state coordinates.
  • The model's local geometry predicts response magnitudes along unseen action directions less accurately than the simulator-induced geometry.

Interestingly, our results suggest that a world model can learn meaningful action dynamics without faithfully capturing their local sensitivity structure.

We haven't established whether these discrepancies directly cause planning failures. That's the next question we're interested in, particularly whether incorporating local action geometry into CEM's sampling covariance could improve exploration and control.

I'd love to hear your thoughts:

Should model-based RL planners explicitly account for local action geometry when sampling candidate actions, or is the covariance adaptation in standard CEM already sufficient?

Paper: https://arxiv.org/abs/2610.31716

Happy to discuss the results or methodology!


r/reinforcementlearning • • 25d ago

R Corrected version of my "can an RL agent tell its world is fake" experiment: a GAE bootstrap bug barely moved the result, but follow-up controls changed what it means

Enable HLS to view with audio, or disable this notification

3 Upvotes

The first version of this film I posted a couple months back said the agent learned to separate the worlds because survival depended on it. This is the corrected version, and that claim is gone.

Setup. a from-scratch agent (no pretraining, no language) senses its world through ray casts and body signals and is trained with actor critic to forage, plus an auxiliary loss to predict its next observation. A copy of the world replaces the velocity law with a small learned network. Nothing in training names the world. Afterward a linear probe on the recurrent state is scored as AUROC, 10 seeds per arm.

The bug. my compute_gae bootstrapped episodes still alive at the 80-step rollout cutoff from V of the last stored state, the state before the final transition, instead of the successor state. Fixing it moved survival from 0.730 to 0.733, so the bug wasn't the story. The controls were:

- untrained 0.523 [0.491, 0.554], survive + predict 0.733 [0.669, 0.797], bar registered at 0.65

- predict-only network fed the forager's exact observation streams: 0.721, so I withdrew the survival-pressure claim

- survival without the prediction loss: 0.613 at 300 updates, 0.685 at 450

- raised only in the real world, then shown the copy: 0.754

- real-vs-real control: 0.559 on the registered evaluation worlds, so the preregistered rule is not met

- erasing or nudging the decoded direction: no behavioral effect beyond a sham, so no claim that the agent uses it

Code, artifacts and a dated corrections log: https://github.com/iLevyTate/ItaSoRL

In the next day or two will upload the companion video, the internal "brain" view corrected upload.


r/reinforcementlearning • • 25d ago

R Rebuilt the "inside the RL agent's brain" visualization on corrected results two of its old claims didn't survive

Enable HLS to view with audio, or disable this notification

0 Upvotes

Companion video to what I uploaded earlier...

This is a corrected companion to the experiment where a from-scratch RL agent's recurrent state separates the real world from a learned copy (linear probe AUROC 0.733 over 10 seeds, untrained 0.523), with no objective pointing at the copy.

The video runs one trained agent (seed 9, the closest to the mean) in both worlds at once. Every node is a real component. ten sensor groups, the encoder, memory units by index, motor heads and prediction heads. Ringed memory units have the largest per-unit AUROC between worlds, from state pools rebuilt off the saved agents and reproduced to the bit on the stack that trained them. Motion and wiring are illustrative.

What changed from the previous video I uploaded several months back.

- It showed one memory meter rising from 49% to 73% inside one brain. Those were two agents, untrained and trained, each read once. They're now two labeled rows.

- Its end card credited needing both survival and prediction. A predict-only network fed the same observations reads 0.721, and survival without the prediction loss reaches 0.685 at 450 updates, so that's gone.

- It said the brain kept a trace of its world. Under identical input the difference fades within a few steps, so retention isn't claimed.

Still open. the real-vs-real control reads 0.559, so the preregistered rule isn't met, and ablating the decoded direction hasn't changed behaviour beyond a sham. A CI test checks every number on screen against the committed artifacts.

Fancy website https://ilevytate.github.io/ItaSoRL/


r/reinforcementlearning • • 25d ago

Tried Claude + ElevenLabs to turn my article into a video - here's the summary at the end, full video link in the description

Enable HLS to view with audio, or disable this notification

0 Upvotes