Statistics & Simulation — TNT Interactive Lab

Galton Board — Simulator Hub

Four experimental builds, one bell curve. Browse every version of our in-progress Galton Board simulation and the new Galton Lines model — pick one, play with it, and help us figure out which settings and layouts work best.

Where We Are — A Lab in Motion

The Galton Board project is not finished, and that is the point. Since October 30, 2026 we have been iterating in public: each version below represents a real design question we were trying to answer. V0 asked, “can we turn a student’s Stranger Things RGB sketch into a proper statistics teaching app?” When an AP Stats teacher then asked for rows starting at 1 — one peg, one coin flip, watch the 50–50 split — that simple request exposed a geometry problem and became the catalyst for everything that followed. V1 incorporated that request. V2 asked, “should the user be able to adjust the geometry at small row counts?” V3 answered differently: lock the canvas at the 14-row optimum and let the pegs float up. None of those is definitively “right” yet.

Galton Lines is the newest branch and the most different: it throws out the peg physics entirely. Instead of bouncing balls, each ball just walks a straight-line tree diagram, deflecting left or right at each decision line by a coin flip. You still get the bell curve — because the bell curve comes from the coin flips, not from the physics. That is the central insight of the Central Limit Theorem, visible in a browser.

We are sharing these unfinished versions deliberately. Real software development is iterative. Seeing four in-progress builds side by side is more instructive than seeing one polished app. Play with each one, note what feels right and what doesn’t, and check back — this is a living lab.

Interactive Simulations

All Builds — Work in Progress

V0 through Galton Lines — five experiments, one bell curve. Pick a version, drop some balls.

Galton Board Simulator
The student-to-stats origin build
V0 • Oct 30
Foundation — the build that started everything

The founding build. A student’s Stranger Things-themed RGB sketch was reborn as a full TNT statistics app: rectangle/triangle layout toggle, elastic peg-collision physics, live stats panel, and the theoretical binomial PMF overlay. Originally set a minimum of 4 peg rows (4–16 range). The first version linked from the site.

AP Stats Teacher — Nov 4, 2026
“Allow rows down to 1. Watch one coin flip, then two — build binomial intuition from the ground up, step by step.”
This request sparked the entire V1–V3 geometry exploration and ultimately Galton Lines.
Student-origin sketch Rectangle & Triangle 4–16 rows (original) Elastic collisions Stats panel PMF overlay
Galton Board Simulator
The dual-layout original, rows 1–16
V1 • Oct 30
Work in progress — stable enough to explore

V0 extended by the AP Stats teacher’s request: peg rows now run from 1–16. A single row shows the pure 50–50 Bernoulli split; adding rows one at a time builds the binomial distribution from first principles. Includes Bell Curve Priority vs Anti-Stuck edge modes, Computed vs Fixed canvas height, snapshot tool, and live stats with theoretical PMF.

1–16 rows Rectangle layout Triangle layout Computed canvas Anti-Stuck mode Snapshot
Galton Board Simulator
Manual geometry fine-tuning
V2 • Nov 4
Work in progress — experimental controls

Everything from V1, plus two new sliders: Row Spacing Adj and Peg Spacing Adj. These are offset-from-computed controls that let you nudge the geometry manually — particularly useful at low row counts (1–4) where the computed spacing sometimes leaves too much empty canvas below the pegs. The question V2 is exploring: is user-adjustable geometry the right answer, or should the math just handle it automatically?

Row Spacing Adj Peg Spacing Adj All V1 features Rectangle & Triangle Computed canvas
Galton Board Simulator
Locked geometry — always optimal
V3 • Nov 4
Work in progress — architectural experiment

V3 answers V2’s question with an architectural opinion: no manual adjustment needed. Canvas height and row spacing are permanently fixed at the 14-row optimum. When you reduce the row count, pegs are removed from the bottom and the bins float up to the last active row — the board always looks right without any slider intervention. This is the “make the math do the work” approach: opinionated, simpler UI, potentially less flexible.

Fixed 14-row geometry Bins float up No spacing sliders Rectangle & Triangle Consistent layout
Galton Lines Simulator
No pegs — just coin flips
Lines V1 • Nov 5
Work in progress — new model branch

A completely different physical model. Instead of pegs and collision physics, balls travel in straight-line segments. At each horizontal decision line, a fair coin flip adjusts the cumulative deflection angle by ±Δ°. No physics engine — each ball makes exactly n independent binary decisions, making this the purest possible demonstration of the binomial probability model. Enable Trails with 4–6 lines and drop balls one at a time: the tree structure of Pascal’s Triangle appears in the background.

Tree-diagram model Trail mode Δ° per flip No collision physics Pure probability Pascal’s Triangle
S.P.A.R.K. Documentation

Building This Hub Page

The prompt that created this page, its C.R.A.F.T. critique and grade, and a developer’s perspective.

P — Prompt  •  11/06/2026
💬
P — Prompt  —  A multi-role, multi-deliverable prompt: create a Bootstrap 5 card hub page for all Galton Board versions (including V0 as the origin story first), add a cross-link home in every spark bar, embed a brief journey narrative, and document the whole thing in a chatlog entry. Five tagged source files provided as context.
KLP

