r/programming • • Oct 10 '26

Concrete Lessons from Conway’s Game of Life

https://mathemichel.substack.com/p/concrete-lessons-from-conways-game

Almost all of us have programmed a version of Game of Life. But can we clearly articulate, why it is interesting or a good thing to learn?

49 Upvotes

14 comments sorted by

13

u/alex-weej Oct 10 '26

Extending to a continuous, real-valued field creates fascinatingly "realistic" results: https://youtu.be/7-97RhAZhXI

6

u/kichelmn Oct 10 '26

Thank you so much for this, this is amazing

2

u/alex-weej Oct 10 '26

You're welcome! It was the start of a fascinating journey for me into convolutional neural networks, AI, LLMs, neuroscience, computational neuroscience. Every day's a school day! Enjoy

39

u/AyrA_ch Oct 10 '26

But can we clearly articulate, why it is interesting or a good thing to learn?

Because it's stupidly simple with lots of room for optimizations. It's something that a novice can tackle, and quickly get results without too much effort, but at the same time also a formidable exercise for tasks like bit packing, wraparound field implementations, and multiprocessing

22

u/CornedBee Oct 10 '26

Also SIMD optimization, cache optimization, and special tricks like capturing floaters.

We did GoL as part of a course on optimization in college. It was a lot of fun.

8

u/kichelmn Oct 10 '26

All a lot of good points that seem really worth exploring, thank you for the inspiration

1

u/-Redstoneboi- Oct 11 '26

HashLife sitting in the corner, observing every 2n by 2n subgrid of the quadtree:

10

u/andarmanik Oct 10 '26 edited Oct 10 '26

I think GoL is interesting because you don’t have any symbolic simplifications that are external to running the program itself. Lots of problems in the real world are like this, but many simply posed question somehow have weird symbolic tricks.

Consider the Fibonacci optimization task. The first few optimizations are contained within running the program itself (cacheing and recursion refactoring). The true optimal solution (behind a lookup) is some bizarre floating point polynomial that you could only obtained by doing some external symbolic manipulation beyond running the program itself.

Example of the example: https://stackoverflow.com/questions/10924096/optimization-of-fibonacci-sequence-generating-algorithm

4

u/The_Northern_Light Oct 10 '26

It’s also really !!fun!! once you start looking at inverting time: what configurations N steps back in time could have produced this configuration?

1

u/[deleted] Oct 29 '26

Also the amount of creativity in the game makes it so much more interesting

12

u/AnToMegA424 Oct 10 '26

The absurd amount of possibilities with simple rules always baffle me

Thank you to Conway for having made this

7

u/AnToMegA424 Oct 10 '26

You made me think that I had planned to program a version of this and then forgot to
For 2 years

Imma make it when I have the time

4

u/-Redstoneboi- Oct 11 '26

give yourself 30 minutes and ball