Modeling The Universe In ProbLife

last updated 2022-04-18 15:41:28 by Simon Vandevelde

A while ago we had the idea for an "Art with AI" type project: a probabilistic extension of Game of Life (GoL), the well-known cellular automaton. The idea behind GoL is to start with a grid of living and dead cells, and to generate the "next" generation based on a set of rules. For example, in the image below we generate the evolution of the left grid to end up with the middle grid, and then do the same to the middle to end up with the right one.

The rules used for these generations are as follows:
  1. A living cell remains living if it has exactly two or three living neighbours.
  2. A cell is born if it has exactly 3 living neighbours.
In ProbLife, we add chance to the mix: instead of the rules being universally applicable, they have a probability associated to them. For example, if the first rule has a probability of 90% and the second rule has a probability of 80%, we would get the following result:

Here, the number in a cell denotes its energy, aka its probability of being alive in that generation. This energy is also signified by a cell's color: red is a high probability, green a medium one, and blue is a low probability of being alive.

In GoL, the goal is to set an initial configuration, "see it evolve", and maybe discover some interesting patterns along the way. In ProbLife, we do the exact same thing! Using the motto "art is what you make of it", we created art.

"Unamused Tree"

starts off as a sour face, but ends in a nice tree.

"Reverse Butterfly"

depicts a butterfly devolving into a caterpillar. This configuration is also referred to by some as "Cold Water", for reasons I will explain when you're older.

"Fata Morgana"

begins as cartoonish heat lines, but eventually ends as a lush, green oasis.

While this is all fun and games, you start to wonder: can we do more? Of course we can do more! In fact, while the previous examples were all relatively small, nothing's stopping us from trying larger configurations. We could even use images as starting configurations, and add every subsequent generation as a frame in a gif! For example, here's my face in ProbLife (but only very briefly):

We can also literally make "art with AI":

And here is an enlarged version of GoL's glider in ProbLife:

You may have noticed now that in ProbLife, all configurations eventually end in black nothing-ness. This is because the total energy in the system can only go down, and never up: indeed, after every generation energy is lost, which can never be regained.

In this sense, ProbLife is an abstraction of the Universe. There too we have a starting configuration (the big bang) and rules for energy/matter to interact (the laws of physics). These rules are not perfect: each time, some energy is lost to heat, until eventually all energy will have converted, leading to the heat death of the universe. Pretty scary stuff. Luckily, until that happens, we can just enjoy ourselves by playing ProbLife!

ProbLife has been implemented in both ProbLog and Python. I'm planning on cleaning up the code a bit, and releasing it online. Until then, if you want a more in-depth and mathematical description of ProbLife, feel free to read the paper we wrote on it.