Reinforcement Learning · Reinforcement Learning Core
What reinforcement learning is
In Reinforcement Learning because the job is to act, see a reward, and try again — not to fit a predictor from a ready table.
Picture a small floor of twelve tiles, three ranks by four files, like a tiny chessboard. Rank 1 is the top row: A1 is Start, B1 and C1 are hall tiles, D1 is Goal. Rank 2 has A2 hall, B2 Wall, C2 hall, D2 Pit. Rank 3 is four hall tiles, A3 to D3. You stand on Start. You take a step. The floor answers with a number — a little cost, a prize, or a fall. Nobody handed you a spreadsheet that already says which step is correct. You find out by stepping, reading the number, and stepping again. That loop is the whole course.
- Reinforcement Learning
- Medium level
- 5 concepts
1You step, then the floor answers
Stand on A1, the Start tile. Choose a step — Right. The floor moves you onto B1, the hall tile next door. That move is the world's answer to this choice. You did not look up a correct label first. There is no column that already says 'Right from Start is the answer'.
The idea is that simple: a choice on a named tile, then a change in where you stand. Feel the order — act first, see second. The next cards keep this same twelve-tile floor. When a later lesson says C1, it means the hall tile left of Goal.
Figure. Order matters. You choose a step first. The floor answers second. There is no labelled row waiting.
The loop so far
- ActChoose a step from the tile you stand on.
- SeeThe floor moves you, or it does not.
One step from Start
You stand on A1 Start and take Right. Where do you land, and what living-cost does an ordinary hall step pay?
- cell before the stepA1 Start
- action RightB1 hall, reward −1
Pro tip. The answer arrived after the step. Nothing in a labelled table told you B1 was waiting.
Coding lab. Take one step runs in the app, with checks on your output.
You have not been given a column of correct steps. How do you find out whether Right from Start is useful?
- Take the step and read what the floor does
- Fit a predictor on a labelled rent table
- Download a gym environment
The signal is the floor's answer after you act, not a pre-filled label.
2A number arrives after the step
The floor does not only move you. It also pays a number. An ordinary hall step — A1 Right onto B1 — pays minus 1, a small living cost for using a turn. Stepping into D1 Goal pays plus 10 and the walk ends. Stepping into D2 Pit pays minus 10 and the walk ends.
That number is the reward. It belongs to this step, not to the whole walk. A later lesson will add several rewards into a return. Here, just hear the payment arrive after the action, on this named floor.

