promptsandmore.com

Click. Tweak. Observe. Understand.

Graphs & Topology

Pathfinding, MSTs, and quest graph generation

System Overview

A* pathfinding finds optimal paths by combining actual cost (g) with heuristic estimate (h). It explores promising nodes first, balancing between Dijkstra's completeness and greedy best-first's speed. The visualization shows open set (green), closed set (red), and the final path.

Step-by-step mode reveals the algorithm's decision-making: which nodes it considers, which it explores, and how it builds the path incrementally. This makes the search process transparent.

Why Games Use This

Key Parameters

Failure Modes

Scaling Behavior

A* is O(b^d) worst case where b is branching factor and d is depth. In practice, good heuristics dramatically reduce explored nodes. For large maps, use hierarchical pathfinding or jump point search.

Memory is O(n) for storing open/closed sets. Use efficient data structures (binary heap) for open set.

Related Algorithms

Free Tools & Libraries

System-Thinking Prompts