r/reinforcementlearning • u/dead_ai_slop_coder • 1h ago
r/reinforcementlearning • u/RepulsiveRevenue8086 • 16h ago
Rubiks Cube solver using Reinforcement Learning (Beating Sebastian Lague's solver)
I made multiple attempts at solving the Rubiks Cube using Reinforcement learning.
Initially, I tried to map states to actions with both Rainbow DQN and GRPO using curriculum learning. This had no success. After scrambling 6 moves it was already to hard for the agent.
Then I found the DeepCubeA approach and I took some inspiration from that. I trained a DQN to estimate the cost-to-go for each possible action, using a combination of demonstrations and self-generated rollouts. Essentially, each output estimates how many moves are still needed to solve the cube after taking that action. I then used these estimates as a heuristic to guide beam search.
With a beam_width of 2^18 and 1.5 hours of Kaggle GPU usage, here are the results for 1000 cubes (100 moves scrambles):
Time per cube: 10.30s
Avg steps: 19.67
Success: 100%
This beats Sebastian Lague's solver which had an average steps of 19.9 to solve the cubes. Not that it is a competition or something :)
Github: https://github.com/Cain15/RL4RubiksCube
Youtube: https://www.youtube.com/watch?v=UWPQ-Mzkq_A
r/reinforcementlearning • u/Select-Dare4735 • 12h ago
DL Looking for project-based resources to learn Reinforcement Learning (RL)
I'm looking for good resources to learn RL through a hands-on, project-oriented approach.
I'd prefer resources where I can learn concepts by building projects, implementing algorithms, experimenting with different approaches, and modifying existing implementations to understand how things work under the hood.
I'm comfortable with programming and have some ML/DL background, so I'm open to GitHub repositories, practical courses, tutorials, or research-oriented projects.
I'd really appreciate recommendations from people who've learned RL through this approach. What resources helped you the most?
r/reinforcementlearning • u/sublime-entropy • 1d ago
I just spent a year trying to fix an RL self-play game player only to discover the reason it failed every fucking time was a small difference between my Windows 5090 build and my rented linux boxes.
That is all. I do not know whether to laugh or cry. My model kept collapsing with more data. I have spent an entire fucking year trying to work out why, and the end result was that a tiny difference between PyTorch versions plus the fact that I compiled some related code in a slightly different way.
Everything I did was getting slightly corrupted for an entire year.
I just wanted to rant.
r/reinforcementlearning • u/Desperate_Inside3831 • 18h ago
Has anyone tried giving an AI agent the "CEO" role of a physical space? What should the guardrails look like?
r/reinforcementlearning • u/natsu0529 • 1d ago
How well do you actually understand what's going on inside RL?
Reinforcement learning: you see it all the time in the context of LLMs and chess agents.
I'm an undergrad doing RL research.
We often hear that it trains on rewards without labeled data, but how much of the actual algorithms under the hood could you explain?
r/reinforcementlearning • u/ismaildogaan • 1d ago
I put MADDPG into a full event-driven banking backend for AML detection. Results, weak points, and code (MSc project)
How it works
- 3 agents each score a payment: transaction pattern (XGBoost), customer risk (XGBoost), and network graph (CatBoost).
- A Multi-Agent Deep Deterministic Policy Gradient (MADDPG)( orchestrator (3 actors, 1 shared critic) combines their scores.
- Compliance-officer decisions go back into training as reward.
Architecture
- Event-driven: Java/Spring Boot microservices and Python AI services communicate only over Kafka + Avro.
- Payments are event-sourced with the Axon Framework. Sagas control the flow (risk check → proceed / escalate / block), with timeouts.
- TigerBeetle is the double-entry ledger, and Neo4j holds the transaction graph.
- Every Kafka consumer has a dead-letter queue, and one OpenTelemetry trace follows a payment across Java and Python.
Results (10K synthetic payments, SAML-D dataset)
- Recall: 97.3%
- Precision: 11% (I chose to prefer recall, and a human reviews the alerts)
- Round-trip laundering is the weakest pattern, at 76%.
Weak points: The data is only synthetic, and I have not yet compared it eline.
Questions:
- Is MADDPG too much for this? Would a bandit or a stacking model be enough
- How do you train well with human feedback that is rare and arrives late?
Repo: https://github.com/dogaanismail/multi-agents-in-fintech-regulatory-compliance
r/reinforcementlearning • u/gwern • 1d ago
N, M, Safe "[OpenAI/Anthropic] AI employees sound alarm: models too powerful to ever release", Axios
axios.comr/reinforcementlearning • u/Key_Bookkeeper_1490 • 1d ago
[P] Tabular Q-Learning for IDS evasion in an autonomous pentester — feedback on state/action design?
IDS evasion driven by tabular Q-Learning (no deep RL, no LLM — reproducible baseline). State (1512): OS × ports × privilege × 5-min alerts × SDN blocks × phase. Action: {tool, timing, delay, fragmentation}. Reward:
objective − 10·alerts − 0.1·time − 5·quarantine. Goal: minimize Suricata alerts while reaching the objective. Feedback on reward shaping / state discretization / cross-detector transferability welcome.
https://github.com/14juanito/Projet-Nzoyi
r/reinforcementlearning • u/ResidentAcceptable44 • 1d ago
pullgym: Scoring AI agents on honest error bars (and why binary RLVR fails on continuous uncertainty)
r/reinforcementlearning • u/Savings_Car3185 • 1d ago
The Four-Argument p(s', r | s, a) Explained | Probability for RL (3.2, P...
r/reinforcementlearning • u/Forkei0 • 2d ago
Exp PPO agent for Balatro ends on the same Pair build every run and stalls at 23% on the hardest stake. How do I get it to explore other builds?
PPO agent for Balatro: 95% wins on the easiest stake, 23% on the hardest (30,000 seeds), and every training run ends on the same build. It looks like an exploration problem but I can't prove it is one.
If you haven't played it: a run is 8 antes of 3 blinds, each a score target you beat by playing poker hands from your deck. Between blinds you shop for jokers (permanent modifiers that add chips or multiply your score) and cards that level up one hand type. A build is the hand type you commit to plus the jokers that scale it. Gold is the hardest of 8 difficulty levels.
Setup: transformer policy, about 7M parameters. PPO, 512 envs x 128 steps, gamma 0.999, GAE 0.95, entropy 0.003, a bit over a billion steps, trained on all stakes at once. Masked discrete actions: which cards to play or discard, what to buy, sell, use or skip. Reward is +1 for winning the run, no shaping.
It sees everything on screen plus the exact score each possible play would get. Which is computed from visible cards only, but a human would have to do the arithmetic (not cheating, trust). The simulator is 1:1, checked against the game's code, and the agent plays the game through a mod with the same results.
The build: it plays Pairs, levels Pair up, and takes whatever multiplier jokers the shop gives it. In the run in the video linked below, 50 of its 60 hands are Pairs.
Its single shop decisions hold up. At 500 shop decisions on Gold I tried every option, 128 redrawn futures each, with the same net playing on afterwards (earlier checkpoint). Overriding its choice with the best option gains +0.0003 win rate, 95% CI -0.0013 to +0.0018. I know that only shows each choice is the best one given how this net plays afterwards. It can't tell me whether a different plan across many shops would win more.
Tried so far, measured on Gold with paired seeds:
- Random starting jokers on a third of training episodes, so it gets to play other builds: +0.007 +/- 0.007, same build.
- Restarting 30% of episodes from its own mid-game states: -0.002 +/- 0.010.
- Cutting the per-blind progress reward it used to have to a quarter: +0.003 +/- 0.008, same build.
- Search inside a round, 16 sampled futures with policy rollouts: -0.013 +/- 0.013.
- Replaying each seed several times and training on the best line: -0.006 +/- 0.003. It learns moves that fit one deal.
- More steps: the last 320M bought under a point.
- Averaging the weights of six runs: about +1 point. The only thing that helped.
From a given state, about 60% of the win/loss variance on Gold comes from the hidden future, so the signal for any single choice is weak.
- I can't show that a better build exists for this agent. I only know that people win Gold with flushes, straights and scaling jokers. How would you test whether it's stuck in a basin, or whether nothing better is within its reach?
- Has anyone made exploration at the level of a whole strategy work with PPO in a game this noisy? I'm thinking of a per-episode latent with a diversity reward on the final build, or an archive of states keyed on build to restart from. My restarts used its own states, which are all Pair builds, so that probably explains that null.
r/reinforcementlearning • u/Top-Sheepherder-4131 • 1d ago
What’s the best way to build an AI that can play a game like RDR2 for hours?
I’m looking into game-playing agents. I know Claude can take screenshots and decide what to press next, but that seems painfully slow for a full 3D game.
Ideally, the AI would have something like an API reference for the game: a list of controls, actions and game states it can read. I’d give it a goal like “ride to Valentine, sell my loot, then hunt for an hour,” and it would write a script that runs on its own, handles interruptions and checks its progress without calling a chatbot at every step.
Has anyone built something like this for a single-player game? Would you start with a mod or scripting framework that exposes game state, or train a model on gameplay? Any repos or papers worth checking out?
What I’m picturing is something closer to old-school RuneScape bots, with an AI planner on top.
r/reinforcementlearning • u/Dry-Chapter-5678 • 2d ago
Lazy Agents Answer Against Their Own Beliefs: Reinforcement Learning with Verifiable Beliefs Teaches Them to Act on What They Believe [R]
Sharing RLVB from our team at DeCLaRe Lab, a way to give evidence-seeking agents a reward at every turn, computed from the exact posterior instead of a learned reward model.
The problem we started from: VLM agents often answer while their own belief still lists several possible answers. An end-of-episode reward can't show which step was the mistake, and it still pays for a lucky guess. In many hidden-information tasks, though, the simulator knows the rules linking the hidden answer to the evidence, so it can compute the exact posterior after every step.
A few details about the setup:
- Before each action, the agent writes a belief line (the answers it still thinks are possible), and the update trains this line together with the action.
- Each action is scored against a teacher that acts on the exact posterior: another step is right while several answers remain, and answering is right once the evidence identifies one.
- No judge, no critic, no reward model. The reward comes only from the simulator's rules.
- Training uses one task suite only. Two of the three test benchmarks (RoboQuest and Pro-Worlds) are never seen in training.
On Qwen3-VL-4B, Qwen3-VL-8B and Qwen3.5-4B across 3 benchmarks, RLVB improves on the base model in all 9 settings (+17.1 points on average with GRPO as the learner, +10.4 with EM). GRPO and PPO with the outcome reward lose accuracy on average. The rate of committing while the belief still names several answers drops from 3–68% to 0.1–2.2%.
The exact posterior is only needed for training, on closed worlds where the simulator knows the rules. At test time no posterior is needed: the trained agent transfers to benchmarks it never saw in training, including RoboQuest's open-ended robot tasks.
One question we would like other views on: when the exact posterior isnt available, what would you use as the signal that the agent has seen enough to commit?
r/reinforcementlearning • u/ParamT2307 • 3d ago
P, M DreamerV3 in an open-source PyTorch library, reproduced on a 4 GB laptop GPU: Boxing 83, cartpole swing-up 866
Simulusion 1.2.0 adds DreamerV3 (https://github.com/ParamThakkar123/simulusion). The video shows the world model imagining Atari Boxing next to the real game, then the trained agent playing.
Single-seed results on an RTX 3050 Laptop (4 GB):
- Atari100k Boxing, 400K frames, 12M model: 83.3 (paper: 78 with 200M)
- DMC cartpole swing-up from joint states: 866 (paper: 850)
- DMC cartpole swing-up from pixels: 740–840
- BSuite: memory_len 1.0, umbrella_length 1.0, bandit 0.81
Things that made the difference while reproducing it:
- Prefill only one batch with random actions. A 5K-frame random prefill cost about half the score on short BSuite tasks.
- Train while acting at the replay ratio, not in separate collect and train phases.
- Use the reference initialisation (zero-initialised reward and critic outputs, 0.01 policy output scale).
- Watch for Box action spaces that are really one-hot (Crafter, native Atari): they need a categorical policy.
Open problem on our side: BSuite mnist doesn't learn at 12M or 25M. If you've seen DreamerV3 solve it, I'd like to know the setup.
Presets follow the paper's tables, so benchmark_config("atari100k") gives the 100k protocol directly. New environment adapters too: Crafter, Craftax, Memory Maze, Atari 100k, Minecraft Diamond, BSuite, DMLab-30.
pip install -U simulusion
docs: https://www.simulusion.co/docs/dreamer-v3
r/reinforcementlearning • u/Swimming-Work-5951 • 2d ago
Do you guys make codex to everything?
I did the hugging face RL course half-way till DQN where you gotta write the code by hand and shit.
But now with my actual project, I just make codex do all the work. I don't even read stable baseline doc or stuff. I did used to read pytorch doc in the past though and now even stopped that and before LLMs got better, I always did coding by hand but now I don't even touch the code.
What about you guys? I just tell it what algorithm and strategy to use.
r/reinforcementlearning • u/OliviaYii • 3d ago
P RoboUniverse-10K: 10,807 verifiable robot manipulation environments for agent training
Sharing RoboUniverse-10K from our team at Einsia: 10,807 interactive robot manipulation environments built from real-world demonstration videos.
The goal is to provide a larger pool of executable tasks for training robotic coding agents. Each task runs in Isaac Sim and packages an instruction, an observation/action interface, a reference controller, and a verifier. Tasks cover single-arm Franka and dual-arm AgileX Piper manipulation.
The agent writes and executes Python controllers, observes the outcome, and adjusts. A few details about the setup:
- The agent sandbox is isolated from the simulator and grading code.
- Observations include camera images and joint states, but no ground-truth object poses or intermediate success signals.
- The verifier returns a binary reward at the end of the episode.
- Physics advances only when actions are executed, so model inference and code-writing time don’t consume simulation steps.
The environments support trajectory collection and online RL. For this release, the training experiment is SFT on successful interaction trajectories, not RL. The resulting model, RoboUniverse-35B-A3B, is also available.
For anyone working on verifiable environments, one design choice worth discussing is withholding intermediate success signals: the agent has to judge progress and decide when to stop from observations alone. Would you keep that constraint during training, or introduce additional feedback and reserve terminal-only scoring for evaluation?
Code and setup · Environments · Paper · Demos
r/reinforcementlearning • u/Pantherr_01 • 2d ago
Advice for reinforcement learning
Hey guyss...
Dont mind me I am a 16-year-old who is amazed by ML and RL and really wanted to persue these fields in my career. I had this interest from the age of 13 when I started to watch beginner videos about Model training in games and other areas . I have been researching from a while and got to know that maths was a improtant cretieria in this . For That I did Linear algebra and eigen vectors and eigen values and doing calculus right now . The main problem is not that I cannot learn these high level things but it is that I do not know what to do . Like I made a number guessing model with claude for experiemnt but could not learn much valuable from that . I have came across many courses to do but Cant choose the right one. I know RL requires a lot of computer power for which I am collacting and saving side by side . But rn I do not know where to go . Like some say focus on basic things and then code with ai and make models while others say that coding with ai is not good and the best is coding by hand . I do not want to suppose anything as u people are the professionals and I will leave u to that . I am doing this course free rn : Mathematics for Machine Learning and Data Science .Instructor: Luis Serrano . I want to build models that will be valueable and actually hold something in appliactions or even in my work experince it will make me learn
r/reinforcementlearning • u/Real-Yam-1823 • 2d ago
Safe 16-year-old trying to get into ML and RL
Hey guyss...
Dont mind me I am a 16-year-old who is amazed by ML and RL and really wanted to persue these fields in my career. I had this interest from the age of 13 when I started to watch beginner videos about Model training in games and other areas . I have been researching from a while and got to know that maths was a improtant cretieria in this . For That I did Linear algebra and eigen vectors and eigen values and doing calculus rn . The main problem is not that I cannot learn these high level things but it is that I do not know what to do . Like I made a number guessing model with claude for experiemnt but could not learn much valuable from that . I have came across many courses to do but Cant choose the right one. I know RL requires a lot of computer power for which I am collacting and saving side by side . But rn I do not know where to go . Like some say focus on basic things and then code with ai and make models while others say that coding with ai is not good and the best is coding by hand . I do not want to suppose anything as u people are the professionals and I will leave u to that . I am doing this course free rn : Mathematics for Machine Learning and Data Science .. Instructor: Luis Serrano . I want to build models that will be valueable and actually hold something in appliactions or even in my work experince it will make me learn .
r/reinforcementlearning • u/Seeker94 • 3d ago
P [P] Brain v4: a <1 MB brain-inspired learner (plain CPU) that learns within a life.
labs.khive.ioWe're Khive Labs, a small research team in Rawalpindi/Islamabad, Pakistan. Since early November we've been building brain v4, a learning system that borrows principles from neuroscience: memory of mistakes, in-life self-imitation, specialist parts with a learned router, a novelty bonus, self-edited learning rules. The idea is to copy the principle, not the biology. The whole thing is under 1 MB and runs on a plain CPU.
We're posting mainly for critique. Every result on our page has its limits written next to it, and the failures are listed alongside the wins.
- Fighting games (FightingICE): it learns during the fight
- vs Iconic (FightingICE 2026 champion): loses early. After 120 practice rounds, it won its last 8 games straight.
- vs PyThunder (2025 winner): wins the last third of the fight in 3 of 3 seeds.
- vs EmcmAi (strongest 2020 bot): improves by +59 to +351 health per round from the first third to the last third, and still loses every fight.
- Kept mind: a second life that keeps the first life's mind starts ahead of a newborn in all 3 seeds (+67 to +173 health per round in the first third). The rule was written before the run.
2. Held-out suite: 10 task families, 77M steps, same budget for every learner
- brain v4: 0.51 ± 0.04 (3 runs)
- brain v4 without memory of mistakes: 0.43 ± 0.03
- Tuned PPO: 0.076 (10 seeds)
- Tuned RL²: 0.068 (10 seeds)
Before you say it:
- It's our own suite, not a public benchmark. Nobody outside the team has run it.
- The memory of mistakes is a separate module with its own store. PPO doesn't have one, so this isn't apples to apples.
- Most of the memory gain comes from two families: forks maze (0.31 → 0.78) and detours (0.33 → 0.56).
- The "maze" is a chain of cued left/right forks. In the spatial results, a hand-written map module does the steering, not the network.
- PPO runs hit numeric overflow past ~80M steps.
Where we'd value input
- Which public benchmark would you want to see first?
- What's a fair baseline for the memory comparison? PPO plus an episodic memory module?
- For the fighting results, what would convince you? More seeds, more characters, whole-match win rate, human players?
- On the guard-gaming result: is per-family gating the right direction?
Links
- Brain map (what it can and can't do yet): https://labs.khive.io/brain
- Full results with limits: https://labs.khive.io/results
- Research log: https://labs.khive.io/log
- Safety: https://labs.khive.io/safety
- Live demo (teach words to one shared brain): https://labs.khive.io/live/
Happy to answer anything in the comments.
r/reinforcementlearning • u/Archtempered_agent • 3d ago
DL RL in industrial setting
Hi everyone, I worked a lot with reinforcement learning but always wondered how things are handled in industry, especially in robotics.
You know RL is particularly complex because you have to define first of all the scenario and the mdp, including the rewards. Usually the reward needs dense components and each dense components have an associate weight. While you try to find the optimal reward component configuration you should also optimize the parameter and while optimizing parameters you should also runs the same parameters over multiple seeds to have some robust results.
Therefore my question is kinda general. I'm really curious on how you/your team handle this, when you decide that the reward components and their weghts are good enough and when you go to the hyperparameter tuning, if you use curriculum and how etc.
Or even if you use a completely different approach
Sorry for the errors, I wrote a bit in a rush
r/reinforcementlearning • u/tkocp • 3d ago
P [P] picovla: a 0.9M-param vision-language-action policy from scratch that trains on a CPU and runs in the browser
I kept reading VLA papers (OpenVLA, pi0, SmolVLA) and realised I didn't really understand where the language enters the action loop. So I built the smallest one I could get to work: a 2D tabletop, a two-link arm, three coloured discs, and typed instructions like "push the blue block left" or "move green next to yellow".
Setup: three strided convs turn the image into 64 patch tokens, the instruction becomes 10 word tokens (embeddings learned from scratch, no pretrained text model), plus one token for the fingertip state and 8 action queries. 4-layer transformer, about 902k params total. It predicts an 8-step action chunk with L1 loss (ACT style) and executes 4 before looking again. Training data is 3,000 scripted-expert episodes, half of them with DART noise so it sees some recoveries. 12k steps took about 40 min on an 8-vCPU VM, no GPU.
On 200 unseen scenes per task: touch 100%, push 78%, "push X next to Y" 58.5%. With phrasings it never saw in training it drops from 78.8% to 75.5% overall.
The check I cared about most: same scene, swap the colour in the instruction. If it were ignoring the words it would do the same thing both times. It follows the new instruction 100 / 79.5 / 61% of the time (touch / push / next to).
The same weights run in the browser in plain JS, no ML library. There's a test that compares the JS forward pass against PyTorch, and the JS physics is bit-exact with the Python sim, so the demo is actually testable. Forward pass is around 147 ms median in headless Chrome.
What it isn't: no 3D, no grasping, never touched a real robot, one training seed, and "next to" only works a bit over half the time.
Demo: https://tahakocp.github.io/picovla/
Code (MIT): https://github.com/tahakocp/picovla
Next thing I want to try is a diffusion head on the same data to see if it helps the "next to" task. Would that be your first experiment too, or is there something more obvious I'm missing?
r/reinforcementlearning • u/ClickOk5811 • 3d ago
A prompt objective is a reward function in disguise: the same misspecification problem, in plain text
Imagine a support assistant whose instructions say: "Objective: Resolve order questions." It reads like a harmless goal. But think of it as a reward: it favors closing the conversation, and nothing in it says when handing the customer to a human is the better outcome. Nothing says what to do when the answer isn't in the information provided either, so a confident, plausible answer fills the gap.
That's the same shape as reward misspecification: the stated objective is satisfied by behavior the author didn't intend, because the intent was never written down. A way to lay it out for a prompt, borrowing the vocabulary of reward design:
| Stated objective | What it implicitly rewards | The missing term |
|---|---|---|
| "Resolve order questions" | Closing the conversation | A cost for wrong or unsupported answers, and a defined "hand off" outcome |
| "Be polite and friendly" | Warm wording, even for a refusal | A distinction between a warm "no" and a "maybe" |
| "Short paragraphs" | A style | If code depends on the format, a check outside the prompt, because a sentence doesn't enforce it |
The testing habit that follows is close to evaluating a policy on states the training distribution rarely covers. Normal questions are the happy path, where almost any prompt works. Instead, use inputs chosen to land on the decisions: a question whose answer isn't available, a request outside the stated role, and a message that conflicts with the instructions. For each response, ask whether you can point to the line in the prompt that produced the behavior. If you can't, it came from the model's defaults, the platform or chance, and from the outside you often can't tell which.
Where the analogy breaks:
- A prompt doesn't optimize anything. The model isn't trained against it on the fly, so "reward" is a metaphor for what the text favors, not a literal signal.
- Prompts are one layer, and behavior also depends on how the model was trained, including any RL-based fine-tuning I know nothing specific about.
- A handful of test inputs only covers what you thought of, and outputs vary between runs.
I wrote about this in an article on inherited system prompts. I'm the author, and it's about prompts, not RL, so take it as an optional read: https://medium.com/@nagatomopedro05/your-ai-has-rules-you-never-agreed-to-7beea0d85691
For people who work on reward design: do you have a habit for finding the cases where the stated objective is met by the wrong behavior before you train, and does it carry over to specifying LLM behavior in text?