Artificial Intelligence / Unit 2 AI 0081 worked example, 60 to 90 seconds
Breadth-First, Run Whole
The idea
A complete breadth-first run on a small map shows competence assembling out of pure bookkeeping.
In practice
Riverbend, start Home, goal Grandmother's, neighbors filed alphabetically. Turn one: select Home; not the goal; file Home–Bakery and Home–School. Turn two: select Home–Bakery; file Home–Bakery–Park. Turn three: select Home–School; file its extensions to Clinic and Park. Turns four through six: the three-road paths come up for selection in the order they were filed — the Bakery line first, then the School lines — each failing the goal test, each filing its own extensions. Turn seven: select Home–Bakery–Park–Grandmother's. Goal. Three roads: Home, Bakery, Park, Grandmother's — and inspection of the map shows no two-road route exists.
Where people slip
Watch what each turn actually was: remove a path, check its last entry, copy it with one extension, file the copies. No step consulted meaning.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Something wrong in this lesson? Flag it · Sources for Artificial Intelligence