Conway's game of Life, just because.

Paul Moore p.f.moore at gmail.com
Wed May 8 04:26:08 EDT 2019


On Wed, 8 May 2019 at 03:39, Richard Damon <Richard at damon-family.org> wrote:
> My experience is that the wrap around is common, as otherwise the hard
> edge causes a discontinuity in the rules at the edge, so any pattern
> that reaches the edge no longer has a valid result. The torus effect
> still perturbs the result, but that perturbation is effectively that the
> universe was tiled with an infinite grid of the starting pattern, so
> represents a possible universe.

In my experience, "simple" implementations that use a fixed array
often wrap around because the inaccuracies (compared to the correct
infinite-area result) are less disruptive for simple examples. But
more full-featured implementations that I've seen don't have a fixed
size. I assume they don't use a simple array as their data model, but
rather use something more complex, probably something that's O(number
of live cells) rather than something that's O(maximum co-ordinate
value ** 2).

Paul


More information about the Python-list mailing list