Grid navigation · Procedural thinking
Treasure Map
Navigate a grid with precise directions. Procedural thinking, made tactile.
Give the explorer step-by-step directions: north, east, south, west. The grid is your data structure, the directions are your program, the treasure is correctness. This is the smallest possible model of pathfinding — the algorithm class that powers GPS routing, robot navigation, and game AI.
What’s happening under the hood
- ›Grid = 2D array. Position = (row, col). Each direction is a coordinate transform: north = (row-1, col), east = (row, col+1).
- ›Pathfinding algorithms (Dijkstra, A*) explore the same grid by searching outward from the start until they reach the goal. Same data structure, smarter search.
- ›Real pathfinding adds obstacles, weighted edges (cost per move), and heuristics (best guess at distance to goal). Same primitive, layered sophistication.
Dig deeper
Phase 1 · Programming FundamentalsThe concept you just explored is taught with full depth in the formal DURA curriculum.