WikiSpeedtablebases
Probe Endings Layers Random Compare About
latest
The Wikipedia link graph, solved backwards

How many clicks
from here to there?

Every article. Every ending. The shortest number of clicks, precomputed from the latest English Wikipedia dump. No guessing, no search — just the exact distance and a shortest path.

Any Wikipedia article
One of 10,029 precomputed endings
Try

Pick a start and an ending.

The tablebase knows the distance from all 7,260,698 articles to every precomputed ending. A query takes a few seconds the first time and is instant afterwards.

0.5 MBending index
1.2 MBone distance table
≤ 6clicks in this snapshot
The target list

10,029 endings,
already solved.

Every table is a complete distance map: one byte per article, from every corner of Wikipedia to the ending. Browse the set, sort by difficulty, or send an ending straight to the probe.

# Ending Max 1 click Mean Δ prev Table
Distance layers

Who is N clicks away?

A layer is the set of articles whose shortest path to the ending is exactly N clicks. Layer 0 is the ending itself; layer 1 links directly to it.

Choose an ending.

You can also click any bar in the distance chart after a probe.

The analyzed article generator

One article,
already solved.

Generate a random start from the articles that were actually analyzed. Each one is a namespace-0 page in the latest graph, has a finite distance to every precomputed ending, and can be probed immediately. No redirects, no pages created after the snapshot, no live-Wikipedia surprises.

Random analyzed article

Roll the dice.

Pick a start that already exists in the solved graph.

Uniformly sampled from the 7,258,517 articles that can reach every precomputed ending. The 2,181 analyzed articles with no path are excluded.

Snapshot diff

Same articles,
new distances.

Every ending was recomputed from the newest dump and matched to the previous one by Wikipedia page ID. Pick an ending to see how many articles got closer, how many got farther, and the biggest individual jumps.

Choose an ending.

Or open the comparison from any probe result and any row in the endings table.

Under the hood

The whole graph,
solved backwards.

This is a tablebase in the chess sense: instead of “distance to mate”, it stores the exact number of clicks from every article to a chosen ending. This page explains where the data comes from, how it is computed, and what it can and cannot tell you.

The snapshot

English Wikipedia, latest

The graph is built from the official Wikimedia SQL dumps — page, redirect, linktarget and pagelinks — not by scraping rendered pages. That makes the build reproducible and lets us keep every internal link, including those generated by templates and navigation boxes.

What a table is

One byte per article

For an ending E, the generator runs a breadth-first search over the reverse link graph starting at E. The first time it reaches an article is its minimum click distance.

The result is stored as one uint8 per article, zstd-compressed: 0 is the ending, 1–6 are reachable distances, and 255 means no path in this snapshot. A typical file is about 1.2 MB compressed and 7 MB in memory.

dist[article] → minimum clicks to E
Why it is exact

BFS on an unweighted graph

Every click is one edge with weight 1. Breadth-first search visits nodes in nondecreasing distance order, so the first visit is optimal. The tablebase is not a heuristic or a sample; it is the complete distance map.

Each generated table is checked with the BFS condition dist[u] = 1 + min(dist[v]) over every out-link, and file integrity is verified by decompressing the payload and comparing the distance histogram to the header.

The shape of Wikipedia

Everything is close

The link graph is dense and hub-dominated. Across all 10,029 endings the largest observed distance is 6 clicks; the average distance from a random article to a random ending is about 3.05. Even the deepest endings are only 6 clicks from their farthest article.

Every ending shares the same reachable core: 7,258,517 articles can reach it, 2,181 cannot. The distances differ; the reachable set does not. That is a property of this snapshot, not a bug.

Reproduce it

From dumps to tablebases

The full pipeline is open source. It needs about 11 GB of dumps, 6.2 GB of graph binaries, and roughly 12.5 GB for the complete ending set. On an 8-thread laptop the graph build takes about 12 minutes and a table takes about 8 seconds (5–20 s across the set).

# 1. download and verify the Wikimedia dumps
scripts/download.sh

# 2. build the namespace-0 article graph
scripts/build_graph.sh

# 3. generate tables (resumable, parallel)
scripts/generate.sh endings/vital3.txt
scripts/generate.sh endings/vital4.txt

# 4. query
./wtb probe --end "Wheat" --start "Bread"
./wtb probe --end "Wheat" --layer 1 --limit 20
./wtb probe --end "Wheat" --check

The Python reader has no third-party dependencies: python3 scripts/tablebase.py --end Wheat --counts. The full dataset is on Hugging Face; the code is on GitHub.

Caveats

What counts as a click?

  • Redirects are one click. A link to a redirect is resolved to its final article.
  • All internal links count. pagelinks includes navboxes, infoboxes, taxoboxes and citation templates. A body-only variant would need link provenance.
  • Namespaces and red links are dropped. Only namespace-0 article targets are nodes.
  • It is a snapshot. Pages edited after the snapshot date may have different links today.
  • Not every ending is precomputed. The set covers the vital-article lists; wtb gen adds any other ending in seconds.
Built with

DeepSeek V4.1 Flash in OpenCode

The code, analysis, documentation and this site were produced by DeepSeek V4.1 Flash running in OpenCode, from a specification and review by @micpilar.

Data derived from English Wikipedia, licensed CC BY-SA 4.0. Code licensed MIT. This site is not affiliated with the Wikimedia Foundation.

Source Dataset
WikiSpeed TablebasesThe Wikipedia link graph, solved backwards.
Probe Endings Layers Random Compare About GitHub Data Mirror
Snapshot latest 7,260,698 articles 10,029 endings Built by DeepSeek V4.1 Flash in OpenCode