Post has attachment
It's been a while, but these ideas aren't dead yet! Here's a new implementation based on a novel genetic representation in a custom game engine!

coffeescript anyone?

Checkout the new repo branch

Post has attachment
here is a nice demo of the evolveColorfulCells script based on a 10-cell infinite growth starter. The slowdown when there are many cells is noticeable, but I've sped up the video a bit for your enjoyment.

Don't mind the (not quite) subliminal message; that was just my screensaver kicking in.

Post has attachment
The HighLife rule set allows for more easy encounters of infinite growth. This cell culture consists of ~4k cells grown in ~1k generations. The seed culture started on the far right of the image and then the cells grew leftwards (which was actually up before I rotated it). 

The cells from this line became clever in their movements and would arrange into patterns which allowed them to reproduce. I have some mesmerizing video of this if you are interested. 

Note the color variations in different locations which stem from random genetic mutations. In early generations all cells in this line were similar in color to the red which is spread throughout, but the population split into a yellow-orange species to the south and a blue-purple species to the north.

I wish I could have left it growing but at this point each generation update takes ~1min to compute and i need my computer for other things.

Post has attachment
Last night I added random genetic mutation each time a cell generates. You can see in the video how a monochromatic culture can shift hue based on a random mutation of one of it's members. 

Oh yeah, the new version is also almost 2x faster thanks to some more efficient cellList operations.

Post has attachment
Clever glider is clever... but not too clever. Hopefully adding in random mutation with each generation (instead of just the first) will change that.

Code optimization is going... Less optimally that I had hoped.

Optimization is not something I am very experienced with.

Anyone out there want to give it a shot? I've got unit tests and cross-platform support now... Anybody?

Post has attachment
It's alive! Cell motion is here. Cells are allowed to move 3 times before the game of life rules kick in and kill off/breed new cells. Right now cell movement looks pretty random, but don't be fooled! That is actually the behavior of a completely untrained neural network which has genetically-calculated connection weights between each cell's visible range (19 neighboring squares) and the possible movements (up,right,down,left). That's a 76 connection single-layer perception for those who are counting! There are 152 unique, 4-base pair codons, since each network connection has both an upper codon and a downer codon. I've got a nice diagram and I'd like to do a write-up on the wiki soon, but right now there doesn't seem to be anyone looking anyway.

The catch: it's slow. Much to slow to actually get any clever cell strains going. This video is made using short DNA strands which probably can't even code enough information for really clever movement; performance drops even more as the DNA strings increase in length. 

tl;dr: Look, movement! Onwards to optimization!
#neuralnetwork   #gameoflife   #geneticalgorithm  

Post has attachment
I've just pushed some more code to the repo. Big (not so pretty) changes this time. The newly added script allows for the color painting from to be used along with cell inheritance to create a dynamic scene.  There is no random mutation at this point, and the only cell trait is color, but check out the video; it is  pretty sweet.

Some things to note about the video:
* 'still lifes' (on right) remain constant - these cells are just chilling there
*  'oscillators' (on left) converge to the color of the center cell - the center cell is the only one which is staying alive, the surrounding cells are children of this cell & the last child cells
* cell lines of a certain color tend to move around as a group until they bump into other lines and interbreed

The github repo is up and I've coded a bit to get us started. 

I tried to put comments in to explain everything, but please help me add comments and documentation to help others...

In order to use it you should be able to follow the instructions in the 'getting started' section of the readme.

If you have it working and want to know more about the code: is a script you can run from within Golly that creates a 'cell' object for each live cell block in the current layer and then shows each cell's color based on its 'genes'.

The cell object is created using lifegenes/ and contains the geneotype and expression rules for the cell.

As a proof of concept, a random DNA string is created in _init_() and then a color value (between 0 and 255) is generated by increasing color value when an 'AB' sequence is found in the DNA string and decreasing color when 'BA' is found.

Getting the color to show up in golly was tougher than I expected since colors cannot be set for individual cells, but instead are set according to the cell 'state'. The rule for Conway's Game of Life only has two states, so I had to create a custom rule for golly - 'constant.table' which creates a unchanging, 256 state universe. After creating the cell objects for each cell, creates another 'layer' in golly using my 'constant' rule just to show the color.

Questions? Thoughts?
Wait while more posts are being loaded