GPgl (Genetic Programming with OpenGL)
by Claus-Dieter Volko (Adok/Hugi)

This program is supposed to demonstrate how images could be generated by functions with a tree-like syntax. These functions evolve by means of genetic programming, a metaheurstic technique originally invented by John Koza. The user can control the evolution using the keys 1, 2, 3. Key 1 modifies the list of functions. Key 2 modifies the currently selected function. The more often key 2 is pressed, the more the function is altered. Key 3 selects two random functions and modifies them. The program internally uses 10 variables, among them 2 for the pixel coordinates, 3 for the colors (red, green, blue) and 5 free variables. For each variable the current value is computed by a function. The function can contain standard arithmetic operations (plus, minus, multiply, divide), boolean operations (and, or, xor), sinus, cosinus, and can work with constants and other variables. The images generated have a resolution of 256x256 pixels. Source code is provided.