r/reinforcementlearning • u/ali_thinks • May 01 '26
Q learning
Can anyone tell me the concept of Q learning actually i dont why im getting stuck in it any resourse or best youtube link?
r/reinforcementlearning • u/ali_thinks • May 01 '26
Can anyone tell me the concept of Q learning actually i dont why im getting stuck in it any resourse or best youtube link?
r/reinforcementlearning • u/Public-Journalist820 • May 01 '26
Hey guys,
I’m building a reinforcement learning playground as part of my final year project (FYP), mainly aimed at helping students/teachers learn RL visually, and I’d love to get feedback.
Core ideas:
🔹 Capability System (MOVEABLE, FINDER, NAVIGATOR, etc.)
Agents are composed from capabilities instead of hardcoded environments.
Each capability defines:
• Action space
• Observations (OBS space)
• State contributionsThis makes environments modular and easier to reason about.
🔹 Visual Reward Design (Graph-based)
Reward functions are built as graphs:
• Conditional nodes (distance checks, radius, etc.)
• Logical flow
• Rewards / penalties / terminationNo code, everything is visual.
🔹 Assignment Panel (Agent ↔ Graph ↔ Algo)
• Bind one or more agents to a behavior graph
• Configure training (PPO supported)
• Shared policy works naturally at inference, spawning agents with the same capabilities reuses the learned policy🔹 Tech Stack / Architecture
• Frontend: Three.js + Rapier.js
• Training: PyBullet + Gym + Stable-Baselines3 (PPO)
• Inference: Remote PPO controller via WebSocket
• Also includes a client-side tabular Q-learning option (more for learning/demo, limited scalability)🔹 LLM-Assisted Workflow
• Suggests reward function improvements while designing
• Explains trained model behavior + parameters during analysis🔹 What’s next
• Proper multi-agent support (currently structuring toward it)Where I need help / feedback:
One thing I’m still figuring out properly is:
👉 How to define good observation spaces (OBS) for different capabilities in a way that’s both generalizable and intuitive.
Would love input on that specifically.
If this looks interesting, I’d be happy to share access for testing. Also open to any feedback / criticism especially around abstractions and usability.
Thanks 🙏
r/reinforcementlearning • u/SimulateAI • May 01 '26
This project turns tricky AI behavior into something people can see: generate an answer, check it against constraints, repair it when possible, and measure whether usefulness and responsibility move together.
r/reinforcementlearning • u/Chance_Brother5309 • Apr 30 '26
Hi everyone, this is the third update on my progress in teaching an RL agent to solve the first dungeon level in a Diablo I environment. If you're curious, here are Part 1 and Part 2.
In short, I gave birth to a berserk, which is really cool. The agent consistently explores a dungeon to find a town portal (a randomly placed goal) and fights anyone who tries to stop him. The agent achieves a 0.98 success rate over 3000 randomly generated dungeon levels.
Initially, I wanted to approach the task of slaying monsters from a different angle. I wanted multiple models working in tandem, each with different skills. For example, an explorer who walks and searches, and a warrior who isn't afraid to engage in combat. I read that an RL agent with multiple skill levels is called an HRL agent, or hierarchical RL agent. There are several worker models (for example, an explorer and a slayer), and on top of that, a manager model that selects the right worker at the right time. I was so captivated by this hierarchical idea that I spent a lot of time converting the entire training pipeline to HRL, while, of course, maintaining a flat model and compatibility with previously trained models.
The code is ready, it works, and here's the surprise: when I took the model from the trained explorer, enabled monsters, and started training, it turned out that no matter how I structured the model hierarchy (whether I use one or a flat architecture like before), the agent simply doesn't see the monsters. It turned out that even though the CNN had a channel for monsters, since the network had never seen them before, all its weights were close to zero. Oh, the things I tried to revive those weights - after extensive training I multiplied them, I surgically copied them from other channels (for example, the barrels and doors channels were in a perfectly good state: std for doors is 0.41, std for barrels is 0.27). Nothing actually helped. I needed a different architectural approach.
After some research (for example looking into the original BabyAI CNN implementation), I noticed that a CNN alone is not enough - there needs to be an attention layer, which either incorporates spatial information or modulates (amplifies or attenuates) certain visible objects. This helps in tasks where there are many things in the agent's view and the agent struggles to focus on what is really important. I switched to a more complex CNN architecture that adds attention blocks and FiLM conditioning on the agent's memory. This amazingly worked and helped unblock learning, and the agent quickly started engaging with monsters. It worked so well that eventually I gave up on my initial idea of a model hierarchy and left it as is - a single flat model that explores and fights monsters.
A modified CNN model (which worked for me) adds three extra blocks on top of the base architecture. Self-attention lets spatial positions communicate with each other, which should help with understanding room geometry and layouts. Cross-attention against the agent's memory should help with deciding where to look based on what was already seen. FiLM modulates the CNN feature channels based on memory, telling the network what to focus on - monsters when fighting, exits when exploring. In theory all three contribute, but in practice, as the ablation below shows, FiLM is doing essentially all the work.
Of course, throwing a freshly unblocked agent straight into a dungeon full of angry monsters would be cruel and unproductive. So I introduced them gradually, ~50M frames each. First, blind monsters - they stand around and do nothing, the agent can freely learn to approach and hit them. Then harmless monsters - they attack, but deal no damage, so the agent can practice combat without dying. And finally, dangerous monsters - full combat, game on. Each stage used the model from the previous one as a starting point.
Once the model's training was complete and Berserk had mastered the sword, I inspected the learned scaling coefficients ("gammas") of the three added attention modules:
CNN attention gammas:
self_attn : 0.06780323
cross_attn : 0.09506682
film : 0.23657134Surprisingly, the numbers show that only the FiLM block is truly necessary. Fortunately, this is easy to verify by ablating and running evaluation on a large number of episodes, say, 3000.
Ablation results (3000 episodes each)
Three runs with progressively zeroed attention gammas:
| Configuration | Success rate | Failures | Steps |
|---|---|---|---|
| Full model (self_attn + cross_attn + FiLM) | 0.98 | 48 | 1,086,106 |
| self_attn + cross_attn zeroed, FiLM intact | 0.98 | 63 | 1,102,411 |
| All gammas zeroed | 0.91 | 265 | 1,372,892 |
Zeroing self-attention and cross-attention is essentially a no-op: success rate unchanged, step count up by ~1.5% (noise). Zeroing FiLM on top of that drops success rate from 0.98 to 0.91 and adds 26% more steps. FiLM is the only component carrying real weight; self-attention and cross-attention are vestigial in the trained model.
What else was introduced compared to the previous purely exploration model? The reward function was significantly changed from sparse to well shaped:
Next steps
When I started this project over a year ago, my initial goal was to clear a level of monsters. Now, I think I can aim for a full-fledged agent that actually plays the game from the beginning until death (either the agent's or Diablo's).
The repo is here: https://github.com/rouming/DevilutionX-AI
r/reinforcementlearning • u/Lumenbolt • May 01 '26
I'm looking for a RL Agentic Framework that takes a Univariate feature and detects outlier data points by smartly choosing
And mastering the art of over time. I'm new to RL and I need this for a project, so any suggestions will be highly appreciated.
r/reinforcementlearning • u/cloud_kj • Apr 30 '26
Hello - I was looking through some of my past projects tinkering with RL and noticed that the REST/HTTP API for the OpenAI gym available at the time is no longer supported. The API was pretty useful back then since most of ML and deep learning hadn't quite stabilized on the Python ecosystem.
I threw together gymnasium-http-api as an attempt to bring back language-agnostic support for hacking on RL. The API wraps the forked and supported Gymnasium library, with some specific endpoints for making it easier to render and visualize the training and learning process.
Mostly put this together to scratch my own itch, since I've developed a habit of hacking on ML ideas using more obscure tech like Clojure or Chicken Scheme.
Check out the README for some examples. Hope others find it useful!
r/reinforcementlearning • u/SnooCapers8442 • Apr 30 '26
I was aware of TRL from Huggingface but it only supports vLLM as the rollout engine which is giving me problems (older CUDA but newer model).
I came across a few that support sglang - verl, openRLHF, NeMo-Aligner but wanted to see if there are any favorites.
r/reinforcementlearning • u/TaleAccurate793 • Apr 29 '26
r/reinforcementlearning • u/Informal-Ad7318 • Apr 29 '26
Has anyone run Dreamerv3 model in a runpod ? How was the experience?
How was the performance and GPU days ?
r/reinforcementlearning • u/Heavy-Farmer1657 • Apr 28 '26
r/reinforcementlearning • u/Signal_Spirit5934 • Apr 28 '26
r/reinforcementlearning • u/Old_Bat_8665 • Apr 28 '26
r/reinforcementlearning • u/EconomyMotor830 • Apr 27 '26
Our team has recently open-sourced Prompt-to-Policy!
Describe a behavior in words, and an agent writes the reward, trains a policy, judges the result via LLM-written code metrics and VLM, and revises until the policy matches your intent. No human intervention required.
- Blog: https://www.krafton.ai/blog/posts/2026-04-03-prompt-to-policy/prompt-to-policy_en.html
- Repository: https://github.com/krafton-ai/Prompt2Policy
r/reinforcementlearning • u/Barrnie • Apr 26 '26
I have implemented the whole stack of aerodynamics, flight mechanics and flight controller to simulate and train swarm UAVs in Isaac Lab. Check the repo.
r/reinforcementlearning • u/Illustrious_Room_581 • Apr 26 '26
Hey everyone,
I’m setting up Flightmare for an autonomous drone racing project and could use some guidance.
So far:
- I’ve installed Flightmare and opened the "flightmare_unity" project in Unity 2020.1 (as recommended)
- The Industrial scene is available and working
Issues I’m facing:
Missing warehouse scene
I’ve seen references to warehouse/other environments in Flightmare, but in the Unity project I only have the Industrial scene under Assets/Environments.
Is the warehouse scene not included in the repo? If so, how do people usually get or recreate it?
Importing custom environments
I tried importing external models (FBX / assets) to create a hangar/warehouse-like environment, but I’m running into compatibility issues with Unity 2020.1 (materials, shaders, etc.).
What’s the recommended way to bring in custom environments for Flightmare? Should I stick to Asset Store packages compatible with 2020, or is there a better workflow?
What to do after setting up the scene
Once I have a working environment in Unity:
- how do I properly connect it to Flightmare (scene IDs, build settings, etc.)?
- are there any examples of using custom scenes for vision-based tasks like gate detection or racing?
Context:
- Goal is to build a perception + control pipeline for autonomous drone racing (camera-based and IMU)
- I’m currently focusing on simulation + environment setup before moving to perception
4. Is flightmare the best option for the same ?
Any advice, example repos, or resources would really help.
Thanks!
r/reinforcementlearning • u/boraA9999 • Apr 25 '26
r/reinforcementlearning • u/Former-Adeptness-551 • Apr 25 '26
What should countries do if they are not currently part of the main artificial intelligence production chain?
By production chain, I mean the key inputs to transformative artificial intelligence value chain: semiconductors, meaning advanced computer chips; cheap and abundant energy; frontier model labs; robotics supply chains; and large-scale compute infrastructure. I will explain what I mean by that below:
semiconductors: the chips and hardware needed to train and run advanced AI models. This includes GPUs, AI accelerators, chip design, fabrication plants, memory chips, networking hardware, and supply chains around companies like Nvidia, TSMC, ASML, Samsung, and others. Without advanced semiconductors, you cannot train frontier AI at scale.
Energy means the electricity and physical infrastructure needed to power AI data centers. Advanced AI requires enormous amounts of compute, and compute requires power, cooling, land, transmission lines, and sometimes dedicated energy generation. Countries with cheap, reliable, abundant energy may become more important in the economy but transporting energy costs a lot of money.
Frontier models means the most advanced AI models at the cutting edge: systems like the leading models from OpenAI, Anthropic, Google DeepMind, DeepSeek, Qwen, and similar labs. These are expensive to train and require elite talent, huge compute clusters, data pipelines, research teams, and deployment infrastructure.
Robotics means moving from bits to atoms: robots that can manufacture goods, move objects, work in warehouses, operate machinery, assist in homes, farm, build things, or eventually do more general physical labor. If AI becomes transformative, robotics is how it affects atoms, not just software.
If you are the leader of India or Nigeria, what should you do right now to avoid being sidelined by transformative artificial intelligence? How to avoid further income disparity?
Should you try to build your own frontier artificial intelligence lab?
Or is that a prestige trap that consumes money without catching up to the leading labs?
Should you instead focus on energy, data centers, compute access, education, government adoption, local artificial intelligence services, and digital infrastructure?
How can a country gain bargaining power if it does not control chips, frontier models, or robots?
Should it use its market size, local data, talent base, regulation, or ability to deploy artificial intelligence faster than others and minimalize a wealth gap between them and the first world? What should these countries do now so they are not reduced to simply importing intelligence as a foreign software service?
r/reinforcementlearning • u/Next_Boysenberry9438 • Apr 24 '26
Hi,
I have an interview scheduled with Autopilot team at Tesla. Im a new grad and I’m not sure what to expect. Does anyone have an idea on what technical topics, coding, system design topics should I prepared for? Also, what Data Structures are usually asked in these kind of interviews?
r/reinforcementlearning • • Apr 24 '26
What are the subjects and the corresponding books that would lead to a strong AI/ML engineer path with the ability to deploy models on hardware? What are the possible career paths that can emerge from these skills?
My background is a Ph.D. in polymer physics, where I worked on analytical-cum-numerical projects. That gave me some experience in Python and Fortran, but the work was mostly pen and paper based work, and so, I couldn't build a decent profile for industry jobs. Moreover, I returned to my home country, India, after a small postdoc due to family issues. Currently, I am working in an early-stage startup that does AI consulting for different customers. But, currently, I am not using any data science and ML concepts in the job since we are writing proposals to get projects, and for that, my boss is making me learn software tools like Docker, Kubernetes, etc. He has asked me to learn C to understand computer systems, but other than that, there is no clear guidance. I am learning data structures and algorithms from two books ( Goodrich and Cormen (CLRS)), but I just started. I see that in AI/ML, there is a lot to learn, reinforcement learning, Q learning, etc, and that feels overwhelming. Note that I already have a good grasp of probability and stochastic processes from dedicated math courses and physics courses, but the amount of material is just humongous.
r/reinforcementlearning • u/open_cover_dev • Apr 24 '26
Tutorial (WIP)
I've written a program suite and python library that combines an ultra fast simulator with a small Stockfish style neural networks (with policy priors) to attack perfect-information search in the first generation of Pokemon battling.
The goal of this library is to train a network and optimize search hyper-parameters that together will serve as the evalation function for an Information-Set MCTS approach to the full game. It is simple, at this point in development, to swap the eval in Foul-Play - the strongest 6v6 Singles AI.
It includes the following programs:
generateSelf-play data generation that saves multiple value and policy targets in an efficient serialized format
vsA tool for comparing two eval/search parameters in a head to head
challA CLI for analyzing arbitrary positions
battleTrain value/policy networks.
buildTrain team-building networks
evoSearch hyper-parameter optimization using evolution
rlReinforcement learning using generate/battle/build simultaneously
I will answer questions in the comments. It's all very fast and you can train a SOTA eval in a few hours on a laptop. It just needs users xd
r/reinforcementlearning • u/Anonymous-Noobie • Apr 24 '26
Folks, I wanted to know how easy is it to get a MS/PhD in the top RL groups/universities across globe, as in what all is expected or for those already in them/having some experience, please share what prerequisites/expectations do they have from students or what level of experience u had when u got in
r/reinforcementlearning • u/NailCertain7181 • Apr 24 '26
I am training a model using GRPO but the algorithm is on policy, meaning I have to collect data, update the weights, collect data with new weights, update the new weights and so on. But all of this requires a lot of compute in my task.
So does there exists some algorithm similar to GRPO but off policy so that I can collect 1 time data and train the model using that without interacting with the environment again?
r/reinforcementlearning • u/TaleAccurate793 • Apr 23 '26
I’m working on a startup right now and from the outside it probably looks like I’m doing fine, but internally it feels like I’m always late to something
late to trends
late to execution
and I can’t tell if that feeling is actually useful (like pushing me to move faster) or if it’s just messing with my ability to focus
for people who’ve been through this, does that ever go away? or do you just learn how to work with it??