Genetic Algorithms
GAs are search heuristics inspired on the process of natural
evolution. In its simplest form, GAs use a population of individuals to
model a distribution; each individual's dna code represents a single
state in the state space, and a fitness function influences the
individuals who will survive and reproduce at each generation. GAs have
two way of exploring states, either by Mutation (changing the
individual's dna) or by Cross-Over (mixing two individual's dna)
More information on Wikipedia.
In the implementation presented here, the individual's dna is a 64 bit
representation of two-dimensional coordiantes. Mutation is a
displacement in space, and Cross-Over selects a random index on the
64bit dna and swaps the two parent's chromosomes to generate two new
individuals.
Parameters:
- Population Size: number of individuals to sustain or regenerate at each generation
- Mutation Rate: amount of mutation allowed for each individual
- Cross Rate: probability of crossing two individuals to
generate two new crossed individuals (otherwise both parents are cloned
to the next generation)
- Survival Rate: amount of individuals who survive at each
generation (and are then mutated and crossed); new individuals are
created randomly