
How to Design a Reinforcement Learning Environment
Most beginners assume the algorithm is the hard part of reinforcement learning. Pick the right one, tune it well, and the agent will learn. Then they spend…
Read tutorialTeach readers to turn algorithms into trustworthy experiments by defining environments, choosing metrics, diagnosing failure, and separating learning progress from lucky episodes.
Tutorials
Follow the learning path in order or jump directly to the RL concept or experiment you need.

Most beginners assume the algorithm is the hard part of reinforcement learning. Pick the right one, tune it well, and the agent will learn. Then they spend…
Read tutorial
Your agent just nailed an episode. It reached the goal, collected a beautiful stream of rewards, and you felt that rush of validation. Then you rerun it,…
Read tutorial
Your agent runs. The loop completes. No exceptions are raised. And yet the reward curve sits there like a flatline—or climbs promisingly for two hundred…
Read tutorial
Your agent is doing one of two things: nothing, or the wrong thing. When rewards never arrive, it wanders forever without learning. When rewards arrive too…
Read tutorial
You changed two things at once. The agent got better. And now you have no idea which change earned the improvement.
Read tutorial
Most people start reinforcement learning the wrong way. They install a deep RL library, copy a DQN or PPO example, watch the agent fail—or worse, behave…
Read tutorial
Two knobs. One update rule. If you are starting out in reinforcement learning, it is tempting to treat the learning rate and discount factor as twin dials…
Read tutorial
Your Q-learning agent trains beautifully for ten thousand steps. The loss curve dips, the reward trend climbs, and you start to believe the hard part is…
Read tutorial
Your agent crushes its training level. Every episode, the same flawless path, the same high score, the same satisfying convergence curve. Then you move one…
Read tutorial
Your agent keeps walking into walls. It selects skills still on cooldown, tries to buy items it cannot afford, and bumps against the grid edge like a moth…
Read tutorial
An offline RL agent can report a sky-high value for an action it never actually tried. The critic is extrapolating into territory the dataset never…
Read tutorial
Imagine training an offline agent and watching its Q-values climb steadily. The critic grows more confident. The policy selects actions with increasing…
Read tutorial
A policy that scores perfectly in simulation is not a policy that works in the real world. It is a policy that solved the simulator.
Read tutorial
You have a new policy that looks promising. The next step feels obvious: deploy it, watch it interact with the real environment, and measure what happens.…
Read tutorial
A higher estimated value is not proof of improvement. It is a hypothesis about actions the dataset may never have supported.
Read tutorial
You train an offline agent on a fixed dataset. The final score looks strong. The learning curves climb. You feel the quiet satisfaction of a result that…
Read tutorial
You have a dataset of logged trajectories collected under one policy, and you want to know what a different policy would have earned. The naive…
Read tutorial
A penalty is a price. A constraint is a wall. Most RL safety problems fail because practitioners build walls out of prices and then act surprised when the…
Read tutorial
Your agent proposes an action that crosses a hard safety boundary. You can block it, replace it, or fall back to a known-safe controller. The naive…
Read tutorial
Two policies can share the exact same expected return and still feel completely different to the person who has to live with the outcomes. One delivers…
Read tutorial
A novelty bonus can make your agent look busy without making it look smart. The intrinsic-reward curve climbs, the state-visitation heatmap fills in, and…
Read tutorial