Find another way.
Draw obstacles and explore how A* combines distance travelled with an estimate of the distance remaining.
Select a tool, then click or tap a cell. Keyboard: Tab to a cell, then press Enter or Space.
S · StartG · Goal■ Wall· Explored◆ Path
Ready. Draw a wall or try the example maze.
THE IDEA
A useful guess can make a search more focused.
A* ranks open cells by f = g + h: steps travelled plus Manhattan distance to the goal. Moves are horizontal or vertical, each costs one, and walls cannot be crossed. With this heuristic the search returns a shortest route when one exists.
Inspired by search concepts used in Freckers. This is a separate grid demonstration, not a reproduction of the Freckers game or its coursework implementation.
A* · Manhattan distance · path reconstruction