Page 1 of 1

GoL cells with genetic traits

Posted: September 30th, 2013, 3:12 pm
by 7yl4r
Hey guys, I'm new here but I've been working for a while on a set of scripts to add genetic code to each cell in golly. At first all genetic information is random, but from then on the gene string is inherited from the parent cells. From the genetic string traits are computed for each cell. I'll explain the traits in context of their use:

* cell color - A cell color is computed from the genetic string and displayed in golly using a custom rule and icon set. Using the script "evolveColorfulCells.py", you can evolve cells which inherit color from their parent cells. This gives a much better sense of cell ancestry and makes the GoL just that much more beautiful.

* cell movement behavior - In the script "evolveMovingCells.py", each cell is given the chance to move around before the rules of the game dictate who lives, who reproduces, and who dies. Cells each "decide" where to move based on a neural network which is hard-coded into their DNA. This means that a cell with parents who all move left will likely move left as well. Though the random starting seed means that cells are very prone to making poor "choices" and killing themselves, some clever behavior has been observed even in my few tests. Clever cells will learn to arrange themselves according to the location of their neighbors so that they will survive or reproduce.

Right now the scripts can only be run on populations of less than a few thousand, but I believe that performance can be greatly improved. Is anyone interested in this kind of thing? I'd love to hear any thoughts, suggestions, or questions.

Videos, pictures, and description of scripts in action: https://plus.google.com/communities/117 ... 0254151272

Source code: https://github.com/7yl4r/LifeGenes

Re: GoL cells with genetic traits

Posted: October 1st, 2013, 8:45 pm
by Sphenocorona
Interesting. As the limitations of golly limit the simulated evolution's potential, it might be a good idea to migrate to a separate program based off of Golly; this would allow more possible combinations and types of 'genes'. In addition, I would suggest this possibility: something along the lines of 'if a cell moves into a position that another cell also moves onto, and has a higher value for (speed or strength or something) than the other cell, then that cell survives to the next generation no matter what, keeping the traits of the winning cell.'

Re: GoL cells with genetic traits

Posted: October 3rd, 2013, 6:25 pm
by 7yl4r
Sphenocorona wrote:Interesting. As the limitations of golly limit the simulated evolution's potential, it might be a good idea to migrate to a separate program based off of Golly; this would allow more possible combinations and types of 'genes'. In addition, I would suggest this possibility: something along the lines of 'if a cell moves into a position that another cell also moves onto, and has a higher value for (speed or strength or something) than the other cell, then that cell survives to the next generation no matter what, keeping the traits of the winning cell.'
I don't think that golly is limiting much and I like not having to re-code the UI and the basic ruleset and all that, but I have programmed the scripts such that another golly-like program could easily be plugged in so long as it supports the same API calls. I even have a very simple program that does this with minimal functionality for testing (I call it "fake-golly" or "folly" for short).

to what limitations are you referring? or... better: what is it that you would like to do that this can't do?

Your suggestion is exactly in line with future planned features. My thinking was that cells could have "speed" and "mass" which are inversely proportional. Massive cells can push others and speedy cells can move more. Your idea is I think more interesting though, since it is more like the winning cell consumes the loser.