Why does a gas of structureless colliding balls always arrange its speeds into the same fixed shape — and why never the reverse?
Units: dimensionless (⟨v⟩/v_rms = √π/2 for the 2-D Maxwell–Boltzmann speed law; 3-D gives √(8/3π) = 0.9213 — the ratio counts dimensions)

▶ Run this simulationRead how it works
Maxwell's 1860 speed law manufactured from collisions alone: an event-driven hard-disk gas started at the LEAST thermal state possible (every disk at the same speed — a delta spike, ratio ⟨v⟩/v_rms = 1 exactly) relaxes onto the 2-D Maxwell–Boltzmann distribution with NO fitted parameter — ⟨v⟩/v_rms = 0.88707 ± 0.00090 vs √π/2 = 0.886227 (0.10%, 0.9 SE), pooled histogram TV 0.011 against the energy-fixed MB curve — while Boltzmann's H falls 2.06 nats monotonically onto the closed-form floor −ln(2πs²)−1 to 0.0044 nats and shifts by exactly −ln4 when T×4. The energy-matched 3-D Maxwell shape (wrong Jacobian) is rejected ×10 in TV and 38 SE in ratio; the SAME gas with collisions off stays a delta spike forever; and the N=16 gas reads high by +0.0065 — the microcanonical O(1/N) excess (predicted +0.0069) that vanishes as N→∞: MB is the infinite-gas limit, measured. The SHIPPED module's readout was replaced, not disclosed: it printed a SINGLE-FRAME ⟨v⟩ to three decimals with no uncertainty — per-frame scatter of the ratio is 0.0077, so two of those digits were sampling noise and the number never converged — plus an EMA shape distance floored near 8% and a plug-in H sitting 0.51 nats off the closed form with the chart's dashed 'floor' drawn at the trace's own running minimum. It now runs THIS ORACLE's estimator and is checked as one instrument with it: 7/7 displayed statistics and all 170 H-trace points Object.is-identical to an independently written replica of these definitions over the module's executed velocity stream, and across 96 runs in 6 disjoint seed families the screen reads ⟨v⟩/v_rms = 0.886679 ± 0.000059 = √π/2 + (4.5 ± 0.6)e-4 against the closed-form microcanonical excess +√π/16N = +3.46e-4 at N=320 — 1.8 SE, no residual systematic, and 0.09 combined SE from the oracle's own event-driven periodic recovery
Run a from-scratch event-driven 2-D hard-disk gas in a periodic box (earliest pairwise collision under the minimum image; equal-mass elastic exchange of the normal velocity component — energy AND momentum conserved to machine precision; at small N, where min-image linear motion can see no approaching pair, the gas free-streams a capped step until the wrap restores an approach). Initialize at the delta spike: every disk at speed v₀, random direction — lab-frame ⟨v⟩/v_rms = 1 exactly, the least-thermal speed distribution at this energy. Measure in the CENTRE-OF-MASS frame (momentum is conserved; the lab frame carries an O(1/N) drift bias) with continuous TIME averages (speeds are piecewise constant between events, so Σ|vᵢ−v_cm|·dt is exact — collision-event snapshots over-weight fast configurations). Recover: (A) the dimensionless ratio ⟨v⟩/v_rms across 6 seeds × 12000 collisions at N=128, v_rms pinned by the conserved energy; (B) the full time-weighted speed histogram pooled across seeds in v/s units against the parameter-free MB curve (s² = ½⟨v²⟩ from energy, no fit); (C) Boltzmann's H(t) from replica-pooled DECORRELATED velocity-grid snapshots with the Miller–Madow correction, its floor against the closed form −ln(2πs²)−1; (D) the finite-N microcanonical excess at N=16; (E) a v₀×2 temperature sweep (ratio invariant; H floor shifts −ln4). Rivals: the energy-matched 3-D Maxwell shape (v² Jacobian, 3σ²=⟨v²⟩, zero fitted parameters) scored on the identical data, and the SAME machinery with collisions off. √π/2, √(8/3π) and −ln(2πs²)−1 are loaded/computed only to score.
f(v) = (v/s²)·exp(−v²/2s²) with s² = kT/m = ½⟨v²⟩ fixed entirely by the conserved energy; ⟨v⟩ = s√(π/2), v_rms = s√2; H = ∫f ln f d²v falls to −ln(2πs²)−1 (Boltzmann's minimum at fixed energy)
0.0009
0.9
2.9000e-15
Maxwell's 1860 equilibrium speed distribution (Phil. Mag. 19, Prop. IV — the first statistical law of physics) and Boltzmann's 1872 H-theorem, in their 2-D form: Gaussian velocity components ⇒ the Rayleigh speed law f(v) = (v/s²)exp(−v²/2s²), whose parameter-free signature ⟨v⟩/v_rms = √π/2 the gas must produce from ANY initial condition at the same energy. This world VALIDATES, not derives: the generator codes only free flight and equal-mass elastic momentum exchange — no Gaussian, no temperature, no H, no √π/2 — and the delta-spike start is the strongest possible non-circularity control (the initial ratio is exactly 1; every recovered signature is manufactured by the collision dynamics during the run). Non-circular on several further fronts: v_rms is pinned by the conserved energy so the headline ratio has zero adjustable scale; the MB overlay uses s² = ½⟨v²⟩ from energy, not a fit; the H floor is compared to a closed form computed only in the scorer; the collisionless control shows the machinery does NOT produce MB when the physics (collisions) is removed; the wrong-dimension rival shows the recovery discriminates between closed-form laws on the same data; and the finite-N excess (+0.0065 at N=16 vs the predicted +√π/16N = +0.0069 microcanonical Beta-function marginal) demonstrates the measurement resolves even the known O(1/N) departure from MB, in the predicted direction and size. Estimator lessons earned here: measure in the CM frame (the lab frame's conserved-momentum drift biases at O(1/N)), time-average between events rather than sampling at collisions (event sampling over-weights fast configurations), and never estimate an entropy from correlated samples (per-event sampling biased H high by ~0.8 nat; decorrelated snapshots + Miller–Madow pinned the floor to 4.4e-3). Distinct from ?world=meanfreepath (the TRANSPORT side: collision rates and Maxwell's √2, which assumes thermalization has happened): this world is the EQUILIBRIUM side — why the thermal state exists and is reached at all, the H-theorem arrow included. It does not model 3-D gases (the 2-D law is validated and 3-D is the falsified rival's shape here), quantum statistics, or the Poincaré-recurrence/Loschmidt-reversal caveats beyond noting the module discloses them; the finite deterministic gas exhibits the overwhelmingly-probable monotone H, which is exactly Boltzmann's claim.
Three, all measured and all on the screen or in this record. (1) FINITE N. The module runs N=320 in a reflecting-wall box, so its single-particle speed marginal is the microcanonical energy-sphere one, above √π/2 by +√π/16N = +3.46e-4 (the same Beta-function marginal the oracle resolves at N=16); measured over 96 runs the screen sits +4.52e-4 ± 0.59e-4 above √π/2, a 1.8 SE residual over that prediction — so the offset the HUD prints beside the gap accounts for it, and no further systematic is resolved. (2) The plotted H trace over-reads its level by +0.485 nat (8-call windows, 2560 samples, an entropy-estimator finite-sample bias that halves as the sample count doubles), so the chart shows the SHAPE of the fall and the HUD quotes the pooled read, which lands −1.16e-3 ± 3.4e-4 nat from −ln(2πs²)−1. (3) The shape distance is binned-sampling limited at 0.75% ± 0.07. Two candidate systematics were hunted and NOT found, which is why they are not disclosed as biases. The fixed-step overlap detector genuinely MISSES collisions — directly counted, 2.42% of true crossings at DT=0.01, 1.20% at DT/2, 0.55% at DT/4, and the missed pairs run ×1.04 faster in |v_rel| — yet a 40-seed scan at equal physical time finds the ratio flat across those three step sizes (+3.01, +2.84, +2.80 e-4 ± 0.8), because the velocity update is an orthogonal reflection whichever pairs receive it, so losing some does not move the velocity-sphere measure; and the overlap push-apart perturbs positions only, never velocities, leaving energy exact (drift ≤ 0.45 ppm). A paired 40-seed test over warm-ups 400/800/1600/2000/3200 finds no dependence either (|paired Δ| ≤ 0.65e-4), so the shipped 800 discards the delta-spike transient. ESTIMATOR LESSON, earned here and reusable: the SE from seed scatter WITHIN one seed family under-states the real uncertainty on a module mean by ~30%. Single families of 12, 16, 10 and 40 seeds read the offset as +4.9, +7.6, +6.3 and +3.0 e-4 with claimed SEs of 0.6–1.2e-4 — mutually inconsistent — and the pinned 16-seed gate set (+7.6e-4, a nominal 4.7 SE "excess" over the finite-N prediction) does not replicate. Six DISJOINT families of 16 give a between-family SE of 0.59e-4 against a naive within-family 0.44e-4, and the excess evaporates to 1.8 SE. The gate therefore asserts the offset's sign and its size loosely (and explicitly does NOT require every seed to sit above √π/2 — only 79 of 96 do) rather than pinning one draw as physics.
npm run derisk -- maxwell (scripts/maxwell-derisk.mjs)scripts/oracles/maxwell.reference.jsonJ. C. Maxwell, 'Illustrations of the dynamical theory of gases', Phil. Mag. 19, 19–32 (1860) — Prop. IV. L. Boltzmann, 'Weitere Studien über das Wärmegleichgewicht unter Gasmolekülen', Wien. Ber. 66, 275 (1872) — the H-theorem. √π/2 = 0.8862269255 (2-D); √(8/3π) = 0.9213177 (3-D); MB floor −ln(2πs²)−1.