Shannon Bench is a workbench for information itself: what it is, how small it can be squeezed, and how it survives a noisy wire. You type a message and watch an entropy needle price it live; you grow a Huffman tree that compresses it as far as the law allows; then you send it through real, seeded noise and watch encoder chips fight for it — up to the wall no code can pass. Everything happens in your browser; nothing is uploaded.
If Boole Bench showed you how machines are built, and Turing Bench what they can do, Shannon Bench shows what they are all working on — and the one wall even a perfect code cannot pass.
Two colors carry meaning everywhere: amber is your payload, blue is the code machinery riding along to protect it.
On your very first visit the bench introduces itself — the two rooms, the amber/blue rule, and two ways to start: Start with Lesson 1 (opens the Learn layer) or Just let me play.
Hints are the plain-language layer: with the toolbar's Hints toggle on, small blue ? dots appear next to the instruments that need explaining — the gauge, the rack, the prediction readings, the BER counters, the capacity box. Hover one for a short card. They are hovercards, not a tour: nothing moves, nothing is gated.
The toolbar runs along the top:
| Control | What it does |
|---|---|
| Source / Channel | Switches rooms. The switch is always free — even mid-lesson. |
| status lamp | Source: Live/Encoding. Channel: the selected send's verdict (Clean, n flips · healed/flagged/lost). |
| chip | The loaded source (source room) or armed code (channel room). |
| Learn | Opens the 12-lesson panel on the right. |
| Hints | Toggles the hovercard layer. |
| Export / Import | Saves/loads the bench state as JSON (see §7). |
| ☀ / ☾ | Theme. Instrument glass stays dark in both — real instruments do. |
Both rooms have the same anatomy: a library rail on the left (what you can load), the canvas in the middle (where things happen), and an instrument rail on the right (what the numbers say).
The deck is the single source of truth — every instrument derives from whatever is on it. Click it (it autofocuses) and type.
The compressor controls sit under the deck:
| Control | What it does |
|---|---|
| ENCODE (push button) | Latches; the cursor walks the message at the chosen speed, encoding symbol by symbol. |
| STEP | Encodes exactly one symbol. |
| speed fader | 1–12 Hz. |
| CODED n/m | Bits emitted so far / total Huffman bits. |
| RESET | Rewinds the compressor cursor. |
Entropy gauge. The amber needle is H of the deck message in
bits/symbol, measured live on every keystroke. The cool mark is the
loaded source's designed entropy (its REF). Short samples read low —
the gap between needle and mark is a lesson, not an error. The
MEASURED / SOURCE REF counters repeat both numbers digitally.
Symbol rack. Every distinct symbol with its count and price on arrival: −log₂ p bits. Rare symbols cost more, and their lamps burn brighter — unless all counts are equal, in which case no lamp lights (a lamp that always burns says nothing).
Counters. Symbols and distinct symbols on the deck.
Prediction. The memory-and-models section (it appears once the deck is non-empty):
Compression. Once the deck is non-empty: the same message billed four ways — ASCII (8 bits/symbol), FIXED (⌈log₂ distinct⌉), HUFFMAN (the tree's total), and the average bits/symbol. When Huffman cannot beat fixed, the rail says "compression honestly refuses".
Experiments stay mounted — a game in progress survives tab hops.
The left rail is the code library:
| Chip | Rate | Character |
|---|---|---|
| None | 1.00 | naked channel — nothing between noise and payload |
| Repeat ×3 | 0.33 | every bit three times; the copies vote |
| Repeat ×5 | 0.20 | five copies; survives two lies per group |
| Parity | 0.80 | one check bit per four; detects, cannot fix |
| Hamming (7,4) | 0.57 | three checks triangulate; heals any single flip |
| Your Chip (7,4) | 0.57 | parity homes fixed at 1, 2, 4 — the 3×4 coverage wiring is yours. The rail audits it live: heals n/7. |
Below the chips, four noise presets (Clean 0.00 · Whisper 0.05 · Noisy 0.10 · Storm 0.30) and the fader for anything in between (up to 0.5). The source panel at the bottom shows what the source room will be sending.
Controls under the wire:
| Control | What it does |
|---|---|
| SEND | Transmits the whole message, block by block. |
| STEP | Sends one block (one codeword through encode → noise → decode). |
| Custom nibble | Type 4 bits and STEP sends exactly that nibble — for verifying codewords by hand. |
| noise fader | P 0.00–0.50, live. |
| RESET | Clears the log and truly rewinds the world (see below). |
The signal path shows the selected transmission: payload bits in amber, check bits in blue, and ⚡ strikes where the noise hit. When a send is selected you can click a wire bit to sabotage it by hand — the log then tags the row hand-flipped and keeps the record honest.
Determinism. Sends are seeded (seed 0x5EED + send id): the same clicks produce the same flips, RESET truly rewinds, and the trace scrubber replays records instead of re-rolling them. Claims you can re-run are the only claims an instrument should make.
The center column's second tab swaps the nibble payload for a 32×32 one-bit image — 1024 pixels, 256 blocks of four, through the same seeded channel with whatever chip is armed:
The transmission log gives every block one of four verdicts, and the words are precise:
Decoder panel. Click a row: repeat shows each triple's election, parity shows the check, Hamming shows C1/C2/C3 recomputed from the received bits, mismatches highlighted, the address assembled. The panel knows the ground truth from the record and will tag "healed the wrong bit"; the chip's own lamps only ever see the received bits. Both views are shown side by side on purpose.
Syndrome instrument (Hamming): the three check lamps and the assembled address S₃S₂S₁ — the checks spell the crime scene.
BER instruments. BER RAW counts flips on the wire (it tracks the fader; no code changes it). BER OUT counts payload bits still wrong after decoding. A code earns its keep exactly in the gap. STRUCK / HEALED / FLAGGED / LOST count blocks by verdict.
Rate vs Capacity. RATE R is the armed chip's payload share; CAPACITY C = 1 − H₂(p) is the wall. The box judges the armed code against the current noise — when R > C it pulses ABOVE CAPACITY: "no code — present or future — can make this reliable. That is not a warning, it is a theorem." The same C, read as mutual information, is how many bits of source survive each wire bit — the lesson "The Bridge" makes that connection.
Trace. The scrubber rewinds to any past send; records replay
exactly. LIVE — drag to rewind.
Every preset is referenced by at least one lesson, and every lesson binds at least one preset (family rule):
| Preset | Sample | REF (bits/sym) | What it teaches |
|---|---|---|---|
| English Text | INFORMATION IS SURPRISE | 4.14 | samples vs. sources; redundancy |
| Random Bits | 32 coin flips | 1.00 | the incompressible floor |
| All Zeros | 16 zeros | 0.00 | certainty says nothing |
| Loaded Die | 16 skewed throws | 2.13 | skew is what codes cash in |
| The Foundry | 16 dyadic symbols | 1.875 | the Kraft wall, exact — the Code Forge's anvil |
| Weather Chain | 64 Markov days | 0.54 | memory lowers the rate — needle 1.00, CONTEXT 0.50 |
| Scratchpad | whatever you type | — | keeps the last preset's mark |
Export downloads the bench state as shannon-bench.json: message,
preset, armed code, noise level. Import loads one back — it replaces
the current state without asking (you chose the file). Unknown presets
land on Scratchpad, noise clamps to [0, 0.5], unknown codes are rejected
loudly. Your Chip's custom wiring is not persisted in export v1.
Learn opens the 16-lesson course in a right-hand panel; the bench stays live and the canvas stays the hero.
The companion Workbook (one chapter per lesson, exercises with
solutions) lives next to this guide — both build to print with
python3 docs/docbuild.py.