written 8.0 years ago by | • modified 8.0 years ago |
Genetic algorithms provide a natural model for parallelism because each neuron or segment of a solution is an independent unit.
- Genetic algorithms begin with a population of candidate problem solutions.
- Candidate solutions are evaluated according to their ability to solve problem instances: only the fittest survive and combine with each other to produce the next generation of possible solutions
- In the genetic algorithm model, for example, a population of patterns represents the candidate solutions to a problem.
- As the algorithm cycles, this population of patterns "evolves" through operations which mimic reproduction, mutation, and natural selection.
- Genetic algorithms are also applied to more complex representations, including production rules, to evolve rule sets adapted to interacting with an environment.
For example, genetic programming combines and mutates fragments of computer code in an attempt.
- Like neural networks, genetic algorithms are based on a biological metaphor: they view learning as a competition among a population of evolving candidate problem solutions.
- A "fitness" function evaluates each solution to decide whether it will contribute to the next generation of solutions.
- Then, through operations analogous to gene transfer in sexual reproduction, the algorithm creates a new population of candidate solutions.
In the genetic algorithm, process is as follows:
Step 1. Determine the number of chromosomes, generation, and mutation rate and crossover rate value
Step 2. Generate chromosome-chromosome number of the population, and the initialization value of the genes chromosome-chromosome with a random value
Step 3. Process steps 4-7 until the number of generations is met
Step 4. Evaluation of fitness value of chromosomes by calculating objective function
Step 5. Chromosomes selection
Step 5. Crossover
Step 6. Mutation
Step 7. New Chromosomes (Offspring)
Step 8. Solution (Best Chromosomes)
Let P(t) define a population of candidate solutions, xi, at time t:
P(t) ~ {xi. xl, ..., x:J
We now present a general form of the genetic algorithm:
procedure genetic algorithm;
begin
set time t:~ 0;
initialize the population P(t);
while the termination condition is not met do
begin
evaluate fitness at each member at the population P(t);
select members from population P(t) based on fitness;
produce the offspring at these pairs using genetic operators;
replace, based on fitness, candidates of P(t), with these offspring;
set time t := t +1
end
end.
The flowchart of algorithm can be seen in figure below
Fig. Genetic algorithm flowchart
This algorithm articulates the basic framework of genetic learning; specific implementations of the algorithm instantiate that framework in different ways.
- What percentage of the population is retained?
- What percentage mate and produce offspring?
- How often and to whom are the genetic operators applied?