✦MySimulator / 2D LABS
EXPERIMENT 16 / 20  ·  Algorithms  ·  Heuristic search

A-Star Pathfinding Grid

Discover how a shortest-path search explores blocked terrain.

Interactive model3 adjustable parameters100% browser-nativeWorks offline
◈   LIVE EXPERIMENTLIVE SIMULATION
Move sliders to experiment · Space to play/pause · R to reset
MODEL PARAMETER
—
MODEL PARAMETER
—
MODEL PARAMETER
—
THE SCIENCE

How this simulation works

A* expands cells using f(n) = g(n) + w·h(n), where g is travelled distance and h is Manhattan-distance heuristic. With heuristic weight at most 1 it is optimal on this uniform grid.

ACTIVE LEARNING

Your experiment

Increase obstacles, then set heuristic to 0 for Dijkstra-style search. Use Play, Pause and Reset to compare outcomes. All calculations run locally inside your browser.

Made with 🤖 ChatGPT