LESSON 22.10 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
HNSW
Watch a search drop through graph layers to find the 3 nearest points.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 22.10 · INDEX BAYM 4 · 4 LAYERS · 200/50/13/3
01
Stage 1 of 6 · Random levels
HNSW gives each point a random top layer. About 1 in 4 rises to each next layer.
Explain it simply
You see the same 200 points in every panel. A teal dot means the point lives on that layer. Each point draws one random number, and only a few win a place higher up. So each layer holds about a quarter of the layer below it.
4 layers hold 200, 50, 13, 3 points, from layer 0 up.
points, querylinksentry pointsearch path, resultstrue 3 nearestmissed
Toy: 200 2-D points and 5 queries, shared with 22.C2
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A random draw sets each point's top layer.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.