Plant flowers on a grid and watch them grow by one simple rule, with ready-made patterns, wrap-around edges and colours that show a flower's age.
Generation 0
Flowers 0
Draw flowers with a mouse, finger or pen: start on an empty square to plant, start on a flower to pick flowers. With the keyboard, Tab to the garden, then arrow keys move the square cursor and Space or Enter plants or removes a flower. On the garden, P plays or pauses and S takes one step. The colour only shows how old a flower is; a flower is always a round shape and an empty square is plain.
This is the cellular automaton John Conway devised in 1970. Every square has eight neighbours. In each generation a flower with 2 or 3 flower neighbours stays, an empty square with exactly 3 flower neighbours grows a new flower, and everything else is empty. All squares change at the same moment, using the garden as it was.
With wrap-around edges the garden is a ring in both directions, so a glider that leaves on the right comes back on the left. With plain edges, squares outside the garden count as empty. If the garden ends up repeating, the page tells you how often.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
The garden is a grid of squares. A square either has a flower or is empty. Press Play and the garden changes again and again, one generation at a time, all squares at the same moment. Each square has eight neighbours (the squares around it, corners included) and the rule is:
That is the cellular automaton John Conway devised in 1970. There is no luck in it. The same garden always grows the same way.
Drawing. Press or drag on the garden with a mouse, a finger or a pen. If you start on an empty square you plant flowers; if you start on a flower you pick flowers. A fast drag never leaves gaps.
Buttons.
Colours. A flower is a round shape that starts sky blue and turns teal, then green, then amber as it ages: 1 to 2 generations, 3 to 6, 7 to 14, and 15 or more. The colour only shows age. A flower is always a round shape and an empty square is plain, so you never need the colours to tell them apart, and the key beside the garden lists the four stages in words.
Keyboard. Press Tab until the garden is selected. A square cursor appears. Arrow keys move it, Space or Enter plants or picks a flower, P plays or pauses and S takes one step. A status line says what happened. When the garden has settled into a pattern that repeats, or when every flower has faded, it tells you.
The garden is a list of ages, one number per square: 0 for empty, and 1 to 255 for the number of generations a flower has lived. To make the next generation the page reads the old list and writes a new one, so every square is worked out from the garden as it was and not from half-updated neighbours. As it writes, it records which squares became alive, died, or moved to a new colour stage. Only those squares are repainted, and the canvas is sized to its on-screen box times the device pixel ratio, capped at 2.
The rule is checked against a second implementation written differently, with neighbours found by coordinate arithmetic and ages tracked on their own. They agree on every square, every age and every changed-square list across more than 3,000 generations of random boards, in both edge modes, on sizes from 3 x 3 up to the Large garden.
Known patterns are checked by what they do:
| Pattern | What happens |
|---|---|
| Block | never changes |
| Blinker, Toad, Beacon | repeat every 2 generations |
| Pulsar | repeats every 3 generations |
| Ten bar | after 2 generations settles into a pattern that repeats every 15 |
| Glider | moves one square along the diagonal every 4 generations |
| Spaceship | moves two squares sideways every 4 generations |
| Burst | five flowers that keep changing for at least 100 generations in the Large garden |
The tests confirm each period exactly, and that no earlier generation matches. On a ring, a glider on an 8 x 8 garden returns to its starting square after 32 generations. On a garden with plain edges, a glider runs into the wall and ends as a block.
The speeds are 2, 4 and 6 generations a second, and there is nothing faster. A blinker repeats every 2 generations, so at the fastest speed it flashes 3 times a second at most, which keeps the garden under the usual limit for flashing. When you ask for reduced motion, the page starts at the slowest speed.
To spot a garden that has settled, the page keeps the last 12 generations and compares each new one with them. If one matches, the garden repeats with that period and the page says so. If it matches the one just before, nothing changes any more, and the page pauses.
Nothing is uploaded and nothing is stored. The size, speed and wrap setting are kept in the page address, so a link opens the same settings. The garden itself is not saved.
For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.