Code bacteria: evolving mathematical behavior
Asked Answered
I

4

9

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.

Ipoh answered 11/12, 2009 at 18:0 Comment(3)
No, this is pretty obviously a GA. You're optimizing a parameter (the opcode representation of code to execute) against a scoring function (whether that code produces output you want or not).Nosedive
well, indeed, if you consider the code as the parameter... you are totally right :)Ipoh
Of course it is a specialization of Genetic Algorithms (GA), but this specialization is known as Genetic Programming (GP), as correctly stated below.Lenz
M
10

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

Mistletoe answered 11/12, 2009 at 18:6 Comment(0)
F
2

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.

Frere answered 11/12, 2009 at 18:2 Comment(1)
it seems more like a tool to infer relationships... kind of PCA with a reasoner attached to it.Ipoh
A
2

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

Artemis answered 17/12, 2009 at 11:6 Comment(1)
On doubts about GEP see Talk page of its article on Wikipedia: en.wikipedia.org/wiki/Talk:Gene_expression_programmingLenz
F
1

Are you familiar with Core Wars? I remember there were a number of code evolvers written for the game which had some success. For example, MicroGP++ is an assembly code generator that can be applied to the Core Wars assembly language (as well as to real problems!).

Fusionism answered 11/12, 2009 at 18:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.