The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type
struct<-3: int64, -2: int64, -1: int64, 1: int64, 2: int64>
to
{'-2': Value('int64'), '-1': Value('int64'), '1': Value('int64'), '2': Value('int64')}
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 150, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 130, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 579, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2328, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1870, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2170, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<-3: int64, -2: int64, -1: int64, 1: int64, 2: int64>
to
{'-2': Value('int64'), '-1': Value('int64'), '1': Value('int64'), '2': Value('int64')}Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Wikipedia Speedrun Tablebases
Exact click distances from every English Wikipedia article to 10,029 endings.
This dataset contains the complete reverse-BFS distance map for each ending in the curated Level 3 + Level 4 vital-article sets, built from the 2026-12-01 English Wikipedia SQL dumps. For every article and every ending it stores the minimum number of internal links that must be clicked to reach that ending — one byte per article, not a heuristic.
This release is English Wikipedia only. Other language editions and MediaWiki projects would need their own graph build and separate tables.
- 7,272,843 article nodes
- 717,825,622 unique directed links
- 10,029 precomputed endings
- 12.47 GB compressed tables (72.94 GB of
uint8distances in memory) - Mean distance 3.053 clicks; observed maximum 6
- 7,270,652 articles can reach every ending; 2,191 cannot
| Snapshot | English Wikipedia, 2026-12-01 |
| Source dumps | page, redirect, linktarget, pagelinks (MD5-verified) |
| Code | github.com/micpilar/wikipedia-speedrun-tablebases |
| Live probe | micpilar.github.io/wikipedia-speedrun-tablebases |
| Static mirror | huggingface.co/spaces/micpilar/wikipedia-speedrun-probe |
| Format spec | docs/FORMAT.md |
The browser probe runs entirely client-side: it fetches one ~1.2 MB table, decompresses
it with zstd in JavaScript, and reconstructs the shortest path by walking
the forward link graph. No query server is involved. Any other English Wikipedia
article can be requested from the site: the local worker (or the GitHub Actions
fallback) runs the same reverse BFS, uploads the new table under ondemand/, and
the page picks it up
automatically. The same site can compare
the current snapshot with the previous one: compare.json.gz carries the summary,
and one small .wdx file per ending carries the exact per-article distance changes.
Files
graph/
titles.bin node id -> article title (title-sorted node ids)
all_titles.bin every namespace-0 title -> final article node (redirects resolved)
pageids.bin Wikipedia page id by node id
forward.bin CSR out-links
reverse.bin CSR in-links
meta.txt build statistics
endings-20261201/
00/…ff/ 256 shards, keyed by target_idx & 0xff
<target_idx>.wtd header + zstd-compressed uint8 distance array
<target_idx>.json title, page id, layer counts, BFS time, file size
vital3.txt source Level 3 ending list
vital4.txt source Level 4 ending list
site-20261201/
manifest.json totals, histogram, hashes
endings.json.gz the 10,029-row ending manifest used by the browser
unreachable.json.gz sorted node ids with no path to any ending
compare.json.gz per-ending distance changes vs the previous dump
titles/ 1024 gzip title chunks + index
pageids/ 1024 gzip page-id buckets for O(log n) lookup
forward/ 8192 gzip delta-coded out-link chunks + index
site/manifest.json stable pointer to the current release directories
ondemand/
index.json on-demand endings computed after the snapshot
<node>.wtd table produced by the local worker or Actions fallback
<node>.json metadata for that table
diffs-20261201/
summary.json graph-level counts for the snapshot pair
00/…ff/ 256 shards, keyed by the *new* ending node
<node>.wdx compact old-distance delta, one byte per new article
<node>.json faster/slower/added/removed counts for that ending
index/
endings.tsv one row per table: target_idx, page_id, title, maxima, bytes
metadata.jsonl one JSON object per table
summary.json aggregate totals
The previous release remains under site/, endings/ and diffs/ for
rollback. The stable site/manifest.json names the current directories, so
always follow its data_base, endings_base and diffs_base fields.
<target_idx> is the title-sorted node id of the ending. A .wtd file for
target_idx = 4624112 lives at endings-20261201/f0/4624112.wtd.
Quick start
git clone https://github.com/micpilar/wikipedia-speedrun-tablebases
cd wikipedia-speedrun-tablebases
# current release (~20 GB) into an ignored folder
hf download micpilar/wikipedia-speedrun-tablebases \
--repo-type dataset \
--include "graph/*" --include "endings-20261201/*" \
--include "site-20261201/*" --include "diffs-20261201/*" \
--include "index/*" --include "ondemand/*" --include "dumps/*" \
--include "site/manifest.json" \
--local-dir wtb-data
To fetch only the graph plus one ending instead (about 6.3 GB):
hf download micpilar/wikipedia-speedrun-tablebases \
--repo-type dataset \
--include "graph/*" --include "endings-20261201/f0/4624112.*" \
--include "index/endings.tsv" \
--local-dir wtb-data
Query it
The Python reader has no third-party dependencies (it loads libzstd via ctypes):
python3 scripts/tablebase.py --graph wtb-data/graph --endings wtb-data/endings-20261201 \
--end Moon --start Pizza
# target: Moon
# target_idx: 4624112
# page_id: 19331
# ...
# path from Pizza to Moon: 3 clicks
# 0 Pizza
# 1 2010 United States tomato shortage
# 2 United States
# 3 Moon
import sys
sys.path.insert(0, "scripts")
from tablebase import Graph, Tablebase
g = Graph("wtb-data/graph")
tb = Tablebase(g, "wtb-data/endings-20261201", "Moon")
tb.distance("Pizza") # 3
[g.title(u) for u in tb.layer(1)][:5] # articles one click from Moon
[g.title(u) for u in tb.path("Pizza")] # ['Pizza', '2010 United States tomato shortage', 'United States', 'Moon']
Distances are 0 for the ending itself, 1–6 for reachable articles, and 255
for articles with no path in this snapshot. Layer 0 is the ending; layer 1
is every article that links directly to it; layer 255 is unreachable.
What counts as a click
- One internal link = one click. Links are taken from the MediaWiki
pagelinkstable, so template, infobox, navbox and citation links are included. - Redirects resolve to their final article. A link to a redirect costs the same as a link to its target.
- Only namespace-0 articles are nodes. Red links, categories, files, and other namespaces are excluded; duplicate and self-links are removed.
- This is a snapshot. Articles edited after 2026-12-01 can differ from the live site. The published diff shows exactly which distances changed in the next dump. The 2,191 unreachable articles are a property of this snapshot's graph, not a claim about all time.
Default ending set
The 10,029 endings are the resolved union of Wikipedia's
Level 3 and
Level 4 vital
articles. Level 3 alone produced 1,003 tables (1.23 GB); Level 4 added the rest.
Source lists and resolution notes are in endings/.
Any article can be an ending. The code's wtb gen command resolves the title,
runs a reverse BFS, and writes a new .wtd in seconds.
Verification
- All four source dumps were checked against Wikimedia's MD5 sums.
- A 200-table payload sample was decompressed end-to-end and its distance
histogram compared with the header (
scripts/verify_files.py). - Sample tables were checked for the BFS optimality condition
dist[u] = 1 + min(dist[v])over all out-links (wtb probe --check). - Random shortest paths were replayed against the live Wikipedia API, skipping
pages edited after the snapshot (
scripts/validate.py).
License and attribution
The code is MIT-licensed. The data is derived from English Wikipedia and is distributed under CC BY-SA 4.0, the license of the Wikipedia text from which the link graph is derived. Wikipedia is a trademark of the Wikimedia Foundation; this project is not affiliated with or endorsed by it.
Built by DeepSeek V4.1 Flash running in OpenCode, from a specification and review by @micpilar.
@misc{wikipedia_speedrun_tablebases_2026,
title = {Wikipedia Speedrun Tablebases: exact click distances for 10,029 endings},
author = {micpilar},
year = {2026},
note = {English Wikipedia 2026-12-01 dump; built with DeepSeek V4.1 Flash in OpenCode},
url = {https://github.com/micpilar/wikipedia-speedrun-tablebases}
}
- Downloads last month
- 365