What are Evolutionary Algorithms?
With this approach, candidate solutions to an optimization problem are randomly generated and act as individuals interacting with a larger population. A fitness function determines the quality of the solutions the candidates find as they move about in each iteration. The “best fit” individuals are then chosen for reproduction in the next iteration. This generational process is repeated until the algorithm has evolved to find the optimal solution to the problem.
How do Fitness Functions Work in Evolutionary Algorithms?
The heart of these algorithms is the fitness function, which is an objective function used to summarize, as a single figure of merit (attractiveness), how close the current agent (solution) is to achieving the algorithm’s programmed aims. There are many variations of the exact function that can include velocity/position like in swarm intelligence, or employ any other time or frequency variables.
Regardless of specific function, the evolution process works involves the same steps:
Randomly generate the initial population of individuals. (First generation)
Evaluate the fitness of each individual in that population with the preferred fitness function.
Repeat the following generational steps until an optimal solution is found:
Select the parents (best-fit individuals) for reproduction.
Breed new individuals through crossover and random mutation, giving “birth” to the next generation.
Use the fitness function to gauge the individual fitness of the new individuals.
Replace least-fit population with new individuals.