What this is?
A one-file, pure JS + JSON solver for alphametic cryptarithms (e.g., SEND + MORE = MONEY).
- Data — base (10) and the words:
addends and result.
- Policies — declarative families: all letters map to distinct digits, leading letters ≠ 0 (now enforced globally), and column-wise addition with carry.
- Answer — the letter→digit mapping and derived numeric equation.
- Reason Why — column-by-column arithmetic (with carries) in mathematical English.
- Check — distinctness, non-zero leaders, numeric equality, and per-column identities (… items).
Solver: depth-first search on columns (least-significant to most-significant) assigning digits consistent with carries; prunes with used digits & leading-zero bans.
Puzzle Details
- Alphabet: uppercase English letters A–Z; each maps to a digit once.
- Base: 10 for this demo.
- Leading rule: first letter of each word cannot be 0 (enforced globally across all occurrences).
- Tip: Try classics like SEND+MORE=MONEY, TWO+TWO=FOUR, CROSS+ROADS=DANGER, etc.
Data (JSON)
All words must be uppercase A–Z. Base must be 10 (this demo).
Policies (declarative JSON rules)
Puzzle Solution Summary
(run to populate)
Uniqueness Probe
(toggle “Probe uniqueness” then Run)
Answer (newly derived facts)
computing…
Reason Why (mathematical English)
(click “Run ARC”)