Chapter 11 Evolving Intelligence
Genetic Programming
Genetic programming is a branch of genetic algorithms, the main difference between genetic programming and genetic algorithms is the representation of the solution. Genetic programming creates computer programs while Genetic algorithms create a string of numbers that represent the solution.
The first step is to generate an initial population of random compositions of the functions and terminals of the problem (computer programs). Then execute each program in the population and assign it a fitness value according to how well it solves the problem. To create a new population of computer programs:
– Copy the best existing programs
– Create new computer programs by mutation.
– Create new computer programs by crossover (breeding).
Most programming languages when compiled or interpreted are first turned into a pars tree. The terminal set consists of the variables and constants of the programs. The functions are several mathematical functions, such as addition, subtraction, division, multiplication and other more complex functions. Create a ROOT node with a random associated function and then create as many random child nodes as necessary (Children may have children).
Ranking functions create new population of computer programs; each function generates a score on how well is does and they are ranked from best to worst. The best programs are copied for the next population and new programs are created through mutation and crossover of the different best functions .
Something that is often overlooked is the importance of diversity: Choosing only the very best leads to populations extremely homogeneous, crossover will not affect the population because it leads to more of the same . Allowing completely new programs to be added to the mix will increase the chances of finding new and better combinations of functions, and regardless the worst programs will always be eliminated eventually
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment