May 28, 2011 Leave a comment
Genetics has always been a big fascination for me, but especially the ways it can be simulated and used as a game mechanic. I first explored this concept in Chimera by using genes that contained images of creature parts. To create offspring, I had a fairly simple function that randomly selected which parent each gene would be inherited from. I also had no form of mutation, because each part was a set size and shape.
I recently decided to try a new experiment in genetic simulation that would allow me to prototype different concepts of genetics and crossbreeding. Over a few nights I put together a processing sketch using the Recursive Tree script as a starting point. Because plants are much more simple than creature, they can easily be drawn by a computer program, given a set of parameters, and produce a wide variety of forms.
I turned the values used to define the structure of the tree, such as branch angle and size, into numbers stored in each plant as gene objects. As I made the plant drawing process more complex, adding branch width and a possible random deviation every time it draws a branch, I simply added a gene to the plants’ genome to define its individual expression of this value. I then select two plants and put then through a process of one point crossover. This takes the values of one parent’s genes up to a specific, randomly selected point and then “crosses over” and takes the rest of the genes from the other parent.
I’m not sure where this project might lead, but right now I am using it as a platform for testing various methods for gene organization, mutation and crossover which can then be applied to plants or animals. I do think there is interesting potential for a small (mobile or online) game involving the cultivation and crossbreeding of plants which allows the user to create new and interesting looking plants in a virtual garden.