Cambridge A2 Level Computer Science 9618 · 19.1 Algorithms

Q2 · 9618/31/O/N/21 Q9

Worked solution from the Computational thinking and Problem-solving Paper 3 Advanced Theory booklet, Part 1 of 2.

Q29618/31/O/N/21original Q9Structured · 10 marks
Question 9 from 9618/31/O/N/21

Worked solution

(a)(i)

Write one reason:

More hidden layers let the network solve more complex problems and learn by itself (deep learning), which gives a more accurate result [1]

(a)(ii)

Explain the steps of learning. Write any four of these points:

An artificial neural network copies the way the human brain works [1]

Each connection between nodes has a weight (value) [1]

Data goes in at the input layer and is passed on to the hidden layers, where features are picked out and outputs are worked out [1]

This is repeated many times (training) to reach the best outputs, so reinforcement learning happens [1]

Other points that also score: the output layer gives the result; Back propagation of errors corrects mistakes; decisions can be made without being specially programmed.

(b)

A* picks the node with the lowest total f = g + h. g is the cost from Home, h is the given heuristic.

NodeCost from Home (g)Heuristic (h)Total (f = g + h)
Home01414
A11011
B5712
C4913
B1 + 3 = 4711
E1 + 6 = 7310
F7 + 1 = 8311
School7 + 5 = 12012
School8 + 3 = 11011

Any four of these five calculation points score:

Row for B from Home correct [1]

Row for C from Home correct [1]

Rows for B and E from A correct [1]

Rows for F and School from E correct [1]

Final path: Home → A → E → F → School [1]

Note (no extra mark): the route Home → A → B → D → School costs only 1 + 3 + 2 + 2 = 8, but A* never expands D. Its heuristic (6) is more than the real distance from D to School (2), so School (f = 11) is reached first. With the heuristics given, A* returns Home → A → E → F → School, and this is the answer that scores the marks.

Other points that also score: row for School from F correct.

KEY IDEAMore hidden layers learn harder patterns, and A* always expands the node with the smallest g + h.
TOTAL 10 marks

Official mark scheme

Mark scheme for 9618/31/O/N/21 question 9
VIDEO
▶ Whole paper

Video solution of the whole paper · by qiphyedu. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.