Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code bacteria: evolving mathematical behavior

It would not be my intention to put a link on my blog, but I don't have any other method to clarify what I really mean. The article is quite long, and it's in three parts (1,2,3), but if you are curious, it's worth the reading.

A long time ago (5 years, at least) I programmed a python program which generated "mathematical bacteria". These bacteria are python objects with a simple opcode-based genetic code. You can feed them with a number and they return a number, according to the execution of their code. I generate their genetic codes at random, and apply an environmental selection to those objects producing a result similar to a predefined expected value. Then I let them duplicate, introduce mutations, and evolve them. The result is quite interesting, as their genetic code basically learns how to solve simple equations, even for values different for the training dataset.

Now, this thing is just a toy. I had time to waste and I wanted to satisfy my curiosity. however, I assume that something, in terms of research, has been made... I am reinventing the wheel here, I hope. Are you aware of more serious attempts at creating in-silico bacteria like the one I programmed?

Please note that this is not really "genetic algorithms". Genetic algorithms is when you use evolution/selection to improve a vector of parameters against a given scoring function. This is kind of different. I optimize the code, not the parameters, against a given scoring function.

like image 511
Stefano Borini Avatar asked Dec 11 '09 18:12

Stefano Borini


3 Answers

If you are optimising the code, perhaps you are engaged in genetic programming?

like image 106
High Performance Mark Avatar answered Nov 09 '22 05:11

High Performance Mark


The free utility Eureqa is similar in the sense that in can create fitting symbolic functions (much more complicated than simple linear regression, etc.) based on multivariate input data. But, it uses GA to come up with the functions, so I'm not sure if that's exactly what you had in mind.

See also the "Download Your Own Robot Scientist" article on Wired for a breakdown of the general idea of how it works.

like image 2
Mark Rushakoff Avatar answered Nov 09 '22 05:11

Mark Rushakoff


Nice article, I would say you're talking about "gene expression programming" rather than "genetic programming", btw.

like image 2
Francesco Solera Avatar answered Nov 09 '22 05:11

Francesco Solera