A Thinking World
Pathfinding foundations — from simple flood-fill search through to A* — then the decision-making and movement layers that turn a path into behaviour.
Demo: A guard/intruder stealth game where each algorithm visibly changes guard behaviour.
Pathfinding
- BFS — Breadth-First Search — Flood-fill search. Guarantees the shortest path on an unweighted grid.
- Dijkstra’s — Terrain Costs — Shortest path when tiles cost different amounts: mud, roads, rivers.
- Greedy Best-First — Trade the optimality guarantee for speed by following a heuristic.
- A* — Dijkstra’s optimality and Greedy’s speed, fused. The algorithm most games ship.
Decision-Making and Movement
- Finite State Machines — The decision layer: what an entity is doing now, and exactly when it switches.
- Behaviour Trees — Composable behaviour nodes that scale past the FSM transition explosion.
- Influence Maps — A second grid that scores locations: danger, territory control, recency.
- Steering Behaviours — Smooth movement in continuous space: seek, arrive, avoid, flock.
Putting It Together
- Bringing it Together — Every algorithm in one guard/intruder stealth demo.
- Going Further — What lies beyond A*, and how to recognise when you’ve outgrown it.