My last two blogs were about the Conway’s Game of Life [1][2]. Actually this game belongs to a broader set of models, that are called Cellular Automata. All of them follow the same idea of applying simple rules according to the current state of the cell and its neighbours.  A simple modification as changing any of the 4 rules of the game of live or taking into account second order (Figure 1) neighbours will produce very distinct patterns in the game.

Figure 1.
Figure 1. Second order neighbours of a cell in the Game of Life. There are 24 neighbours instead of 8.

 

However, the Game of Life is a quite sophisticated cellular automaton compared with the simplest version of them. The Game of Life is actually a 2-dimensional and, yes, there are 3-dimensional version of it. But I am looking for more simplicity and there are 1-dimensional automata (Figure 2). Again, we have “live” and “death” individuals and a few rules to decide the next state.

Figure 2. An 1-dimensional cellular automaton. The blacks cell represent alive individuals. The whites represents dead individuals.

The way we are going to define rules in this scenario is slightly different. We are just going to use two neighbours and the current state of the cell itself to stablish the state in the next iteration. We can represent this with 3 values indicating the actual state of the neighbours and the current cell: left neighbour – current cell – right neighbour. We are going to use symbol 0 for death and symbol 1 for alive. For example, 111 means that both neighbours and the current cell are alive. When 111 happens, we have to decide whether the next state would be 0 or 1 (Figure 3.).

Figure 3. Example of a rule (Rule 30). The 1 represent “alive”, the 0 “dead”. For instance, “101” means that the current cell is dead but the left and the right cells are alive and, then, the state in the next iteration would also be dead.

There exactly 8 possible combinations of 0s and 1s with three values. If we define 111,110,101,100,011,010,001,000 as a universal order for this kind of cellular automaton, then we just have to define 8 values that indicate the next state of the center cell. For example, in the Figure 3. the values would be 00011110. Yes, that is a binary number that could be represented in decimal system as 30. So the rule of Figure 3. is Rule 00011110 or Rule 30. Just remember we accept the universal order of 111,110,101,100,011,010,001,000.

Take a few seconds to re read the previous two paragraph. It may seem very complicated but it isn’t. You just have to remember that the state of each cell in the next iteration is going to be the result of the two nearest neighbours and the cell itself. Just to be sure, Figure 4. gives and example. First row is the current iteration and second row the next iteration. Use the Figure 3. to check everything is fine. You can practice calculating the next “next generation”. When you are on the leftest cell you can use as the left neighbour the rightest cell (like a ring).

Figure 4. Calculating the next generation for Figure 3. with the Rule 30.

Ok, so what? Let’s say you continue doing this with a bigger 1-dimensional array (instead of just 10 cells per iteration, use 1000 or more). At the end you are going to have something like the Figure 5. You may see a pattern but actually there is no way of complete generalization, welcome to chaos! It is true, there are parts that have order and even cycles (I like to think the live on Earth as one of that ordered universal instants) but in general is unpredictable. Actually Wolfram proposed a computer random generator (more properly say  pseudorandom number generator) with it.

Figure 5. Rule 30 applied to many iteration in a big array.

Going back to Figure 3., all we need is 8 1s and 0s  to define a rule. There are exactly 256 different rules (actually just 128 because the other 128 are a negative mirror of the first 128, black would be white and white black). Not all of them produces this kind of crazy patterns (another good example is Rule 90 in Figure 6.).

Figure 6. Example of Rule 90 with initial setting.

Some of them produce no patterns at all. Think about Rule 0 (Rule 00000000), everything is going to die in one iteration. Others produces some kind of cycles or more order structures like Rule 184 (Figure 7.) used to model traffic flow in a single line of a road.

Figure 7. Example of rule 184.

Well, you may say. This very artificial, simplistic and unrealistic. Take a look the Figure 8 and compare it to Rule 30 in Figure 5.

Figure 8.  A shell similar in appearance to Rule 30

You may said it is a coincidence and it just looks like. Maybe, but the probabilities of Rule 30 appear in nature is very high so the coincidence is the rule appearing and not the whole pattern out of the blue. Just think how the growth of a shell is done.  The conclusions are the same of my previous post:

  1. Initial setting is very important
  2. Complexity can emerge from simplicity
  3. Chaos is not randomness
Thanks Wikipedia to for the pictures.

[2] Yet another “yet another blog about the “Conway’s Game of Life” 

 

15 days I wrote the blog “yet another blog about the “Conway’s Game of Life” . My purpose was convincing you that very simple individual rules could produce group patterns. This patterns emerge from the individuals interacting with their environment and nothing else.

I promised I was letting the best for today. So here it is. You probable were wondering how complex this group patterns could get with the right positioning. Actually what I showed in the previous blog were just the most basic and well known examples.  There are much more complex things. Take a look at the next youtube video, but start it at minute 1:10, since you don’t need explanations about the game of life anymore.

[youtube vgICfQawE]

 

That is very cool but there is more. Some very simple patterns can produce very unstable sequences (chaotic) structures. You can go here and click on run. It takes 5206 to converge (Here is a list of other long-lived patterns that you may want to try). Of course you can also randomize the canvas and wait. It could easily happen that you stare at your screen for a few days, weeks. What to say? The universe is still here in a constant accumulation of simple interaction of small particles.  Even in a simple game like this would be almost (just giving a benefit of doubt) impossible to predict the final stage, and we are starting just five individuals.

You may say, simply run the game and then you have your prediction. First, is that really a prediction? Second, there is a practical problem if you want to apply that to, say, the universe. You need another one to simulate it (and a faster one so you can use the prediction). There is another solution. Simplify the individuals. Instead of simulating a whole human being, just grab the main characteristic of his behaviour and you may learn something of the factors you picked it up. This is the theoretical background of my thesis and I will be talking about this in many different ways.

