A Level Computer Science (A2) chapter 6: Artificial Intelligence (AI) MCQs with answers
By Team Megalecture · Updated 4 Nov 2026
27 exam-style questions on Artificial Intelligence (AI), each with the answer and a short explanation. Ten of them are below to try. The chapter test draws ten fresh questions each time and is marked the moment you finish, with your score by topic.
Ten Artificial Intelligence (AI) questions with answers
Try each one, then open the answer. These ten stay the same; the test draws new ones every time.
1. A satnav program stores a road network as a graph. What do the weights on the edges most sensibly represent?
A
the distance or travel time of each road section
B
the number of houses on each road section
C
the name of the town at each junction
D
the number of vertices already visited
Show answer
Answer: A. The weight of an edge is the cost of using it, such as distance or journey time. The search algorithm adds these costs along a route to find the cheapest one.
2. Which of these machine learning tasks is a regression problem?
A
predicting the price of a house from its floor area
B
deciding whether an email is spam or not spam
C
recognising which of ten digits is in a photograph
D
grouping customers into clusters without labels
Show answer
Answer: A. Regression predicts a continuous numerical value, such as a price. Choosing a category (spam / digit) is classification, and grouping without labels is clustering.
3. The A* algorithm is used from S to G on a graph with edges S–A 2, S–B 3, A–C 4, A–D 7, B–D 3, B–E 5, C–G 6, D–G 5, E–G 4. Heuristic values: h(S) = 7, h(A) = 7, h(B) = 5, h(C) = 5, h(D) = 3, h(E) = 4, h(G) = 0. What is the cost of the shortest path found?
A
9
B
12
C
11
D
8
Show answer
Answer: C. The search ends at G with g = 11, by S–B–D–G (3 + 3 + 5). The other routes cost more: S–B–E–G = 12 and S–A–C–G = 12. The heuristic never overestimates, so this path is the cheapest.
4. Which is the correct order of steps for one training cycle of a neural network using back propagation?
A
adjust the weights, forward pass to get an output, calculate the error, stop
B
calculate the error, forward pass to get an output, delete the weights, repeat
C
propagate the error backwards, forward pass to get an output, calculate the error
D
forward pass, calculate the error, propagate the error back, adjust the weights
Show answer
Answer: D. The network first produces an output from the inputs (forward pass), the error is then measured, and back propagation uses it to adjust the weights layer by layer.
5. A shop gives an algorithm the purchase records of thousands of customers, with no labels, and asks it to find groups of customers with similar buying habits. Which type of learning is this?
A
supervised learning (classification)
B
supervised learning (regression)
C
reinforcement learning
D
unsupervised learning (clustering)
Show answer
Answer: D. There are no correct answers supplied and the algorithm looks for structure in the data by itself, which is unsupervised learning. Grouping similar items is called clustering.
6. Which is the essential difference between supervised and unsupervised learning?
A
supervised learning uses labelled training data, unsupervised learning uses unlabelled data
B
supervised learning needs a human to watch the program run, unsupervised learning does not
supervised learning cannot make predictions, unsupervised learning can
Show answer
Answer: A. The difference lies in the training data: labelled examples with known correct outputs for supervised learning, and no labels for unsupervised learning.
7. Which graph feature is needed to model a one-way street?
A
a directed edge
B
a weighted vertex
C
an adjacency matrix
D
a root node
Show answer
Answer: A. A directed edge can be followed in one direction only. An undirected edge would allow travel both ways.
8. A robot learns to walk by trying movements and being given a reward when it moves forward and a penalty when it falls. Which type of learning is this?
A
supervised learning
B
reinforcement learning
C
unsupervised learning
D
rule-based programming
Show answer
Answer: B. In reinforcement learning an agent learns by trial and error, using rewards and penalties from its environment. No labelled example answers are provided.
9. How have artificial neural networks helped machine learning?
A
they learn patterns from examples by adjusting weights, so no rules need programming
B
they store every training example and look it up unchanged when a match is needed
C
they need a programmer to write an explicit rule for every possible input
D
they replace the training data with random values so that the network cannot be biased
Show answer
Answer: A. A network changes the weights on its connections during training so that it recognises patterns, such as faces or speech, that would be very hard to describe with hand-written rules.
10. A game AI represents each possible board position as a vertex and each legal move as an edge. Why is a graph a suitable structure?
A
Each position can have only one following position, so the search never has to make a choice.
B
A graph stores the positions in sorted order, so a binary search can find the best move.
C
A graph removes each position once it has been visited, so memory is never used up.
D
A position can link to several others, so a search can find a route to a win.
Show answer
Answer: D. States and moves form a network in which one state can lead to many others, which is exactly what a graph models. AI search algorithms then look for a path to a goal state.
Artificial Intelligence (AI): questions students ask
How many Artificial Intelligence (AI) MCQs are there?
27, each with the answer and a short explanation, across 1 topics: Artificial Intelligence (AI). Every chapter test draws ten of them, so you can take it many times.
Is the A Level Computer Science (A2) chapter 6 test free?
Yes. The test, the answers and the explanations are free and need no sign-up. Sign in only if you want your scores kept across devices.
How is the chapter test marked?
The moment you press Finish: your score, the right answer and an explanation for every question, and the ones you got wrong saved in My mistakes to retry.