English Puzzle Solver - London Underground Edition

Interactive London Underground station name puzzle solver using binary bitmask algorithms for efficient letter matching. Features quiz questions, word finding, and data visualization.

v0.0.1
🍰
🏃
🎓
Advanced

English Puzzle Solver

London Underground Station Names

Research demo: Tube letter-isolation puzzles, with optional DLR, Elizabeth line, Overground, and Tram in the explorer tools below.

Include:

Dictionary options

Shared by Puzzle Composer examples and Dictionary search. Scans the full word list until it fills each page; Load more fetches the next batch.

Puzzle Composer

Build letter-filter puzzles from any station name.

Dictionary search

Same full-list cover search as Puzzle Composer examples. Scans until it fills the requested match count; use Load more for the next batch.

Enter include or exclude letters to search the dictionary.

Discover the data

Station
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Acton Town
Aldgate
Aldgate East
Alperton
Amersham
Angel
Archway
Arnos Grove
Arsenal
Baker Street
Balham
Bank
Barbican
Barking
Barkingside
Barons Court
Battersea Power
Bayswater
Becontree
Belsize Park
Bermondsey
Bethnal Green
Blackfriars
Blackhorse Road
Bond Street
Borough
Boston Manor
Bounds Green
Bow Road
Brent Cross
Brixton
Bromley-by-Bow
Buckhurst Hill
Burnt Oak
Caledonian Road
Camden Town
Canada Water
Canary Wharf
Canning Town
Cannon Street
Canons Park
Chalfont & Latimer
Chalk Farm
Chancery Lane
Charing Cross
Chesham
Chigwell
Chiswick Park
Chorleywood
Clapham Common
Clapham North
Clapham South
Cockfosters
Colindale
Colliers Wood
Covent Garden
Croxley
Dagenham East
Dagenham Heathway
Debden
Dollis Hill
Ealing Broadway
Ealing Common
Earls Court
East Acton
East Finchley
East Ham
East Putney
Eastcote
Edgware
Edgware Road
Edgware Road (Bakerloo)
Elephant & Castle
Elm Park
Embankment
Epping
Euston
Euston Square
Fairlop
Farringdon
Finchley Central
Finchley Road
Finsbury Park
Fulham Broadway
Gants Hill
Gloucester Road
Golders Green
Goldhawk Road
Goodge Street
Grange Hill
Great Portland Street
Green Park
Greenford
Gunnersbury
Hainault
Hammersmith
Hampstead
Hanger Lane
Harlesden
Harrow & Wealdstone
Harrow-on-the-Hill
Hatton Cross
Heathrow Terminal 4
Heathrow Terminal 5
Heathrow Terminals 2 & 3
Hendon Central
High Barnet
High Street Kensington
Highbury & Islington
Highgate
Hillingdon
Holborn
Holland Park
Holloway Road
Hornchurch
Hounslow Central
Hounslow East
Hounslow West
Hyde Park Corner
Ickenham
Kennington
Kensal Green
Kensington (Olympia)
Kentish Town
Kenton
Kew Gardens
Kilburn
Kilburn Park
King's Cross St Pancras
Kingsbury
Knightsbridge
Ladbroke Grove
Lambeth North
Lancaster Gate
Latimer Road
Leicester Square
Leyton
Leytonstone
Liverpool Street
London Bridge
Loughton
Maida Vale
Manor House
Mansion House
Marble Arch
Marylebone
Mile End
Mill Hill East
Monument
Moor Park
Moorgate
Morden
Mornington Crescent
Neasden
Newbury Park
Nine Elms
North Acton
North Ealing
North Greenwich
North Harrow
North Wembley
Northfields
Northolt
Northwick Park
Northwood
Northwood Hills
Notting Hill Gate
Oakwood
Old Street
Osterley
Oval
Oxford Circus
Paddington
Park Royal
Parsons Green
Perivale
Piccadilly Circus
Pimlico
Pinner
Plaistow
Preston Road
Putney Bridge
Queen's Park
Queensbury
Queensway
Ravenscourt Park
Rayners Lane
Redbridge
Regent's Park
Richmond
Rickmansworth
Roding Valley
Royal Oak
Ruislip
Ruislip Gardens
Ruislip Manor
Russell Square
Seven Sisters
Shepherd's Bush
Shepherd's Bush Market
Sloane Square
Snaresbrook
South Ealing
South Harrow
South Kensington
South Kenton
South Ruislip
South Wimbledon
South Woodford
Southfields
Southgate
Southwark
St James's Park
St John's Wood
St Paul's
Stamford Brook
Stanmore
Stepney Green
Stockwell
Stonebridge Park
Stratford
Sudbury Hill
Sudbury Town
Swiss Cottage
Temple
Theydon Bois
Tooting Bec
Tooting Broadway
Tottenham Court Road
Tottenham Hale
Totteridge & Whetstone
Tower Hill
Tufnell Park
Turnham Green
Turnpike Lane
Upminster
Upminster Bridge
Upney
Upton Park
Uxbridge
Vauxhall
Victoria
Walthamstow Central
Wanstead
Warren Street
Warwick Avenue
Waterloo
Watford
Wembley Central
Wembley Park
West Acton
West Brompton
West Finchley
West Ham
West Hampstead
West Harrow
West Kensington
West Ruislip
Westbourne Park
Westminster
White City
Whitechapel
Willesden Green
Willesden Junction
Wimbledon
Wimbledon Park
Wood Green
Wood Lane
Woodford
Woodside Park
Station
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Documentation

