Genetic Algorithms
- Population-based, evolutionary search method inspired by natural evolution.
- Uses selection, crossover, and mutation to iteratively improve candidate solutions.
- Applied to tasks such as tuning model parameters (e.g., neural network weights) and routing vehicles to minimize travel distance.
Definition
Section titled “Definition”A genetic algorithm is a search heuristic used to find approximate solutions to optimization and search problems. It is a metaheuristic — a general-purpose computational method applicable to a wide range of problems — inspired by natural evolution. Genetic algorithms generate high-quality solutions by relying on bio-inspired operators such as mutation, crossover, and selection.
Explanation
Section titled “Explanation”Genetic algorithms operate on a population of potential solutions and repeatedly apply a set of rules, known as genetic operators, to evolve the population toward better solutions:
- Selection: Choose the fittest individuals from the current population to serve as parents for the next generation. A fitness function evaluates each individual and higher-scoring solutions are selected.
- Crossover: Combine genetic material from two parent solutions to produce offspring, typically by taking subsets of genes from each parent and joining them.
- Mutation: Introduce random changes to an individual’s genetic material by randomly modifying values of some genes.
The algorithm repeats selection, crossover, and mutation over many generations with the goal of gradually improving solution quality. Over time, this evolutionary process can discover high-quality solutions to the problem at hand.
Examples
Section titled “Examples”Machine learning: neural network parameter search
Section titled “Machine learning: neural network parameter search”A genetic algorithm can be used to search for the optimal values of the weights and biases of a neural network to achieve the best possible performance on a training dataset for recognizing handwritten digits.
Logistics and transportation: vehicle routing
Section titled “Logistics and transportation: vehicle routing”For routing a fleet of vehicles to deliver packages, a genetic algorithm can search for routes that minimize the total distance traveled and maximize the number of packages delivered.
Use cases
Section titled “Use cases”- Machine learning parameter optimization (e.g., neural network weights and biases)
- Logistics and transportation routing problems (e.g., fleet routing to minimize travel distance)
Related terms
Section titled “Related terms”- Metaheuristic
- Natural evolution
- Selection
- Crossover
- Mutation
- Fitness function
- Population
- Generations