A Level 9618 · Paper 3 · 18.2
Artificial Intelligence: Machine Learning and Neural Networks
How machines learn from data, and the methods behind it. Read the notes, try the past-paper questions, then check the mark scheme.
Past papers from November 2021 to June 202616 questions · 58 marks
Section 18 is one subtopic in the syllabus (18.1). It is split in two here to match the topical booklets: graphs and search, then machine learning.
In this subtopic
- Machine learning, deep learning and reinforcement learning, and why each is used
- Supervised and unsupervised learning
- How artificial neural networks have helped machine learning
- Back propagation of errors, and regression
18.2 · 1 of 11Book pages Contents
What artificial intelligence is
Artificial intelligence (AI) can be thought of as a machine with cognitive abilities, such as problem solving and learning from examples. All of these can be measured against human benchmarks, such as reasoning, speech and sight.
The diagram shows how AI, machine learning and deep learning are linked. Deep learning is a subset of machine learning, and machine learning is itself a subset of AI.

- AI: intelligent machines think and behave like humans.
- Machine learning: systems learn without being programmed to learn.
- Deep learning: machines think in a way similar to the human brain. They handle huge amounts of data using artificial neural networks.
AI is often split into three categories:
- Narrow AI: a machine performs better than a human at one specific task.
- General AI: a machine performs about as well as a human at any intellectual task.
- Strong AI: a machine performs better than a human at many tasks.
Examples of AI include:
- news generation based on live news feeds (this involves some human interaction)
- smart home devices, such as Amazon Alexa and Apple Siri (these also involve some human interaction).
A smart home device interacts with a human by recognising their spoken commands. The device learns from its environment and from the data it receives, so its responses become more and more sophisticated. This shows the ability to use automated, repetitive learning through artificial neural networks.
Practise this: past-paper questions
18.2 · 2 of 11Book page Contents
Machine learning
The requirements for machine learning can be summarised as:
- a computer-based system has a defined task, or tasks, to perform
- knowledge is gained through the experience of performing the tasks
- because of this experience and the knowledge gained, the system performs future tasks better.
The ability to learn from experience is a sign of intelligence. So machine learning is one of the many separate approaches that come under the umbrella of artificial intelligence.
There are several ways to describe how the learning takes place. Three are covered here: unsupervised learning, supervised learning and reinforcement learning.
Practise this: past-paper questions
18.2 · 3 of 11Book page Contents
Unsupervised learning
In unsupervised learning the system has to draw its own conclusions from its experience of the results of the tasks it has performed. For this, it needs algorithms that can organise or categorise the knowledge it has gained.
One example is where conceptual clusters are found, based on a hierarchical framework. All the knowledge is first placed in the root of a tree structure. Then, depending on the attributes of the knowledge, selected groups are moved into branches of the tree.
Today, unsupervised learning is very widely used. Powerful computer systems with access to huge data banks regularly make decisions based on previous actions that have been recorded. Everyone’s activity on the world wide web is recorded and stored, and this stored data is then used to decide which products or services to recommend to them the next time they use the internet. There is no theoretical framework for this: it is as though the intelligence is built into the data.
Practise this: past-paper questions
- November 2022 · Paper 32 · Q7Supervised and unsupervised learning are two categories of machine learning. Describe supervised learning and unsupervised learning. Supervised…
- June 2025 · Paper 32 · Q6(b)Explain how supervised learning and unsupervised learning differ from each other
- June 2025 · Paper 33 · Q10(c)Explain how unsupervised learning takes place in machine learning
- June 2026 · Paper 31 · Q9(a)Explain how supervised learning and unsupervised learning are trained
18.2 · 4 of 11Book page Contents
Supervised learning and expert systems
Builds on
In supervised learning the system is given knowledge together with its classification. For example, suppose an AI program is being developed to mark exam questions. For supervised learning, it could be given answers to exam questions together with a grade for each one, or with categorised comments.
A special case of supervised learning is the development of an expert system. An expert system always focuses on a narrowly defined area of knowledge.
- Human experts are given samples of data that need analysing.
- The experts provide the conclusions to be drawn from the data.
- The data and the conclusions are input to the knowledge base.
- The system is tested: a human expert provides sample data and checks how accurate the expert system’s conclusions are.
- If performance is poor, more data and conclusions are input to the system.
Note An expert system is an example of AI, but it is not an example of machine learning, because nobody expects the system to improve its performance on its own.
Practise this: past-paper questions
- November 2022 · Paper 32 · Q7Supervised and unsupervised learning are two categories of machine learning. Describe supervised learning and unsupervised learning. Supervised…
- June 2025 · Paper 32 · Q6(b)Explain how supervised learning and unsupervised learning differ from each other
- June 2026 · Paper 31 · Q9(a)Explain how supervised learning and unsupervised learning are trained
18.2 · 5 of 11Book page Contents
Reinforcement learning
Builds on
Reinforcement learning has some features like unsupervised learning and other features like supervised learning. It has its own vocabulary, used in these statements about how a reinforcement learning algorithm works:
- An agent is learning how best to perform in an environment.
- The environment has many defined states.
- At each step the agent takes an action.
- The agent has a policy that guides its actions.
- The policy is influenced by the recorded history and by knowledge of the current state of the environment.
- An action changes the environment to a new state.
- After an action, the agent receives a reward. The reward measures how well the action helped towards the overall goal.
- The policy guides the agent in deciding whether the next action should exploit knowledge it already has, or explore a new avenue.
In summary, the aim is to make the reward values as large as possible by improving the quality of the policy. It is a trial-and-error search for the best performance, and it needs many repeated attempts at the same problem.
This description is abstract. It becomes clearer with some examples of where it is used:
- playing logic games, such as backgammon
- robotics, where a robot has to learn how to become good at a task
- learning how to find a way through a maze. When the agent chooses a left turn that will eventually lead to the destination, the reward is given a positive number. If it chooses a right turn instead, the reward is given a negative number.
Practise this: past-paper questions
18.2 · 6 of 11Book page Contents
Comparing the types of learning
Builds on
- Using known tasks with given outcomes to enable a computer program to improve its performance in accomplishing similar tasks.
- Using a large number of tasks with unknown outcomes to enable a computer program to improve its performance in accomplishing similar tasks.
- Using a large number of tasks with unknown outcomes, and the use of feedback, to enable a computer program to improve its performance in accomplishing similar tasks.
Why use each type of learning
- Supervised learning: when you have labelled data, that is, past data where the right answer is already known, such as emails already marked as spam or not spam. The system learns to predict the answer for new data.
- Unsupervised learning: when the data has no labels. The system finds patterns and groups by itself, for example grouping customers with similar buying habits.
- Reinforcement learning: when there is no fixed right answer, but the system can try actions and be rewarded or penalised, for example a program learning to play a game.
- Deep learning: for very complex data such as images, speech and language, where many hidden layers are needed to pick out features. It needs a lot of data and computing power.
Practise this: past-paper questions
- November 2022 · Paper 31 · Q9(b)Outline the reasons for using deep learning
- November 2022 · Paper 32 · Q7Supervised and unsupervised learning are two categories of machine learning. Describe supervised learning and unsupervised learning. Supervised…
- June 2023 · Paper 31 · Q2(a)Draw one line from each machine learning category to its most appropriate description. Machine learning category: Supervised learning…
- June 2023 · Paper 32 · Q10(a)State one category of machine learning
Show 6 more
- June 2024 · Paper 32 · Q11Explain what is meant by Reinforcement Learning in relation to Artificial Intelligence
- June 2025 · Paper 32 · Q6(b)Explain how supervised learning and unsupervised learning differ from each other
- June 2025 · Paper 33 · Q10(c)Explain how unsupervised learning takes place in machine learning
- November 2025 · Paper 32 · Q9(a)(i)State one example where Deep Learning is used
- November 2025 · Paper 32 · Q9(a)(ii)Identify how Deep Learning can be made more effective
- June 2026 · Paper 31 · Q9(a)Explain how supervised learning and unsupervised learning are trained
18.2 · 7 of 11Book pages Contents
Regression analysis
In some applications, the aim of the AI is to predict numerical values for one quantity, from data values for other quantities that are input to the AI algorithm.
To use regression analysis, the system is first given some real values, both for the input data and for what will become the output data once the AI system is in use. This data is used to find out whether there is any correlation between the two sets of values. If a correlation is found that can be written as a mathematical formula, that formula can then be used to output predicted values when new data is input.
The simplest use of regression analysis is when values for only one quantity are input, and a linear (straight-line) relationship is expected between these values and the values to be predicted.
For example, an AI system could be used to predict candidates’ marks in an A Level Computer Science exam. There may be a correlation between a candidate’s mark in A Level Computer Science and their mark in IGCSE Mathematics. The graph shows what might be found when some historic data is input and analysed.