English Puzzle Solver

A research prototype for London Underground letter-isolation puzzles. It explores how station names can be uniquely identified (or narrowed) using letter-set filters, backed by a frequency-ranked English word list.

This is not yet a general-purpose puzzle framework. The quiz below uses a fixed Tube-only station universe; the explorer tools can optionally include DLR, Elizabeth line, Overground, and Tram stations.

Overview

Each letter A–Z maps to a bit in a 26-bit mask. Station names and English words are reduced to unique letter sets, then compared with bitwise AND/OR. That makes include/exclude filtering and “find words covering these letters” fast enough to run in the browser.

Methodology

  1. Letter sanitization — strip non-letters, dedupe per name (order of first appearance preserved for display filters).
  2. Binary encoding — A=bit 0 … Z=bit 25; (mask & filter) === filter means “contains all filter letters”.
  3. Unique filters — shortest letter sets shared with every other station but absent from the target (isolates one station in a closed set).
  4. Narrow filters — letter sets that exclude small groups including the target.
  5. Word cover — scan the frequency-ranked list (and optional pairs) for phrases whose letters cover a filter, optionally excluding a constraint station’s letters. Composer examples and Dictionary search share one full-list cover search.
  6. Dictionary options — shared page size, optional valid-phrase POS filter (compromise bigrams), and pair fallback. Search walks the full list until the page is full; Load more requests the next batch.

Example puzzle (Tube-only quiz)

“Name the only London Underground station that doesn't share any letters with the word ‘Mackerel’?”

Answer: St John's Wood — the only Tube station whose letter set is disjoint from MACKEREL (in the quiz’s Tube-only universe, excluding DLR and Overground).

Binary mask algorithm

  • Each letter A–Z maps to bit position 0–25
  • Bitwise AND tests letter presence; OR combines word pairs
  • Example: “BANK” sets bits for B, A, N, K

Features

  • Tube quiz — fixed research questions with reveal animation (Tube-only; unchanged when expanding explorer modes)
  • Puzzle composer — pick a station, generate unique/narrow filters, suggest cover words
  • Discover the data — searchable table with include/exclude letter filters and letter-frequency column sorts
  • Mode toggles — Tube (default), DLR, Elizabeth line, Overground, Tram in composer + discover (not the quiz)
  • Dictionary search — include/exclude letter filters; shares options + full-list cover search with composer examples

Data sources

ResourceUse
Leipzig Corpora Collection — English NewsFrequency-ranked word/phrase list (eng_news_*130k.txt)
Transport for London Unified APIStation names by mode (dumped to stations.csv; fetched via public HTTP in pnpm puzzle:stations)
tfl-tsTyped TfL client used elsewhere in the showcase; station dump uses the public REST API directly
compromiseOptional valid-phrase filter in dictionary search (runtime POS bigrams)

Regenerating data

From apps/showcase:

pnpm puzzle:backup      # snapshot CSV + vocab + binarypnpm vocab:process      # Leipzig TSV → 130k.txt (needs source file)pnpm vocab:binary       # 130k.txt → words.base64.txtpnpm puzzle:stations    # TfL modes → stations.csvpnpm puzzle:check       # golden uniqueness + size/mask testsLanguage: bash

Golden tests assert that Tube quiz answers remain uniquely valid and that vocab/binary sizes stay in a similar band. Phrase suggestions may change between corpus refreshes; uniqueness must not.

Usage

import { EnglishPuzzleSolver } from './english-puzzle-solver'; export default function Page() {  return <EnglishPuzzleSolver />;}Language: jsx

Credits

  • Station data: TfL Unified API (Tube, DLR, Elizabeth line, Overground, Tram)
  • Word list: Leipzig Wortschatz English News corpus (download)
  • POS filtering: compromise (search-time only)