Our great sponsors
-
Go-L
Game of Life with different update rules and on a bunch of different topologies (sphere, torus, klein bottle, etc.)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Hi HN, when learning Golang (and topology), I ported a simple GOL in C (https://github.com/Jeadie/GoL) into Go. I then added a bunch of features
Look up the b/s format for specifying rules. It is a lot more flexible.
Here's my version : https://github.com/chewxy/ll/blob/main/main.go#L176
I also live coded this in a series of 3 videos:
1. https://youtu.be/5JArQO8YeRo
You might also be interested in https://github.com/bignimbus/game-of-life-n
During a recent programming detour, I discovered that finite elementary cellular automata with circular boundary conditions can be simulated using power iteration using matrix-vector multiplication with a circulant matrix and a strange kind of algebra, which I call a kernel algebra. [1] I wonder if this same idea could be generalized to higher dimensional automata on other topological surfaces.
[1]: https://github.com/breandan/galoisenne/blob/8f0f1e9e4e02062c...