Richard Hoekstra

Research proposal

The Conway system: compression as game theory

Lean interfaces for games, codecs and search
Richard Hoekstra · April 2026

The idea

The encoder and decoder exchange roles under an involution: swapping twice restores the starting role. The game-theoretic model uses the additive identity *+*=0. Its Lean interface assumes this identity in an additive group. Multiplication needs extra structure. In ℤ/2, 1+1=0 while 1·1=1.

The Lean development organizes game primitives, codec interfaces, cost models and guarded search. The table groups modules by purpose.

Layer architecture

LayerFilesWhat it formalizes
1. Game coreConwayStar, ConwayCoderDuality, ConwayInformationGameStar game * + * = 0, encoder/decoder role duality via ZMod 2, separation of predictive state from emitted residual
2. Codec interfaceConwayStatefulCodec, ConwayPredictiveByteCodec, ConwayRecurrentCodecAsymmetric codec interface, forward/backward decomposition, recurrent decoder/update rules
3. Cost structuresConwayStatefulCost, ConwayPredictiveByteCost, ConwayRecurrentCostCost formalization for stateful, predictive, and recurrent codecs
4. Open systemsConwayOpenSystemMDL, ConwayOpenSystemScan, ConwayOpenGeometry, ConwayOpenConnectionOpen-system interaction step, trace, geometric structure of state space, connection formalism
5. ScatteringConwayScatteringAction, ConwayPathMeasure, ConwayBulkBoundaryScatteringScattering action functional, path integral measure over admissible histories, bulk-boundary duality
6. Byte mechanicsConwayByteMachine, ConwayByteMachineScan, ConwayByteResidualHamiltonian, ConwayByteMatterField, ConwayByteMatterFieldScan, ConwayByteFieldReversal, ConwayByteObstruction, ConwayByteBitstreamUniversal byte observations, bit-level state geometry, XOR/AND/OR transport, popcount energy, exact/harmonic/residual sector split, field reversal symmetries, obstruction theory
7. GeometryConwayExteriorDerivative, ConwayHyperbolicBulkde Rham exterior derivative on state space, Poincaré-ball hyperbolic geometry layer
8. DynamicsConwayHamiltonian, ConwayHamiltonianTraining, ConwayHamiltonianCoarse, ConwayHamiltonianScanGlobal exact-reconstruction energy functional, differentiable training variant, coarse-grained approximation
9. World modelConwayWorldModelGame, ConwayWorldModelGameCost, ConwayWorldModelGameMeasure, ConwayWorldModelGameScanMulti-role extension (environment, model, encoder, decoder, state, router), cost measures
10. SearchConwayHoarePath, ConwayGuardedMCTS, ConwaySwarmMeasure, ConwaySwarmSearch, ConwaySwarmGuardedBridgeWeighted Hoare edges, AlphaGo-style guarded tree search, ensemble swarm measurements, bridge between swarm and MCTS
11. IntegrationRepresentationalAtlas, ConwayCoordinateProblemFinite atlas layer for coordinate-relative MDL, MDL coordinate problem in Conway framework

Key structures

StarGameThe Lean class specifies a distinguished additive element with s+s=0, and the derived lemma gives s=−s. A separate dual-number construction supplies a multiplicative square-zero element.
ConwayHamiltonian The energy functional H = joint description length of a representation choice. Exact reconstruction is a constraint. The family-level energy landscape over representation choices defines representational advantage as an energy gap.
GuardedMCTS Tree search where nodes are (state, assertion) pairs and children are guarded moves justified by weighted Hoare edges. Value is negative remaining action. Selection combines backed-up value, local action, and exploration prior.

What the game framing actually gives you

The role bit and the additive star model the same involution. This clarifies how to express a reversible role change without implying that the underlying coding transformation squares to zero.

The ConwayHamiltonian is a cost function with a reconstruction constraint. Calling it a "Hamiltonian" is justified if the Hamiltonian structure gives you something a plain cost function doesn't — conservation laws, symplectic structure, Noether currents. Currently, the formalization defines the energy landscape and proves that representational advantage equals the energy gap between two model families (advantage_eq_energy_gap). Whether this yields anything beyond "the cheaper representation wins" remains to be demonstrated.

What's honest and what's aspirational

Concrete and proved: Layers 1-3 (game core, codec interface, cost structures) are fully formalized with zero sorry's. The role duality theorem, the roundtrip from the PPM-C formalization, and the cost decompositions are machine-checked. The ConwayByteMachine spec is implemented as a Zig runtime that actually compresses: PPM-C D=8 + Hodge gate + skip-gram expert + range coder.
Aspirational: Layers 4-7 use physics language (scattering action, path measure, bulk-boundary, hyperbolic geometry, exterior derivative) for what are currently formal interfaces without empirical benchmarks on those specific layers. The question is whether "scattering action functional" does work that "sum over compression traces" doesn't. If ConwayPathMeasure produces a provably tighter bound than plain MDL, the name earns its keep. That proof doesn't exist yet.

GuardedMCTS: the interesting part

The most concrete algorithm in the system. Tree search where nodes are (state, assertion) pairs and children are guarded moves: each move carries a logical assertion (via weighted Hoare edges) ensuring the compression remains decodable. Selection uses PUCT over admissible edges.

A Python implementation runs MCTS over model-choice sequences: at each segment of a corpus, which compression model to use? The search recovers model sequences whose total bpb is strictly better than any single-model baseline on synthetic mixed corpora (XML + prose + dense text). If that result extends to enwik8, it's a standalone paper regardless of the Conway framing.

BGC0: the native runtime

The Conway byte machine spec is implemented in Zig as the BGC0 runtime. On enwik8 slices:

Sizebpb
20 KB3.03
200 KB2.30
2 MB2.18

Tracks the Python PPM-C compressor within ~0.25 bpb across two decades of stream length. The gap is algorithmic (PPM-C exclusion blend, not architecture). Zero parameters, online learning only.

Sorry count

The source tree contains 41 Lean files under Proof/Conway/ at the time of review. The formal statements describe their specified interfaces and cost identities. A file count cannot establish a compression advantage.

The RepresentationalAtlas (1,141 lines) defines a finite family of model costs and the profile (LF₀*(x), LF₁*(x), ...). This is coordinate-relative MDL — choosing between representations is choosing coordinates in the atlas. Whether the atlas structure provides a search advantage over enumeration is an open question.
Cite this page

Richard Hoekstra. The Conway system: compression as game theory. https://richardhoekstra.nl/papers/conway-system.html