Genetic Programming: Difference between revisions
No edit summary |
|||
| Line 2: | Line 2: | ||
[http://geneticprogramming.com/publications/ geneticprogramming.com] - These books look good. |
[http://geneticprogramming.com/publications/ geneticprogramming.com] - These books look good. |
||
[https://gpemjournal.blogspot.com/ Genetic Programming and Evolvable Machines] - Some books and downloads. |
[https://gpemjournal.blogspot.com/ Genetic Programming and Evolvable Machines] - Some books and downloads. |
||
[https://github.com/darioizzo/d-CGP d-GCP] - differentiable Cartesian Genetic Programming |
|||
==Research== |
==Research== |
||
Revision as of 10:39, 7 January 2017
General Info
geneticprogramming.com - These books look good. Genetic Programming and Evolvable Machines - Some books and downloads. d-GCP - differentiable Cartesian Genetic Programming
Research
Possible targets
- LLVM - Can run as bytecode or compile to machine code.
- Web Assembly - New.
- JVM - I hate Java.
- MonoVM - Meh.
- SPIR-V - For the GPU. Can run naively (and fast), but would need to learn Vulkan/OpenCL at the same time. Problems with the GPU<->CPU differences.
- X86-64 - Native but CISC... Could use a subset...
- RISC-V - I love RISC-V (needs to be emulated).
- AVR - For a microcontroller (needs to be emulated).
- ARM - For a microcontroller (needs to be emulated).
- MIR - Rust intermediate level. Not sure if it would be any advantage over LLVM.
- BrainFuck - It's simplicity be good for genetic programming?
- GPTree - A Genetic Programming AST. Traditional.
- Maybe some made up IR that is then converted to X86-64, SPIPR-V or whatever (Isn't that LLVM bytecode?).
- Befunge - Seems awesome...
- Maybe evolve a language?
Ideas
Make the genetic program evolve genetic algorithms.
Break it up into functions. Evolve selection, crossover, mutation functions for example.
Maybe evolve control code separate from 'code code'. Maybe if/white condition test statements as separate too. Would help deal with things like infinite loops, etc... Could also help deal with evolving the program itself.
Maybe allow higher levels of the program to evolve. That wouldn't involve fairly different requirements. Changing of weights. Selection of evolutionary algorithms, etc... Probably not low level ASM. But it might be possible for it to evolve functions in ASM...
Give some kind of weights to the chance of something evolving.
How do I avoid infinite loops? Some hard limit?
Does uninitialised memory need to be avoided? Or could that be useful.
How do I avoid illegal jumps?
Is is possible to evolve the algorithm of the program evolving the algorithms. Ie pick the current best? Or would that evolve itself into a corner?
Can it evolve new functions/subroutines? Should they be shared in some kind of pool? Is that some kind of 'crossover'? Unused functions get pruned? Could the functions themselves be genetically evolved. Could the fitness functions for the made up functions be evolved?
Can I give 'hints' or 'bits of code' to the algorithms.
Is is possible to target low level raw ASM while also giving some higher level subroutines. For example 'loop over all items in a list'. Should these be given the same priority as a single raw ASM instruction?
What about about weighing instructions to increase/decrease their chance of success. Maybe evolving the weights.
Is their some way to 'scale up' the program. So evolve new algorithms on small simple programs that run quickly then move them onto bigger more complex ones that take minues/hours/days?
Should individual instructions be moved? What about individual variables? Select blocks of code? How big?
A fitness function for evaluating fitness functions.
Language
- Might need a specialised language to declare each of the bits of the program in a TDD style way, except the test would be a fitness function.
- Maybe just define the fitness in a regular language in a TDD unit test style framework but execute it against the bytecode/asm/whatever...
Fitness
- + Speed to evolve working solution.
- + Best solutions.
- + Efficiency.
- - CPU Time
- - Number of instructions (does this matter if we use CPU time?, What about no-ops, etc...)
- - Bad instructions
Random numbers.
Share the same random number for all programs in the same run to prevent randomness messing with the evolutionary randomness?
Need to be reproducible. Make a random number generator generator.
How do I do this in ASM?