Build a maze and inspect a real priority-queue A* search.
A* expands the lowest f = g + w·h score first. The heuristic guides the search toward the goal, while g tracks travelled cost.