Cambridge A2 Level Computer Science 9618 · 18.1 Artificial Intelligence (AI)

Q6 · 9618/32/M/J/23 Q10

Worked solution from the Artificial Intelligence (AI) Paper 3 Advanced Theory booklet, Part 1 of 1.

Q69618/32/M/J/23original Q10Structured · 6 marks
Question 10 from 9618/32/M/J/23

Worked solution

(a)

Write any one of these:

Supervised learning (or unsupervised, reinforcement or deep learning) [1]

(b)

Work out f = g + h and always expand the node with the lowest f. g is the time from Begin, h is the heuristic.

Start nodeDestination nodeCost from start node (g)Heuristic (h)Total (f = g + h)
BeginBegin01212
BeginA5813
BeginB6713
BeginC5712
BeginD41115
CG5 + 2 = 7512
GF5 + 2 + 4 = 11112
GEnd5 + 2 + 7 = 14014
FEnd5 + 2 + 4 + 1 = 12012

Rows for B, C and D from Begin: any two of these correct [2]

Rows for G (from C), F and End (from G), End (from F): any two of these correct [2]

Write the final path: Begin → C → G → F → End [1]

KEY IDEAIn A*, add the cost so far to the heuristic and always carry on from the lowest total until the End node is reached.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/32/M/J/23 question 10
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.