Skip to main content
100%

Best-First Search

✓ Published0🌍 Public
Mmbostock
Last edited Feb 26, 2019
Created on Apr 22, 2014

A maze appears as a grid of white cells on a black background, with a single magenta path tracing the solution. Best-first search expands the maze from the bottom-right corner, prioritizing cells closest to the top-left goal by Euclidean distance, filling explored cells in gray. A binary min-heap manages the frontier, and the path is redrawn as the search narrows. The maze itself is generated via random traversal, rendered using Canvas 2D fillRect calls within a d3.timer animation loop.

AI-generated description

This maze is generated using random traversal, and then solved using best-first search. Compare to random search. See best-first search on a maze generated using Wilson’s algorithm.

gpl-3.0 Licensed

Similar vizzes