A cellular automation based on the idea of heating space
I have always been a big fan of cellular automation and artificial life and all that interesting stuff, but never felt that my programming knowledge and ability is enough to make one on my own.
Nevertheless, one day I decided to learn wxWidgets and wxDev-C++, a libre RAD tool. For three weeks I was lost to society and the world around me, as all my thoughts went into making up and coding a cellular automation which I hereby present to you.
It is called Cycles and the main idea behind it is a model of cycling life - that is, once life fills the whole universe, it gets "old", dies almost fully and then starts all over again. I must say that this cellular automation is not as simple and basic as, say, Game of Life, and, most importantly it is indeterminate.
Download:
Cycles
A small walkthrough
The universe is a torus, which means that it is continuous yet finite, which is a very satisfying concept for me, since I was not happy neither with a "room" nor with "infinite space". In a 2D representation it is simply a rectangle where if you go beyond right border you actually come out from the left, if you go down, you come out from up and vice versa for both cases. The torus has also a great property that it is homogeneous, while a surface like a sphere would have special points - the poles. Within cellular automations a torus is a traditional surface to use.
1. Observe how space cools down.
When you start up the program, you will see void cells, most of which are coloured in various levels of blue. The more blue the cell, the more charge it has. However, if you go to Cycle->Start and observe, you will see how everything pretty rapidly discharges with several cells getting the most charge and them also loosing energy eventually so that you will be left with absolutely dark cells.
This is how void space works if left to its own devices. Each void cell that is fully surrounded by other void cells will get a portion of the charge from each one of them in an attempt to fully charge and become an egg which in initial randomly charged space is actually impossible. It is possible, however, when living cells are introduced. Let's see what happens then.
Note: for the sake of the walkthrough it would be best if you choose the slow speed in the menu, otherwise the processes would run too fast to be tracked.
2. Charge a void cell with living cells.
If a void cell is adjacent to a living cell, it will not receive energy from other void cells, but get charged from a living cell and eventually become an egg that will then hatch out other living cells. But for that to happen it either has got to have enough cells around it to compensate for the loss of the charge to other void cells.
Perhaps that explanation is a bit confusing for now. Let's try an example.
By left clicking on the grid, you can produce X cells. Form this construction out of five cells:
X-X-X
X-#-X
Here # is void space. After you've done that, make sure the process has been started (counters below should show numbers, otherwise press "space" on your keyboard). Now as you wait for the result, you will soon notice that the void cell within the construction begins to charge strongly. Soon it will become an egg.
You can create cells in real time and for this explanation it is safe to leave the configuration you just made evolving and create a different configuration in another spot. The suggested configuration will actually evolve much faster:
X-X-X
X-#-X
X-#-X
A configuration like that will evolve very slowly:
X-X
Anyway, now that you've experimented with some starting configurations, let's move on!
3. Intermix genders.
So now you can create life by charging void cells. But there is an even faster way to create life, by putting X and O cells together from the start. You know how to place X cells on the grid. If you want to create O cells, all you have to do is right click on the grid.
By creating configurations that contain both X and O cells, you will almost immediately get evolving life. For instance:
X-O-X
4. Gender wars and what cells mean what.
Basically, how the model behaves is that X and O constantly fight each other. Biological hatching is, from some perspective, a pretty aggressive procedure so that once the egg is created what type of cells it hatches out depends on what cells are adjacent to it. But this battle is what makes life evolve - a philosophical principle which seems to be working quite well here. The indicator below shows the number of X and O cells, but since the model is balanced, eventually they'll get evened out and be of about the same amount.
So anyway, the grey cells with a "+" are biological eggs and small "x" and "o" are offspring which eventually become adult cells. The red cells are also offspring, they just mark that there was an egg in this cell. When hatching out, the egg delivers one larva in its own place (the red one) and throws 0-2 larva around itself (white ones).
The blue "~" cells are space eggs, as you've probably already understood, and it throws bluish larva around itself. Space eggs hatch out both genders, not depending on what living cells they are adjacent to and, in fact, don't care if there are any adjacent living cells at all. So space eggs are cool.
5. The decay.
You have probably noticed that as you are observing evolving cells, it says below - Cycle: 1. What does that mean?
Well, what happens when the whole universe is filled with living cells and there are no void cells at all, the "cosmos" will go into a cellular decay phase, as it becomes "tired", drained of ability to hold living cells. You will observe that void cells start to appear here and there and space eggs won't hatch. Eventually, the process will escalate and at one point life will stop and empty space will fill most of the universe, leaving islands of offspring and bio eggs. Usually most adult cells do not survive the procedure.
The decay phase eventually ends, cycle number goes up by 1 and you will see life begin to evolve from what is left. In most cases you will see that what is left are once again basic one-gender configurations like the ones we've tried above, various "L" and other tetris-like shapes. Stranded bio eggs will eventually die if adult cells do not connect with them soon and so new cycle will evolve from few basic shapes. Which is pretty fascinating... at least to me!
It is possible that the configurations left after the decay phase will be non evolving ones in which case it means that the next cycle will not develop without placing additional cells. Basically, it would mean that the process has stopped and life of this universe has ended.
It is fun to see how many cycles life will evolve. However, the process is indeterminate, so you cannot influence the amount of cycles any definite universe will live. Your influence can only be direct - that is, adding cells. But even without adding anything the universe can live many cycles on its own. I have seen it go through as many as 20 cycles without me having to add any more cells. Usually, though, the lifespan is 4-5 cycles.
6. Slow configurations - glowing stars.
It is interesting to see if within these rules it is possible to create stable or at least slowly evolving configurations. I have found a "glowing star" configuration, which will eventually produce chaotic life, but it will usually take VERY long for it to start even at the highest speed setting.
#-#-X-#-#
#-#-#-#-#
X-#-#-#-X
#-#-#-#-#
#-#-X-#-#
7. Continuing work.
The work on the engine just started and I plan to develop it further. What I have now is fun but at the same time it is too chaotic and not particularly interesting, at least not for too long. What I really like about it is the space charging idea - it works really well and this energy exchange mechanism is something I am very curious to explore. So check this project from time to time, as soon as I have newer versions or ideas, I will share it out here.
8. Additional controls.