Skip to main content
100%

Random Search

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Apr 22, 2014

This visualization animates a random search algorithm solving a maze, which was itself generated via random traversal. A magenta path highlights the best-known route from the top-right corner to the bottom-left, updating as the search progresses. The code uses D3 v3's timer API to drive the animation and a Canvas context for all drawing. The underlying maze and search logic are implemented directly with JavaScript arrays and bitwise operations to represent cell connections.

AI-generated description

This maze is generated using random traversal, and then solved using the same algorithm. This approach is similar to breadth-first search, although it is not guaranteed to traverse the maze in any particular order. Compare to best-first search. See random search on a maze generated using Wilson’s algorithm.

gpl-3.0 Licensed

Similar vizzes