Dominoes
Two things go by that name, and this app is both of them. Stand a line of tiles on end and push the first, and you get a toppling wave — a cascade in which several tiles are leaning on one another at once and the energy that knocks over the last one came from the first by way of everything in between. Deal the same tiles out and you get a game, the standard double-six block or draw game, which is what most of the world means by dominoes.
Everything here runs in your browser. This app calls no model, makes no network request after the page has loaded, and keeps nothing but your running score in your own browser.
Toppling
Pick a layout, set the gap and the two friction coefficients, and knock the first tile over. The wave speed shown in the corner is measured exactly the way a stopwatch would measure it: from where each tile stood and when it was struck. Nothing internal to the physics is read to produce it.
- Gap is the clear space between tiles, in units of the tile's own height. It is the one number that changes the answer most, and there is a window outside which the wave cannot travel at all — both edges of it are findable with the slider.
- Tile-on-tile friction decides whether the faces slip past each other while one tile pushes the next. Turn it down and the wave speeds up.
- Tile-on-table friction decides whether a struck tile skids forward instead of toppling. Turn it down and the struck tiles skid further before they go over — though, as the limits below record, the cascade survives even the most slippery table the slider allows.
- Growing tiles is the amplification demonstration: each tile is half as big again as the one before it, so a tile you can barely see topples one you could not lift.
The game
A double-six set is 28 tiles carrying every pair of numbers from blank to six. You and the computer draw seven each; the rest is the stock. Play alternately onto either end of the line, matching the number showing. In the block game a player who cannot go draws until they can, and when neither side can move the game is blocked. In the draw game you may draw as often as you like and may not pass while the stock still holds tiles. The winner scores the pips left in the loser's hand — plus the pips left in the stock, in the draw game. Doubles are laid crosswise, as they are on a table.
Controls
Drag to turn the camera, scroll or pinch to zoom. K knocks the first tile over, R stands them up again, P pauses, S changes the speed, and G switches between the toppling table and the game.
Credit, and what is original here
Dominoes is a traditional game with no author and no owner — it is in the public domain, and the European double-six set has been played since the eighteenth century. The physics of the toppling wave, though, does have authors, and this app is checked against them:
- J. M. J. van Leeuwen, The Domino Effect, arXiv:physics/0401018 (2004), published as Am. J. Phys. 78, 721–727 (2010). The soliton picture of a toppling line, and the table of wave speeds this app is measured against.
- J. M. J. van Leeuwen, Domino Magnification, arXiv:1301.0615 (2013). How much bigger each tile in a growing chain can be.
- L. A. Whitehead, Domino “chain reaction”, Am. J. Phys. 51, 182 (1983). The demonstration everyone quotes.
- D. E. Shaw, Mechanics of a chain of dominoes, Am. J. Phys. 46, 640–642 (1978); C. J. Efthimiou and M. D. Johnson, Domino Waves, SIAM Review 49, 111–120 (2007); Ding et al., How Fast are Domino Waves?, arXiv:2204.07997 (2022); Dalla Pola et al., Listen! A smartphone inquiry on the domino effect, arXiv:2303.17231 (2023).
The engine, the layouts, the renderer, the tile art, the computer's playing style and
every line of code here are this app's own. CREDITS.txt gives the full list with
URLs and marks which numbers came from a document and which this app chose.
Limits, and every number this page quotes
Everything below is measured from the engine that runs on this page, not typed in by
hand. tools-harness-page.js re-measures each tagged figure against the engine
and fails the build if the page and the physics have drifted apart. Where a number comes
from a document it is marked; where it is this app's own choice, that is marked too.
What the sources fix
- A European double-six set is 28 tiles carrying every pair of numbers from blank to 6, with 7 doubles and 168 pips between them — an average of 6 a tile.
- A domino is “normally twice as long as it is wide”, so the height is 2 times the width, and van Leeuwen gives a standard tile's thickness-to-height ratio as 0.14583. That is seven forty-eighths, so the tile here is 48 by 24 by 7 mm and its ratio is 0.145833. The two ratios are sourced; the millimetres are this app's rounding, and no manufacturer is claimed.
- Each player draws 7 tiles. In the draw game 2 tiles must stay in the stock, which is what the published rule prescribes.
- Every number in the set touches 8 tile-ends. That is an even number for all seven values, which is exactly the condition for the whole set to be layable end to end in one line — and it is why a double-three set cannot be.
- The wave-speed table this engine is measured against was computed for tiles with a ratio of 0.179, the only ratio experiments had been reported for, so the comparison runs are built to that shape rather than to this one.
What this app chose, because nothing published fixes it
- Tile-on-tile friction 0.2 by default. That figure is van Leeuwen's own estimate for wooden tiles, arrived at by tilting a table until they slid over one another; it is used here as a default, not as a measurement.
- Tile-on-table friction 0.35. Nothing published fixes it. It is a slider, and what it does is listed below.
- Restitution 0: the collision is perfectly inelastic, which is what every source assumes. A material with real stiffness would behave differently and this app does not model one.
- Tile density 1400 kg/m³, giving a tile of 11.29 g. The mass cancels out of a falling tile entirely; it matters only when the tiles grow.
- The physics runs at a fixed 12000 Hz with 12 contact-solver sweeps a step. Both were measured, and the measurements are below.
- The gap slider runs from 0.25 to 0.98 of the tile's height and starts at 0.4, which puts the tiles 26.2 mm apart centre to centre.
What the physics produces
- A tile goes over when its centre of mass passes its own edge, at 8.297° — the angle whose tangent is the thickness over the height. Getting there takes a push of at least 2.52 radians a second, and costs 28.1 microjoules against the 2658 microjoules the upright tile is holding — a barrier of 1.06 % of the prize.
- Leaning that far moves the top of the tile only 6.93 mm.
- At the default gap the head of the train strikes the next tile at 23.6° and the fallen tiles come to rest stacked at 74.5°, releasing 59.2 % of a tile's height in potential energy each time. A tile with nothing to lean on takes 295 ms to go from a degree past its tipping point to flat on the table.
- The wave runs at 0.94 m/s at the default settings, which is 1.37 times √(gh), and it strikes a tile every 27.8 ms. It reaches that speed after 7 tiles and then holds it: fit distance against time over the rest of the run and the straight line has an R² of 0.99999997.
- Take the friction off the tile faces and the same line runs at 1.27 m/s, so rubbing costs the wave 26 % of its speed.
- The whole line gives up 60 % of the energy it was standing with, and never gains any: over the entire slider range the worst any run ever rose above its own starting energy is 0.0 of it.
- At its busiest the solver is holding 36 live contacts at one instant — that is what makes this a cascade and not a sequence of two-body collisions. 15 % of them are carried by the second of the two contact primitives, so shipping only the first would be shipping half a contact model.
The spacing window, which has two edges and they are different things
- Too close. Below a gap of 0.0063 of the tile's height — 0.3 mm on a real domino — a fallen tile sits no lower than an upright one and there is simply nothing to release. That edge is arithmetic and needs no simulation.
- Too far. Past a gap of 0.89 of the tile's height the striker lands so low on the next tile that it shoves it forward instead of over, and the wave dies. That edge MOVES with the table: make it slippery and the wave gives up at a gap of 0.74 instead. Forbid sliding altogether, which is what every published model does, and the wave runs to 1.00, the purely geometric ceiling where a tile can no longer reach the next one at all.
- The engine itself stops being trustworthy below a gap of 0.21: tighter than that, a sliding tile can end up somewhere the two contact primitives cannot describe. The slider stops at 0.25 for that reason and no other.
How much bigger the next tile can be
- The figure everyone quotes is 1.5, from Whitehead's one-page demonstration in 1983. It is a demonstration, not a limit. Working van Leeuwen's algebra through gives a largest workable ratio of 1.81 for solid tiles, at a gap of 0.5 — 21 % more than the number in circulation. Hollow tiles, whose mass follows their surface rather than their volume, reach 2.17.
- A chain of nine tiles growing by a third and a bit, from 12 mm to 132 mm — a mass ratio of 1343 — releases 1817463 times the energy of the smallest nudge that will topple the first tile at all. That is what a growing chain is for.
How it is checked
- The engine harness runs 751 assertions across 18 sections with 0 failures.
- The first oracle is a single tile in closed form. A rigid tile turning about its bottom edge conserves energy exactly, so its angular rate is algebra and its fall time is a quadrature; the engine's integrated tile matches it to 0.12 %. It sees the geometry, the inertia and the integrator, and it is blind to every contact in the app.
- The second oracle reads no state at all. From nothing but where each tile stood and when it was struck — the two numbers a camera and a microphone would give you — it recovers the wave speed to 0.014 % of what the engine's own timings say, and it recovers it on a curve as happily as on a line. Quarter the gravity and the same method returns a speed 2 times slower, which is what √(gh) demands.
- The third oracle is a table this app did not produce: 36 asymptotic wave speeds published by van Leeuwen in 2004, at nine spacings and four friction coefficients. Run with the pivot pinned — his own assumption, that a tile may topple but never slide — this engine reproduces every one of them, the worst by 1.27 % and the average by 0.19 %, with 31 of the thirty-six inside half a per cent.
- The fourth oracle is his 2013 magnification algebra, implemented here from his published equations. It is a two-body energy argument with no time in it, so it is blind to the integrator entirely, and the engine's own growing chains stop within two per cent of where it says they must.
- Against somebody else's measurement: a 2023 paper recorded the collision clicks of a real line of dominoes with a phone and got 118 cm/s at one spacing and 91 cm/s at another. This engine, handed their tile and their spacings, brackets both: 114 and 105 cm/s with nothing rubbing between the faces, 88 and 81 cm/s with the 0.2 van Leeuwen estimated for wood. Their plastic tiles clearly slip more easily than his wooden ones did, which is a thing to notice rather than a thing to tune away.
- The controls are wrong on purpose and must each report violations. Making the collision perfectly elastic breaks the published table in 5 of the cells tried; putting a tile's mass at its centre instead of spreading it through the tile breaks 5; and spacing the tiles further apart than a tile is tall leaves 15 of sixteen standing, because the first one cannot reach the second.
- The game is checked too: 1200 seeded games played to a finish with no tile ever lost or duplicated, and 300 of them replayed BACKWARDS in a different representation to see whether they land on a legal deal. A separate move generator, written from the raw pip values, counts 606 distinct complete lines for a double-two set and 114216 for a double-three, and the game's own generator agrees.
What is wrong with it, or unproven
- Two of my own controls turned out to be false, and the numbers are here rather than dropped. I expected a slippery table to kill the cascade: it does not — at a table friction of 0.06 every tile still falls, though the worst of them skids 163 mm doing it. And I expected solving one contact a step instead of twelve to visibly change the collective answer: it changes it by 0.039 %, because a domino contact lives for thousands of steps and the sweeps accumulate across them. The sweep count on this page is therefore chosen for the transient, not for the steady state, and the spread across the whole range from one sweep to forty is 0.078 %.
- The second degree of freedom costs accuracy where it earns its keep. Letting the pivot slide — which every published model forbids — moves the wave speed away from the published table by up to 7.7 % at the widest spacings. That is not a bug being confessed: it is the same skidding that produces the upper edge of the window above, and the same effect van Leeuwen describes in words and cannot compute.
- The shipped step costs 0.056 % against the published table. Refining it twelve-fold does not improve on that, so the step is not what the remaining error is made of.
- A tile here has two degrees of freedom, not six. It cannot twist, cannot tip sideways, cannot be knocked off its own line and cannot leave the table. A real domino hit hard enough does all four.
- Contacts use two primitives chosen by a separating-axis rule. That covers a tile's edge on another's face and the reverse; it does not cover a tile that has slid bodily into the pile, which is why the gap slider has the floor it has.
- The pile never quite stops. A fallen tile propped against two others creeps, because the only friction this model gives it acts at one point — its pivot — rather than over the whole face it is lying on. Between three seconds after the push and eighteen, the worst-behaved of the seven layouts moves a further 1.2°. The wave itself is over in about a second.
- Turning the sleeping optimisation off changes not one strike time by so much as a microsecond — the worst difference across a whole line is 0.0000 ms — which is the evidence that skipping tiles the engine believes are at rest is free rather than merely fast.
- The branch splits because two tiles are struck 3 ms apart, not because anything in the code knows what a branch is.
- One published record this app cannot reproduce. The Domino Toppling article lists a fastest topple of 30 metres in 4.21 seconds — 7.1 m/s. At the speed this engine gives, a tile would have to be 2.7 m tall to manage it. Whatever that record measured, it was not a line of ordinary dominoes.
- And one mis-citation. van Leeuwen's 2013 bibliography gives Whitehead's paper as volume 2 of the American Journal of Physics. The volume is 51, page 182 — confirmed through the publisher's metadata, since the paper itself is behind a paywall and was not read here. Everything this app says about it is what van Leeuwen reports about it, and nothing more.
- The computer does not search, and here is what that is worth. It plays a weighted rule — shed weight, get rid of doubles early, leave yourself an end you can still play to — and over 1000 games against an opponent choosing uniformly at random from its legal tiles it wins 68 % of them, where chance plus two standard errors would be 3 points above fifty. It is better than random and it is not strong. Part of the reason the gap is not larger is that 36 % of all moves in those games had exactly one legal answer, so neither player was choosing anything at all.
- Doubles are laid crosswise but do not act as spinners; the line of play has two ends, which is the basic game the source describes. There is no sound, no second table, and the computer opponent does not search.
Dominoes · an independent, self-contained browser app. credits and sources · licence · llms.txt