Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Game of Life
Bookmark
Input
Glider
Blinker
Block (Still Life)
Beacon
Custom
board
=
[[0,1,0],[0,0,1],[1,1,1],[0,0,0]]
GEN 0
IN-PLACE UPDATE
0
1
0
0
0
1
1
1
1
0
0
0
RULES
alive + 2 or 3 live -> survives
dead + exactly 3 live -> born
otherwise -> dies / stays dead
NEIGHBORS
BIT ENCODING
value = next<<1 | now
two bits per cell: next and now
algo
master
.
io
Step:
Start: Apply Game of Life rules in-place using bit manipulation
0 / 38
Input
Glider
Blinker
Block (Still Life)
Beacon
Custom
board
=
[[0,1,0],[0,0,1],[1,1,1],[0,0,0]]
0 / 38
GEN 0
IN-PLACE UPDATE
0
1
0
0
0
1
1
1
1
0
0
0
RULES
alive + 2 or 3 live -> survives
dead + exactly 3 live -> born
otherwise -> dies / stays dead
NEIGHBORS
BIT ENCODING
value = next<<1 | now
two bits per cell: next and now
algo
master
.
io
Step:
Start: Apply Game of Life rules in-place using bit manipulation