Evolutionary computation searches for good solutions by evolving a population of candidates. Inspired by biological evolution, it combines variation and selection: better candidates are more likely to contribute to later generations, while mutations introduce changes. Over repeated generations, the population can improve. section 4.1
Think of a population as several searchers exploring different parts of a landscape. This can help when a problem has local optima—solutions that look good nearby but are not the best overall. The trade-off is computational cost: evaluating many candidates over many generations can be expensive. section 4.2
A basic evolutionary search follows a repeating cycle:
- Generate a diverse population of candidate solutions. section 4.1
- Evaluate the candidates against the problem’s goal and select better-performing ones. section 4.1 section 4.2
- Create a new generation through reproduction and mutation, then repeat the process. section 1.20 section 4.1
Choosing items for a knapsack
A knapsack holds at most 9 kg. Each candidate is a choice of items, and the goal is to maximize their total value without exceeding the weight limit. Items 1, 4, and 6 weigh 8 kg and are worth $8; items 1, 3, and 7 weigh 9 kg and are worth $14. Items 2, 3, and 6 are worth $15 but weigh 15 kg, so they are invalid. An evolutionary search can explore many such combinations and favor valuable choices that meet the constraint. section 4.2
Table 4.1 Knapsack weight capacity: 9 kg
|
Item ID |
Item name |
Weight (kg) |
Value ($) |
| 1 |
Pearls |
3 |
4 |
| 2 |
Gold |
7 |
7 |
| 3 |
Crown |
4 |
5 |
| 4 |
Coin |
1 |
1 |
| 5 |
Axe |
5 |
4 |
| 6 |
Sword |
4 |
3 |
| 7 |
Ring |
2 |
5 |
| 8 |
Cup |
3 |
1 |
Use the item weights and values to check the knapsack candidates or try other combinations. section 4.2
A genetic algorithm is one kind of evolutionary algorithm. Its techniques include encoding candidates, selection, crossover, and mutation. Applications include selecting useful features for machine learning, evolving circuit configurations, and generating molecular structures for simulation. section 4.0 section 4.21 section 5.23


