Reinforcement Learning Lab

Eight reinforcement-learning labs: classical, deep, policy optimisation, bandits, planning and multi-agent, with experiments trained for real in your browser.

39interactive experiments

Reinforcement Learning Lab

RL Algorithms Library

A detailed page for every algorithm: idea, mechanism, equations, pseudocode, strengths, limits, complexity, hyperparameters and applications. The badge says honestly whether it is implemented in the lab or only explained. Tick two or more to compare.

  • 37Documented
  • 30Implemented

Real, runs in the browser

Q-learning

Value-based · Beginner

It moves Q(s,a) toward the target r + γ·max Q(s′,·), so it learns the value of the optimal policy even while behaving exploratorily (off-policy).

Real, runs in the browser

SARSA

Value-based · Beginner

The target uses the action a′ that will actually be taken, not the best one, so it learns values that account for the risk of exploring.

Real, runs in the browser

Expected SARSA

Value-based · Intermediate

The target is r + γ·Σ π(a′|s′)·Q(s′,a′): the randomness of choosing a′ is removed from the update.

Real, runs in the browser

Double Q-learning

Value-based · Intermediate

Two tables QA and QB are kept: one picks the argmax and the other evaluates it, and one of them is updated at random each step.

Real, runs in the browser

Monte Carlo control

Value-based · Intermediate

The actual return G_t is the target: Q(s,a) moves toward the average of the returns observed after visiting (s,a).

Real, runs in the browser

TD(λ)

Value prediction · Intermediate

The current TD error is credited to all recent states with a weight that decays at rate γλ, so learning propagates faster.

Real, runs in the browser

Dyna-Q

model-based · Intermediate

Learns a simple model (s,a)→(r,s′) and uses it for n extra updates after every real step.

Real, runs in the browser

Value iteration

Dynamic programming · Beginner

V ← max_a Σ P(s′|s,a)[r + γV(s′)] is a contraction that converges to V*; the greedy policy with respect to V* is optimal.

Real, runs in the browser

Policy iteration

Dynamic programming · Beginner

Greedy improvement on V^π guarantees a policy that is no worse; it terminates in a finite number of iterations.

Real, runs in the browser

DQN

Value-based · Intermediate

Approximate Q(s,a;θ) with a network and train it by regression on a TD target computed with a frozen target network, on random minibatches from a replay memory.

Real, runs in the browser

Double DQN

Value-based · Intermediate

Target: r + γ·Q(s′, argmax_a Q(s′,a;θ); θ⁻) instead of a max on the target network itself.

Real, runs in the browser

Dueling DQN

Value-based · Intermediate

In many states actions hardly matter; learning V(s) shared by all actions speeds up generalisation.

Real, runs in the browser

Prioritised experience replay

Value-based · Advanced

The probability of sampling transition i is proportional to |δ_i|^α; the loss is multiplied by an importance weight w_i to compensate for the bias.

Real, concurrency emulated

Rainbow-lite

Value-based · Advanced

The study shows that combining improvements helps more than each alone, and you can ablate each component to measure its effect.

Explained only (not implemented)

DRQN

Value-based · Advanced

The internal memory summarises history when the current observation does not determine the state.

Real, runs in the browser

REINFORCE

Policy gradient · Intermediate

The gradient of expected return is E[ Σ ∇log π(a_t|s_t)·G_t ], estimated from full-episode samples.

Real, runs in the browser

REINFORCE with baseline

Policy gradient · Intermediate

Subtracting a function that does not depend on the action leaves the expectation unchanged but lowers the variance.

Real, runs in the browser

Actor–Critic

Actor–critic · Intermediate

The TD error δ = r + γV(s′) − V(s) is the advantage estimate: it guides the actor and trains the critic.

Real, runs in the browser

A2C

Actor–critic · Intermediate

Gathering steps from several environments reduces temporal correlation and stabilises the estimate.

Real, concurrency emulated

A3C

Actor–critic · Advanced

The diversity of parallel workers' experience reduces correlation without a replay buffer.

Real, runs in the browser

PPO

Policy gradient · Advanced

The clipped surrogate objective keeps r_t(θ) within ε of 1, giving TRPO-like stability at lower complexity.

Real, runs in the browser

TRPO

Policy gradient · Advanced

Optimise the surrogate objective under the constraint KL ≤ δ; solved approximately with conjugate gradient and a line search.

Explained only (not implemented)

DDPG

Actor–critic · Advanced

The actor is trained through the critic's ∇_a Q.

Explained only (not implemented)

TD3

Actor–critic · Advanced

Taking the minimum of two critics reduces over-estimation.

Explained only (not implemented)

SAC

Actor–critic · Advanced

Adding an entropy bonus encourages exploration and robustness.

Real, runs in the browser

ε-greedy

Bandits · Beginner

Simple fixed exploration: guarantees every arm is visited but keeps exploring even after the best is known.

Real, runs in the browser

UCB1

Bandits · Intermediate

Optimism in the face of uncertainty: uncertainty raises the bound, so the arm is tried.

Real, runs in the browser

Thompson sampling

Bandits · Intermediate

Choosing an arm with the probability that it is the best.

Real, runs in the browser

Gradient bandit

Bandits · Intermediate

Policy gradient for a stateless problem: preferences of actions that beat the average are raised.

Real, runs in the browser

LinUCB

Contextual bandits · Advanced

Ridge regression per arm with a confidence bound that shrinks as data accumulates.

Real, runs in the browser

IQL

Multi-agent · Intermediate

Simple and scalable, but the environment looks non-stationary because the other agents' policies change while learning.

Real, runs in the browser

JAL

Multi-agent · Intermediate

Fully centralised: one virtual agent chooses a joint action.

Real, runs in the browser

Tabular VDN

Multi-agent · Advanced

The simplest form of centralised training with decentralised execution (CTDE).

Explained only (not implemented)

MADDPG

Multi-agent · Advanced

The centralised critic handles environment non-stationarity during training.

Explained only (not implemented)

QMIX

Multi-agent · Advanced

Monotonicity guarantees that the joint argmax decomposes into individual argmaxes.

Explained only (not implemented)

MAAC

Multi-agent · Advanced

Attention helps scale with the number of agents.