Passer au contenu

Labs · 9618 18.1 · reinforcement learning

Teach a Robot by Reward

A robot learns a maze by trial and error. Give it rewards, watch its Q values grow square by square and help it find the shortest way.

5 levelsFree bench

In the exam

Exam questions on what this lab teaches, with the points that gain marks.

9618/32 May/June 2024 · Question 113 marks

Explain what is meant by Reinforcement Learning in relation to Artificial Intelligence.

Points that gain marks

  1. A machine learning method that learns from feedback: rewards and punishments.
  2. An agent learns how to behave in an environment by doing actions and seeing their results.
  3. A good action gets positive feedback (a reward); a bad action gets negative feedback (a punishment).
  4. It learns by itself from the feedback, without labelled data or exact instructions.
  5. It uses the feedback to get better at the task (for example by changing its weights or values).

In this lab: The robot is the agent and the grid is its environment. +10 at the goal and the cost of each move are its rewards and punishments. Each Q value is what it has learned from them, and it gets better run after run.

IGCSE 0478/11 May/June 2026 · Question 7(d)4 marks

A robot animal uses artificial intelligence (AI). Explain how the robot animal can use AI to learn where objects are in a room.

Points that gain marks

  1. It can use machine learning, adapting its own data, rules or processes.
  2. It can make a digital map of the room and store where the objects are.
  3. It can update its map when objects are moved, removed or added.
  4. It can store successful and unsuccessful routes or actions (that avoid the objects).

In this lab: Your robot does the last point: every Q value is a stored memory of how well one move worked from one square, so after training its arrows go round the traps and walls.

The question as printed in the exam paper

More real experiments

All labs →

Se connecter ou créer un compte

IGCSE, A-Level & AP