There is good correlation between the two sets of marks. The straight line is the one calculated as the best fit to the data. The formula for this line can sensibly be used to predict future A Level Computer Science marks from the marks scored in an IGCSE Mathematics paper.
Regression analysis can be more complicated:
- a similar fitting to a mathematical formula can be done when the marks for three different exams are used as the input
- in other cases a non-linear relationship might suit the data better, for example when predicting the future sales of a new product whose sales are expected to grow exponentially.
Practise this: past-paper questions
Used later in
18.2 · 8 of 11Book page Contents
Artificial neural networks
The neural networks in our brains give us our intelligence, so it makes sense to use artificial neural networks as a foundation for artificial intelligence systems.
In the brain, one end of a nerve cell has many dendrites, which can receive signals. The other end has many axon terminal buttons, which can transmit signals. The synapse is the region between an axon terminal button and a dendrite, and it contains neurotransmitters. When a nerve cell receives input signals, the voltage in the axon increases. At a certain threshold value of this voltage, the neurotransmitters are activated and signals are sent to the dendrites of the cells next to it.
An artificial neural network can be created in software or in hardware. Its parts can be shown in a diagram like the one below. The triangles are the nodes of the network, which represent artificial neurons (sometimes they are drawn as circles).

In general, a node can receive one or more inputs and can send an output to one or more other nodes. To model what a node does:
- a weighting factor is applied to each input
- the weighted input values are added together
- an activation function is used to calculate the output value of the node.
If an input is not a number, it must be converted to one, so that the weighted values can be added together.
Practise this: past-paper questions
- November 2021 · Paper 32 · Q9(a)(ii)Explain how artificial neural networks enable machine learning
- November 2023 · Paper 31 · Q12Artificial neural networks have played a significant role in the development of machine learning. Explain what is meant by the term artificial…
- June 2025 · Paper 31 · Q10(b)Explain the use of artificial neural networks in Deep Learning
18.2 · 9 of 11Book page Contents
Layers in a neural network
The diagram above shows a very simple network with three layers:
- the input layer: the column of three nodes on the left, which receives the input
- the hidden layer: the two nodes in the middle
- the output layer: the column on the right, which provides the output.
Some artificial neural networks have several hidden layers.
One example of an AI system that uses an artificial neural network estimates how cost-effective batteries are. Each input node takes one feature of a battery, such as its price, its type or the device it is used in. The hidden layer combines these features, and the output node gives an estimated cost per unit of time for that battery.
Practise this: past-paper questions
18.2 · 10 of 11Book page Contents
Back propagation of errors
Each connection between two nodes has a weight. When the network is first set up, the weights are given trial values. They are then tuned using back propagation of errors. This needs real data where the answer is already known: in the battery example, the real cost per unit of time of some batteries, worked out from their price and how long they actually lasted.
- Input the training data and let the network calculate its outputs.
- Compare each output with the known correct value to find the error.
- Send the error backwards, from the output layer through the hidden layers.
- Adjust each weight according to how much it added to the error.
- Repeat many times, until the error is small enough.
When more real data becomes available, back propagation can be run again to improve the predictions.
Practise this: past-paper questions
18.2 · 11 of 11Book pages Contents
Deep learning
Builds on
In the brain, neurons are thought to be arranged in layers. The lower layers have functions that are easy to understand, but the higher layers deal with more abstract processing of information. With the computing power now available, artificial neural networks are being built with large numbers of hidden layers that try to do something similar. These are known as deep learning systems.
Neural networks enabling machine learning
- Artificial neural networks are intended to copy the way human brains work.
- Weights (values) are assigned to each connection between nodes.
- The data is input at the input layer and passed into the system.
- It is analysed at each following (hidden) layer, where characteristics are extracted or outputs are calculated.
- This process of training (learning) is repeated many times to get the best outputs, or reinforcement learning takes place.
- Decisions can be made without being specifically programmed.
- The deep learning net will have created complex feature detectors.
- The output layer provides the results.
- Back propagation (of errors) is used to correct any errors that have been made.
Reasons for multiple hidden layers
- They enable deep learning to take place.
- A problem with a higher level of complexity needs more layers to solve it.
- They enable the neural network to learn and make decisions on its own.
- They improve the accuracy of the result.
Practise this: past-paper questions
- November 2021 · Paper 32 · Q9(a)(i)State the reason for having multiple hidden layers in an artificial neural network
- November 2021 · Paper 32 · Q9(a)(ii)Explain how artificial neural networks enable machine learning
- November 2022 · Paper 31 · Q9(a)Describe what is meant by deep learning
- November 2022 · Paper 31 · Q9(b)Outline the reasons for using deep learning
Show 8 more
- June 2023 · Paper 31 · Q2(a)Draw one line from each machine learning category to its most appropriate description. Machine learning category: Supervised learning…
- November 2023 · Paper 31 · Q12Artificial neural networks have played a significant role in the development of machine learning. Explain what is meant by the term artificial…
- June 2024 · Paper 31 · Q9Explain what is meant by Deep Learning in relation to Artificial Intelligence (AI)
- June 2025 · Paper 31 · Q10(b)Explain the use of artificial neural networks in Deep Learning
- November 2025 · Paper 31 · Q7(b)Describe Deep Learning
- November 2025 · Paper 32 · Q9(a)(i)State one example where Deep Learning is used
- November 2025 · Paper 32 · Q9(a)(ii)Identify how Deep Learning can be made more effective
- June 2026 · Paper 32 · Q9(a)State the subset of Artificial Intelligence (AI) which makes use of an artificial neural network
18.2
Concepts in 18.2
Every idea explained in 18.2, and where else in the notes it is used.
| Concept | In one line | Also used in |
|---|---|---|
| activation function | The function that turns a node’s summed weighted inputs into its output value. | only here |
| artificial intelligence | A machine with cognitive abilities such as problem solving and learning from examples. | 18.2 Machine learning, 18.2 Artificial neural networks, 18.1 Graphs: nodes, edges and routes |
| artificial neural network | Layers of connected nodes (artificial neurons) with weighted connections, modelled on the brain. | 18.2 What artificial intelligence is, 18.2 Layers in a neural network, 18.2 Deep learning, 18.1 Why graphs are used in AI |
| artificial neuron | A node in a neural network: it weights its inputs, adds them and applies an activation function. | only here |
| back propagation of errors | Sending the output error backwards through the network and adjusting each weight to reduce it. | 18.2 Deep learning, 18.1 Why graphs are used in AI |
| conceptual clusters | Groups of knowledge moved from the root of a tree into branches, by their attributes. | only here |
| deep learning | Machine learning with artificial neural networks that have many hidden layers. | 18.2 What artificial intelligence is, 18.2 Comparing the types of learning |
| expert system | An AI system built from experts’ data and conclusions in a narrow area; it does not improve unaided. | only here |
| general AI | A machine that performs about as well as a human at any intellectual task. | only here |
| hidden layer | A layer of nodes between the input layer and the output layer of a neural network. | 18.2 Comparing the types of learning, 18.2 Back propagation of errors, 18.2 Deep learning |
| labelled data | Past data where the right answer is already known, used for supervised learning. | only here |
| machine learning | A system that gains knowledge by performing tasks and so performs future tasks better. | 18.2 What artificial intelligence is, 18.2 Supervised learning and expert systems, 18.2 Deep learning, 18.1 Why graphs are used in AI |
| narrow AI | A machine that performs better than a human at one specific task. | only here |
| regression analysis | Finding a formula that fits the correlation in real data, then using it to predict new values. | 18.1 Why graphs are used in AI |
| reinforcement learning | Trial-and-error learning where an agent’s actions earn rewards, and it improves its policy to maximise them. | 18.2 Machine learning, 18.2 Comparing the types of learning, 18.2 Deep learning |
| strong AI | A machine that performs better than a human at many tasks. | only here |
| supervised learning | Learning from known tasks with given outcomes: data is given with its classification. | 18.2 Machine learning, 18.2 Reinforcement learning, 18.2 Comparing the types of learning |
| unsupervised learning | Learning from many tasks with unknown outcomes: the system finds patterns and groups by itself. | 18.2 Machine learning, 18.2 Reinforcement learning, 18.2 Comparing the types of learning |
| weighting factor | The weight a node applies to an input before the inputs are added together. | only here |
Zain Merchant's notes, page by page, as printed in his book. The Notes tab has the same notes as text, with links.
Past-paper questions and mark schemes © Cambridge University Press & Assessment. Compiled for revision by Zain Merchant.
- November 2021 · Paper 32 · Q9Notes:Artificial neural networksLayers in a neural networkDeep learning
- November 2022 · Paper 31 · Q9Notes:Comparing the types of learningDeep learning
- November 2022 · Paper 32 · Q7Notes:Unsupervised learningSupervised learning and expert systemsComparing the types of learning
- June 2023 · Paper 31 · Q2Notes:Comparing the types of learningDeep learning
- June 2023 · Paper 32 · Q10Notes:Machine learningComparing the types of learning
- November 2023 · Paper 31 · Q12Notes:Artificial neural networksLayers in a neural networkDeep learning
- June 2024 · Paper 31 · Q9Notes:Deep learning
- June 2024 · Paper 32 · Q11Notes:Reinforcement learningComparing the types of learning
- June 2025 · Paper 31 · Q10Notes:Artificial neural networksDeep learning
- June 2025 · Paper 32 · Q6Notes:Unsupervised learningSupervised learning and expert systemsComparing the types of learning
- June 2025 · Paper 33 · Q10Notes:Unsupervised learningComparing the types of learning
- November 2025 · Paper 31 · Q7Notes:Deep learning
- November 2025 · Paper 32 · Q9Notes:Comparing the types of learningBack propagation of errorsDeep learning
- June 2026 · Paper 31 · Q9Notes:Unsupervised learningSupervised learning and expert systemsComparing the types of learning
- June 2026 · Paper 32 · Q9Notes:What artificial intelligence isDeep learning
- June 2026 · Paper 33 · Q9Notes:Regression analysis
Past-paper questions and mark schemes © Cambridge University Press & Assessment. Compiled for revision by Zain Merchant.
Try the questions first.
Write your answers, then check them against the mark scheme. Your choice is remembered on this device.