Intro to GAs Genetic Algorithms are search algorithms that mimic natural selection in biological critters. In GAs, the code being manipulated is viewed as the chromosomes, or genes, and the way that a piece of code behaves when it is run is analogous to the resulting creature. GAs work by cycling between two phases known as "fitness testing" and "reproducing". In fitness testing, a large "population" of programs are run, and scored on some criterion of how well they perform. Then, the programs that score the highest are allowed to reproduce. Reproduction is usually done by crossing the codes of pairs of the parent programs. For example, if two programs are selected to reproduce, and they look like this: A-G-E-Y-S-V-P-T-S and n-e-g-j-w-a-h-r-x then if a "crossover" is done at the 3rd gene, they will produce the following pair of child programs: A-G-E-j-w-a-h-r-x and n-e-g-Y-S-V-P-T-S The other common reproduction operation is mutation. In mutation, some piece of one of the child warriors is altered slightly. Thus if mutation was also applied on the first child in the previous example, the resulting children may look like: A-G-F-j-w-a-h-r-x and n-e-g-Y-S-V-P-T-S The object in GAs is to start off with "ramdom" code and to let the GA evolve code to perform a desired task. Since programs are rewarded for how well they perform on the desired task, each "generation" tends to do better overall on the desired task.