

Show HN: A mathematical solution to any Game of Life variation - fibo
https://github.com/fibo/games-of-life

======
rspeer
I highly suggest exploring around LifeWiki [1]. There is so much more to the
Game of Life, and its variants, than this article even dreams of.

There some very powerful simulators out there, but Life is not just a
mechanical exercise in simulation. There are also some lovely theoretical
results that are of course independent of simulation.

[1]
[http://www.conwaylife.com/wiki/Main_Page](http://www.conwaylife.com/wiki/Main_Page)

~~~
fibo
Thank you for the hint!

------
j2kun
What does it mean to "solve" a GoL variant?

~~~
fibo
I mean that this functional approach implements any variant of GoL. Here
functional is not intended as "functional programming" but as the closest way
I found in programming to express topological concepts.

By identifying the GoL to a set of functions, find an implementation of a
variant of GoL is like solving an equation where you are looking for the right
functions.

~~~
j2kun
I'd suggest you don't use the term "mathematical solution" when describing it,
because it's a misleading use of relatively established jargon.

~~~
fibo
Which term would you use to describe it? I don't get the suggestion. I solved
the problem using Topology that is one of My favourite topics in mathematics.

------
clintonc
It appears that he wrote a parametrized game of life simulator. Not
particularly mathematical. Not particularly general, either; the three numbers
are extracted as parameters (so still a square grid in two dimensions, where
persistence is based on counting immediate neighbors).

~~~
fibo
Thank you For Your feedback, it is the most critic feedback I Got so it took
me more time to answer. I am trying to improve my presentation skill and the
issue here is that I was not able to expose correctly the concept so you was
misled to think it is just "a parametrized GoL".

That is why I am preparing a demo that is a little bit different from the
classical example: an Hexagonal Game of life.

This is a first minimum available working implementation:
[http://g14n.info/games-of-life/example/hexagonal/](http://g14n.info/games-of-
life/example/hexagonal/)

Enjoy!

------
bvaldivielso
I like the OP's view on "shaping the space of Game of Life universe" by just
defining the getNeighboursOf function. I think that would be a core idea if
one wanted to see Game Of Life as some abstract mathematical object.

However, it seems like the title might be a bit too much for what the text
really is.

~~~
goldenkey
The space is entirely decided by interaction. Not how it looks when you decide
to turn it into a grid and put it on a screen.

For example, if your neighbor function returned edge+vertice neighbors, if you
wanted to accurately show the space as homogenous sized cells, on a 2d screen,
you would no longer be able to show a grid of squares, a different tesselation
or complex surface would be necessary.

Literally the only thing that defines space, which is primitively defined by
the derivative of neighborment, is what interacts with what. Food for thought
if you do like to ponder about this universe :-)

~~~
fibo
The mathematical theory the study space is Topology. A definition of a
topology of a space is given by, starting from an underlying set, the
definition of the open intervals (there are also other ways, this is the most
used one) which gives the notion of continuous functions. Another approach to
define a topology is by defining a distance which gives a metric space and the
definition of open intervals. Any variant of the GoL I have seen is discrete,
every cell has distance one from its adjacent cell. It is the adjacence notion
that defines the nearness, hence the space. That is the math that I applyed,
to deduce that when you define a function _getNeighboursOf_ , you are actually
defining the shape of the space, and also its set (the counter image of the
function).

