Genetic Programming and a LLVM JIT for restricted Python AST expressions
Genetic Programming is a machine learning technique used to optimize a population of computer programs according to their fitness for performing a task. So, the Genetic Programming engine applies biological evolution to find the best computer program for doing some task.
The way Genetic Programming algorithms work is
- they generate a population of random programs
- they evaluate how good they are are doing some job
- they do some mutations and crossover on the best programs
- and they repeat the process from the second step until we have a program we consider “the best”
However, the second step can be quite time consuming as it requires to run all programs in the population, and we can be talking about a very big population or a really CPU intensive problem. Things get worse we consider that these programs are usually written in some simplified form, usually some pseudo-code or byte-code, that is interpreted by the Genetic Programming engine.

So one of the alternatives could be to translate the population of pseudo-code programs to a population of native programs that could be directly run by the host machine. That is the purpose of Shine, a genetic programming library that does this transformation by using the LLVM Python bindings. Shine not only get a big performance boost when evaluating solutions fitness, but it also brings some flexibility by using a restricted Python for the representation of individuals on a Genetic Programming engine (so it could, potentially, call Python libraries).
3 Notes/ Hide
-
guerrillatech likes this
-
kickthebucketfatty reblogged this from inercia
-
inercia posted this