Worked solution from the Artificial Intelligence (AI) Paper 3 Advanced Theory booklet, Part 1 of 1.
Write any one of these:
Supervised learning (or unsupervised, reinforcement or deep learning) [1]
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 node | Destination node | Cost from start node (g) | Heuristic (h) | Total (f = g + h) |
|---|---|---|---|---|
| Begin | Begin | 0 | 12 | 12 |
| Begin | A | 5 | 8 | 13 |
| Begin | B | 6 | 7 | 13 |
| Begin | C | 5 | 7 | 12 |
| Begin | D | 4 | 11 | 15 |
| C | G | 5 + 2 = 7 | 5 | 12 |
| G | F | 5 + 2 + 4 = 11 | 1 | 12 |
| G | End | 5 + 2 + 7 = 14 | 0 | 14 |
| F | End | 5 + 2 + 4 + 1 = 12 | 0 | 12 |
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]
▶ 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.