top of page

Cellular automata

This project starts as a personal challenge. Was I actually able to code something from scrap, without any access to the internet?

The original idea was a sort of game of life, but with a biology-oriented mind. So I naturally go to the bacterial lifestyle. This is still a work in progress, so I do not make the code available for now. However, I may distribute some pieces of code in the future.

Version 1

The first version was very rough but was still working. Basically, a given number of cells with the same genetic starts at a random position and with a random color. Each cell possesses a set of genes determining the efficiency of each action, like the lifetime, movement and reproduction probability, attack and defense. In addition, cells can mutate, with a positive or negative impact, that is represented by a slight color change.

I prepared one gif animation of one-run.

In this example, it is possible to select different parameters of the cell population to display on the graph.

In this version, cells are python object composed of a python dictionary, updated at every frame. I also code for the GUI, as well as a primitive save function.

Version 1.6

I continue updating this starting programme, changing the dictionary to a pandas table, adding more genetic, like antibiotic production/resistance, protein, malus after cell division, adjustable world size, possibility to change the starting pool of gene and lot more. Another change was also on the display, with this time the color of each cell determined by their set of genes. Similarly, colored cells have the same set of genes at a similar value, allowing to visualize a cellular population this time.

The save and load function are working very good, and permits to stop a simulation any time to make it run at another time. I also code a visualization that allows the visualization of the 'family' tree, with information on the selected cell display as well as the child.

Other kinds of tree are available, made using igraph module for python.

I am currently focusing my effort and some free time to develop a method to analyze the emergence of a specific value, or set of value, as well as the evolution of this set of value during the lifetime of this simulation

bottom of page