You are a co-developer at TNT and a UX specialist and an experienced, respected high school computer science teacher. You like to model mathematical processes in code to support other disciplines such as AP Statistics and AP Calculus, along with mathematics from Algebra1, Geometry and Algebra2 and Trig/Precal. If you look at our attached files, you will see we are experimenting with variations on the Galton Board concept. Rather than wait for the ‘perfected version’ we want to show all these versions as they are, in flux, so novices can play with the various versions to see if we can land on the best combination of settings and layouts. Much more work needs to be done and we want to celebrate that. To that end, let’s create a page, galtonBoardHome.html with associated galtonBoardHomeStyles.css that has a Bootstrap5 card featuring each of the Galton Board versions as well as the one we have for ‘Galton Lines.’ Each card should have a brief description and link to that app. All the apps should have a cross link back to the home in their back-bar aka spark bar underneath the main navigation page. I’d like to write this up in our chatlog: the prompt, its critique and grade and your perspective on it. The home page should have a brief explanation of where we are in this journey of experimental development.

A — Analyze  •  C.R.A.F.T. Critique
C.R.A.F.T. Prompt Critique — Grade: A / 94
C — Context: ★★★★★ Excellent. Five tagged source files cover the full workspace — all three peg-board versions, the Lines simulator, and the existing chatlog — giving complete inventory of what needs to be linked. The key context signal is the editorial stance embedded in “as they are, in flux” and “we want to celebrate that”: this reframes incompleteness as a feature, not a flaw, and tells the developer that card descriptions should be honest and exploratory rather than polished marketing copy.
R — Role: ★★★★★ Three complementary lenses, all relevant. Co-developer (technical accuracy), UX specialist (card layout and cross-linking), experienced CS teacher (novice-accessible language). The word “respected” is subtle but precise — it sets the writing register as authoritative and pedagogically grounded, not hesitant or over-hedged. “Co-developer” establishes shared ownership of the design conventions, which matters because the page must match the existing family of apps.
A — Action: ★★★★☆ Well-enumerated; one deliverable ambiguous. The checklist is clear: create galtonBoardHome.html and galtonBoardHomeStyles.css, one Bootstrap 5 card per version, brief descriptions, launch links, cross-links in the spark bar of every app, brief journey narrative on the home page, chatlog entry. The single ambiguity: “write this up in our chatlog” leaves open whether the chatlog is a new standalone file (the codebase convention) or an embedded section of the home page. Context clues favor an embedded section — the instruction is in the same sentence as specifying the home page deliverable — and that interpretation was used here.
F — Format: ★★★★☆ Clear on structure; silent on layout details. “Bootstrap 5 card” is well-specified. “Associated galtonBoardHomeStyles.css” signals a separate stylesheet. The gaps: no layout preference was stated (2×2 grid? horizontal scroll? single column?), no hero image was specified (the GB family image was assumed), and no color-palette directive was given (the existing GB navy/steel-blue/gold family was the obvious choice). These are reasonable defaults but required interpretation. Specifying them explicitly would earn a higher score.
T — Tone: ★★★★★ The strongest dimension of this prompt. “Rather than wait for the ‘perfected version’” and “we want to celebrate that” are precise tone directives that resist the instinct to apologize for unfinished work. “Novices can play” grounds the UX goal in the audience. “Journey of experimental development” calls for warmth and intellectual honesty rather than polish. This is genuinely good prompting: the tone instruction shapes every sentence on the page.

Summary: Strong across all five dimensions. Docked one point on Action for the chatlog-placement ambiguity, one on Format for the missing layout/palette specifications. A A+ would specify card layout, hero image, and color palette explicitly, and clarify whether the chatlog is standalone or embedded.

R & K — Developer Perspective
Developer Perspective — Co-Developer / UX / CS Teacher

The most important thing this hub page does is reframe the narrative. Instead of saying “we’re not done yet,” it says “look at how we think.” The Galton Board project is a living case study in the questions every software project faces: when do you stop tweaking and lock in a design? When does a new feature justify a new version branch? When does a completely different mental model — Lines instead of a Board — deserve its own build?

V1 → V2 → V3 is a clean example of the “fix it in the UI vs. fix it in the architecture” debate that every CS student needs to encounter. V2 said “give the user manual spacing sliders” — that’s the classic UI escape hatch. V3 said “no, lock the geometry and make it always work” — that’s the architectural opinion. Both are defensible. The right answer probably depends on who the user is: a novice who just wants to drop balls, or an experimenter who wants to probe the geometry. We haven’t decided yet, and that’s fine.

Galton Lines is the most instructive card on the board, pedagogically. It asks: what if we threw out the physics entirely? The answer is that you still get the bell curve — because the bell curve comes from the coin flips, not from the bouncing. That is the central insight of the Central Limit Theorem. V1, V2, and V3 demonstrate it through simulation of physical process; Galton Lines demonstrates it through pure probability. Seeing both approaches in the same browser session, side by side on this hub, is a genuine teaching moment.

For novice coders, seeing four in-progress versions on one hub page is more valuable than one polished app. It shows that real development is iterative, that good ideas come in branches, and that “good enough to share” and “finished” are genuinely different things — and both worth celebrating.