Companion film
The forecast repeats itself
Change one poll and watch exact forecast probabilities and seats update while the same seeded draws repeat across every resolve.
46 secGrid 0.63.2
Open film page →Canonical Grid model
Seeded poll aggregation, uncertainty draws, uniform swing, seat conversion, and win probability.
What this model gives you
25 min to study · Source reviewed 2026-08-26
Continue with guided practiceExpected checkpoint
With the shipped politics and social-science modules, the four authored polls and weights, and seeds 101 through 132. The deterministic algebraic outputs below are source-derived; the exact seeded win fraction is deliberately left unclaimed until a runtime receipt is recorded.
soc.weighted_mean combines four estimates with their declared weights. Keep F1 visible so every simulation and district result points back to the same public poll estimate.
The comprehension maps seeds 101 through 132 through RAND_SEEDED and NORM.INV. The seed list is model data, so the forecast can be replayed exactly by a compatible runtime.
C7 measures the poll against 50 percent. pol.uniform_swing applies that delta to each baseline share, after which F10 counts districts above the authored winning threshold.
A canonical receipt should pin the runtime build, record all 32 draws or their digest, assert C6 and F10, and replay the same seeds in optimized mode before promoting the forecast as runtime-certified.
MODEL "Reproducible Election Forecast"
DESCRIPTION "Seeded poll aggregation, uncertainty draws, uniform swing, seat conversion, and win probability."
VERSION "1.0.0"
AUTHOR "Grid Team"
TAGS "canonical", "portable", "politics", "forecast", "simulation"
USE "shared/politics.gs" AS pol
USE "shared/socsci.gs" AS soc
# Poll estimates and effective sample-size weights.
A1 = [0.48, 0.51, 0.49, 0.50]
A3 = [800, 1200, 900, 1500]
F1 = soc.weighted_mean(A1, A3)
F2 = 0.025
# Fixed seeds make the canonical Monte Carlo model reproducible.
A6 = [NORM.INV(RAND_SEEDED(seed), F1, F2) FOR seed IN 101..132]
C6 = COUNTIF(A6, ">0.5") / 32
C7 = F1 - 0.5
# Baseline district shares and uniform-national-swing seat conversion.
F6 = [0.56, 0.53, 0.51, 0.49, 0.46, 0.44]
F8 = MAP(F6, share => pol.uniform_swing(share, C7))
F10 = COUNTIF(F8, ">0.5")
A40 = `poll={F1} win_probability={C6} projected_seats={F10}`
END MODEL