One hall step
From Start (A1), take Right. What cell do you land on, and what number arrives?
- Start --R--> next hallB1
- reward for that hall step-1
Pro tip. Minus 1 is this step's payment. It is not yet the score of a whole walk to Goal.
Coding lab. Read the payment runs in the app, with checks on your output.
Why does the environment return a negative reward (-1) on an ordinary hallway step?
- It terminates the episode immediately and resets the agent to start
- It forces the agent to take random actions instead of planned steps
- It penalises wasted time and encourages the agent to discover shorter routes to the goal
- It indicates that the agent bumped into an obstacle or wall
A step cost (like -1 per transition) provides an incentive for the agent to find the quickest path to the terminal reward rather than wandering indefinitely.
3The next walk can choose differently
The floor did not change. A1 is still Start, D1 is still Goal, D2 is still Pit. You can walk again and pick a different first step — Down from A1 onto A2 this time, not Right onto B1. That is trial and error: the same world, a new choice, a new number.
Nothing about the second walk requires a new dataset. You are not drawing a fresh labelled table. You are standing on the same Start tile and trying a different door.
Figure. Start is still A1. Right lands on B1. Down lands on A2. Same floor, a new first step.
| First step | Land on | Reward |
|---|---|---|
| Right | B1 | -1 |
| Down | A2 | -1 |
Same Start, other door
From Start, take Down instead of Right. Where do you land, and what is paid?
- Start --D-->A2
- reward-1
Pro tip. Same tile, new action. The floor is reused; the choice is not.
Coding lab. Try the other door runs in the app, with checks on your output.
You already walked Right from Start and saw minus 1. What makes the next walk 'trial and error' rather than a new dataset?
- The floor is the same; you change the choice
- You must collect a new labelled table first
- You must train a neural net first
Trial and error reuses the world and changes the action.
4Not a labelled table
On this floor the only signal is the number that arrives after you act: minus 1 onto B1, plus 10 into Goal, minus 10 into Pit. There is no answer column filled in before the first step. You find the useful door by walking.
Machine Learning's rent notebook already has the answer column filled in: size, distance, age, and the rent each flat fetched. You fit a predictor. There is no loop of stepping and being paid. The rent notebook is the other door. Stay on the floor.
No diagram — the idea is carried by the prose, table, code block or coding lab.
| Course | Signal you hold |
|---|---|
| Machine Learning | A ready table with labels |
| Reinforcement Learning | A number after each action |
A notebook of 200 flats already lists the rent each fetched. Which course is that?
- Machine Learning — a labelled table, no trial loop
- Reinforcement Learning — because rent is a number
- Deep Learning — because 200 is a large table
A filled rent column is supervised signal. RL's signal arrives after an action.
5One step changes the next choice
After Right from A1 you stand on B1, not on Start. The next choice is a choice from B1 — Right toward C1, or Down toward B2 Wall. A row in a table does not do that: each flat is its own line, and scoring one flat does not move you onto a different flat.
That is what sequential means here: the action you take now writes the tile you will decide from next. The walk is one story on twelve tiles, not two hundred independent rows.
Figure. Right from Start lands on B1. The next decision is a B1 decision. The walk is one chain.
The tile changes
Start at A1. Take Right. Which tile do you decide from next?
- A1 --R-->B1
- next choice is fromB1
Pro tip. The walk is one chain. Scoring a rent row does not move you onto another row.
Coding lab. Print the new tile runs in the app, with checks on your output.
How does a sequential decision process fundamentally differ from single-step tabular classification?
- Actions in sequential problems have zero impact on subsequent observations
- Current actions transition the agent to new states, shaping the availability of future rewards
- Sequential processes require supervised labels for every intermediate state
- The agent receives all cumulative rewards in advance before acting
In RL, choices have delayed consequences: an action changes the state, dictating which future states and rewards are reachable.
Notes
- In Reinforcement Learning because the job is to act, see a reward, and try again — not to fit a predictor from a ready table.
- Stand on a tile. Choose a step — right, say. The floor either moves you onto the next tile or keeps you where you are. That move is the world's answer to this choice. You did not look up a correct label first.
- The floor does not only move you. It also pays a number. An ordinary hall step pays minus 1 — a small living cost for using a turn. Stepping into Goal pays plus 10 and the walk ends. Stepping into the Pit pays minus 10 and the walk ends.
Exam traps & shortcuts
- Act, then read the number the floor paid. That number is this step, not the whole walk.
- A policy is a rule per cell. A value is how good that cell is. Neither is a neural net.
Recap
You act, the floor pays a number, and the next walk can choose differently. Machine Learning's labelled table has no such loop. This course is sequential trial and error.
- You step, then the floor answers
- Stand on A1, the Start tile. Choose a step — Right. The floor moves you onto B1, the hall tile next door. That move is the world's answer to this choice. You did not look up a correct label first. There is no column that already says 'Right from Start is the answer'.
- A number arrives after the step
- The floor does not only move you. It also pays a number. An ordinary hall step — A1 Right onto B1 — pays minus 1, a small living cost for using a turn. Stepping into D1 Goal pays plus 10 and the walk ends. Stepping into D2 Pit pays minus 10 and the walk ends.
- The next walk can choose differently
- The floor did not change. A1 is still Start, D1 is still Goal, D2 is still Pit. You can walk again and pick a different first step — Down from A1 onto A2 this time, not Right onto B1. That is trial and error: the same world, a new choice, a new number.
- Not a labelled table
- On this floor the only signal is the number that arrives after you act: minus 1 onto B1, plus 10 into Goal, minus 10 into Pit. There is no answer column filled in before the first step. You find the useful door by walking.
Practise What reinforcement learning is
Reading is free and needs no account. Practice, mocks and progress live in the app.
- A 3-question practice set that ends the chapter
- 5 quick checks with worked explanations
- Timed mocks scored with the real marking scheme
- Readiness tracked per topic, kept on your device