AI subject guide

What is reinforcement learning? Learning actions from their consequences

Reinforcement learning, or RL, studies how an agent can choose actions to improve cumulative reward through interaction with an environment. An action can change what happens next, so the learning problem involves sequences of decisions rather than only independent predictions.

SchoolWhool's current learning path covers Python, Data Tools, Maths, Statistics and classical Machine Learning. Open lessons' parts and key terms are free to read.

The vocabulary of a reinforcement learning problem

Agent and environmentThe agent chooses actions; the environment produces the resulting observations and rewards. Their boundary is part of the problem definition.
Observation and stateAn observation is what the agent receives. It may reveal only part of the underlying state, which can make choosing an action harder.
ActionA permitted choice, such as a move in a grid. An action space defines the available choices or their valid range.
Reward and returnA reward is feedback from an interaction. Return combines rewards over time according to the task's definition, rather than looking only at the next reward.
PolicyThe rule or learned mechanism used to choose actions from available information. A policy can be simple and need not be a neural network.

An example: a small delivery-grid simulation

Imagine a learning exercise in which a simulated courier moves through a grid to a destination. The observation describes its location and nearby obstacles. The actions are permitted moves. The exercise designer defines rewards for reaching the destination and costs for undesirable behaviour.

Keep this a simulation with an explicit specification. Decide what ends a run, whether a move can fail and how the layout changes between runs. These choices define the task before any algorithm is trained; a score means little without them.

How RL differs from supervised learning

A supervised model can learn a mapping from inputs to supplied correct targets. In the grid exercise, supervised imitation would require examples of the desired move. RL instead evaluates consequences under a reward scheme, including consequences that appear after several actions.

The agent's choices influence which situations it encounters. An easy route taken repeatedly can leave other routes poorly explored. For your project write-up, distinguish performance on layouts used during development from performance on layouts reserved for evaluation.

Exploration, exploitation and a misleading reward

Exploration tries actions to gain information; exploitation uses what the policy currently considers promising. In an exercise, record which states were visited instead of assuming that many runs provided broad coverage. A policy can perform well on familiar situations while failing elsewhere.

Reward design also deserves a test. Suppose you reward every move closer to a destination. What happens when a wall requires a temporary detour? Write down such counterexamples and inspect behaviour, rather than deciding success from a reward total alone.

A sensible first RL exercise

  1. Specify a small environment

    Use a toy task with clear observations, actions, rewards and ending conditions. Keep the environment simple enough to trace one run by hand.

  2. Create reference policies

    Compare with random choices and a simple hand-written policy. They provide context for whether learning adds anything useful.

  3. Separate learning from evaluation

    Record the conditions used for training and the ones reserved for evaluation. Repeat runs where randomness affects the result and report variation.

  4. Watch unsuccessful runs

    Inspect trajectories, not just total reward. Document loops, unusual shortcuts and cases where the reward encourages behaviour different from the intended task.

Does reinforcement learning always mean deep RL?

No. Small discrete exercises can use a table of values rather than a neural network. Deep reinforcement learning uses neural networks within an RL method, for example to approximate a policy or value function. Start with an approach you can inspect before adding that extra layer of complexity.

Build Python fluency, probability, statistics and a basic machine learning workflow first. SchoolWhool's published tracks teach those foundations; a dedicated Reinforcement Learning track is not released. The Statistics track is a useful place to learn how to interpret variation across experiments.

Where this guide takes you

  • Use the examples to understand the task and its evaluation. They are suggested learning exercises, not measured results or production-ready systems.
  • The linked SchoolWhool courses teach the foundations. Specialist deep learning, computer vision, NLP, generative AI and reinforcement learning tracks are not published.
  • Open lessons' parts and key terms are free to read. A free account opens quizzes and saved progress, plus practice and other material in the free sample modules.

Questions

Is reinforcement learning supervised or unsupervised?

It is usually treated as a distinct learning setting. It uses reward and interaction rather than a supplied correct target for every input.

What is deep reinforcement learning?

Reinforcement learning that uses deep neural networks as part of the method, such as approximating values or selecting actions.

Does every AI agent use reinforcement learning?

No. Agent describes a system that chooses actions, while RL describes a learning approach. A workflow can use rules, planning or a language model without learning through RL during use.

What is the difference between reward and loss?

Reward defines feedback in the environment and contributes to the objective over time. A learning algorithm may use one or more loss functions internally to improve its policy or value estimates.

Can I start reinforcement learning without a GPU?

Yes. Small tabular tasks and toy simulations can be studied on a CPU. Choose a small environment before considering more demanding deep RL experiments.

Sources

Technical references and further reading from the authors, educators and maintainers below. Read dates record when these references were checked; the examples and suggested exercises in this guide are SchoolWhool's own.

Related reading

Supervised vs unsupervised learningNeural networks explainedStatistics trackAI and agentic AI study roadmap

Build the foundations for this subject

Follow SchoolWhool's learning path through Python, Data Tools, Maths, Statistics and Machine Learning. Start with the skills you need, read open lessons without an account, then sign in free for quizzes and saved progress. Free sample modules also open their practice and study material.

Directory listings

  • SchoolWhool on Siteefy
  • SchoolWhool on UNO Directory
  • SchoolWhool on Neeed Directory

Directory submissions

Submission badges — publication or verification pending.