But let’s go back to the “Conway’s Game of Life” to stress two important things:

  1. Actually the “Conway’s Game of Life” is a more complicated version of something even more simple that produce complex patterns. It is just another example of a Cellular Automata. Don’t worry, my next blog is going to be about it. For now, I am just going to add that the “Conway’s Game of Life” is a 2 dimensional games. The simplest cellular automata has just 1 dimension, and still produces chaos
  2. The “Conway’s Game of Life” has the same computational power as a universal Turing machine.  I don’t know if I will be talking about the Turing machine at some but, for now, just consider that this game is “as powerful as any computer with unlimited memory and no time constraints: it is Turing complete”[1].

Three important conclusions so far:

  1. The initial conditions (patterns) determine dramatically the ending result.
  2. Chaos could come me from very simple conditions. That is to say, you don’t need complicated models to get interesting environments. You are going to find head aching problems even in the restrictive and conditioned environment of math.
  3. The predictability inside chaos is still possible. You just need another universe :D. Here, I am very satisfied and assert that chaos is different randomness. You cannot predict the latest. The question, still open in the science, is “does randomness exist at all?”

Next entry: Cellular Automata

[1] http://en.wikipedia.org/wiki/Conway’s_Game_of_Life

Around 1970,  John Horton Conway created a fascinating game called “Life” [1].  The reason for the name is going to be quite obvious as I quote the rules of the game. Before that just imagine a large white checkboard (the world where ‘Life’ happens) and a plentiful supply of counters (the creatures that plays ‘Life’). Counters could be simple ‘poker chips’. See Figure 1. to be clear.

Figura 1. The set of the game “Life”. A checkboard with counters (the black dot) represents live individuals, the rests are dead ones.

So, how to play? In fact you (or the computer) just have to follow three rules. “Conways genetic laws are delightfully simple. First note that each cell of the checkerboard (assumed to be an infinite plane) has eight neighboring cells, four adjacent orthogonally, four adjacent diagonally. The rules are:

  1. Survivals. Every counter with two or three neighboring counters survives for the next generation.
  2. Deaths. Each counter with four or more neighbors dies (is removed) from overpopulation. Every counter with one neighbor or none dies from isolation.
  3. Births. Each empty cell adjacent to exactly three neighbors–no more, no fewer–is a birth cell. A counter is placed on it at the next move.” [1]
So the game is fairly simple and seems boring. But take a look at Table 1. Those are 10 different examples of possible words. As you can see, several group behaviours are produced with the same three Conway’s rules. The only thing that has change in each world is the initial configuration of the game. Thing of each column as small society. The first column would be examples of societies that never change (‘classic’). The second column would be cyclic societies (I would say mesoamerica is a good example or the oscillation between republicans and democrats). The third column, well, that is for sure a nomadic group.

Table 1. The table presents three kinds of examples. First column is about still lives, the world is not going to change and it doesn’t matter how many times you apply the rules. The second column is about oscillators, this worlds produces cycles of  2 or 3 periods following the same rule. The third one is about spaceships, the individuals “move”  through the grid indefinitely. (Source: Wikipedia [2])

Still lifes
BlockGame of life block with border.svg
BeehiveGame of life beehive.svg
LoafGame of life loaf.svg
BoatGame of life boat.svg
Oscillators
Blinker (period 2)Game of life blinker.gif
Toad (period 2)Game of life toad.gif
Beacon (period 2)Game of life beacon.gif
Pulsar (period 3)Game of life pulsar.gif
Spaceships
GliderGame of life animated glider.gif
Lightweight spaceship (LWSS)Game of life animated LWSS.gif
Remember, this doesn’t have a top down construction. This is build from each individual rules. It doesn’t matter that it seems a very coordinated and dictatorial group behaviour. Each cell has its own behaviour and there is no centred government. Don’t trust me? try it in a piece of paper, it is going to be just as little less boring than a Sudoku.
There is more, but this blog is already large and I feel like keeping the best part for the next post. But before going, enjoy the little example in the Figure 2. What could it be? Two little societies in a battle?
asdf
Figure 2. Glidders. This is a slightly more complex example. Also from [2].

[1] Gardner, Martin (1970-10). Mathematical Games – The fantastic combinations of John Conway’ new solitaire game “life”223. pp. 120–123. ISBN 0-89454-001-7. Archived fromthe original on 2009-06-03. Retrieved 2011-06-26.

[2] http://en.wikipedia.org/wiki/Conway’s_Game_of_Life

One of the most important ideas in object recognition, particularly faces recognition, became with the work of Viola and Jones [1]. This work is based in the algorithm of Adaboost [2]. The idea is use very simple features of the faces that can be calculated very fast. Then select the best ones testing against a previously set of faces. In general, a feature is any value we can extract from a digital image. For example, a simple value of a pixel could be a feature. It is also possible to use more sophisticated stuff like histograms of colors or edges. In the case of Viola and Jones they use a very simple way of play with pixels. Just as an example, a feature could be the substraction of the area (sum of pixels)  of one region of the image to another region of the image.

So, as part of the course Interactive Exhibit Design we decided to use this. Then I processed a lot of old baroque paintings and extract the faces. Even though the results are not perfect, I obtained decent results. I have a whole folder of faces and these are two sections of it. the first is a good section of the folder and the second a not-so-good section. I hope to do something interesting with all of this.

[1] Rapid object detection using a boosted cascade of simple features

[2] A decision-theoretic generalization of on-line learning and an application to boosting

Recognized Faces

 

Bad Recognized Faces