Graph Database Shortest-Path Query: Bidirectional BFS (2D)
Interactive 2D interference-free graph simulator: watch bidirectional BFS and single-direction BFS resolve a shortest-path query over a live planar spring-electrical graph embedding, with a live growth-curve chart plotting nodes visited per BFS layer for both strategies side by side.
Graph databases answer "what's the shortest path between these two records" by walking index-free adjacency pointers directly, node to node, rather than joining tables. This 2D simulator lays out a random connected property graph with its own planar spring-electrical physics and runs a real breadth-first search across it: a single expanding wavefront from the source, or two wavefronts — one from the source, one from the target — expanding toward each other until they meet. A live growth-curve chart plots the actual measured nodes-visited-per-layer for the running strategy against the untouched other strategy on the identical graph, so the exponential cost gap that makes bidirectional search the standard approach in engines like Neo4j and Amazon Neptune is drawn directly from real traversal data rather than asserted.
Watch bidirectional and single-direction BFS resolve a shortest-path query over a live 2D planar spring-electrical graph embedding, with a real-time growth-curve chart plotting nodes visited per BFS layer for both strategies on the same graph.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install