Natural selection favors individuals whose traits improve survival or reproduction, allowing them to contribute more often to subsequent generations. In genetic algorithms, this becomes a population transition mechanism: candidate solutions with better fitness are more likely to influence the next generation. section 18.1.1 section 18.1.5
A genetic-algorithm generation applies the process incrementally:
- Evaluate every individual using a fitness measure; high fitness means a larger value for maximization and a smaller value for minimization. section 18.1.5
- Select parents for mating from the current population, combine them with crossover, and mutate the resulting individuals. section 18.1.1
Knapsack and predator-prey examples
For a Mars knapsack problem, solutions containing food with a high calorie-per-weight ratio receive an advantage, while low-fitness solutions are less likely to persist. In a predator-prey simulation, prey that hide behind objects are more effective at escaping predators and therefore better positioned to influence later generations. section 18.1.5 section 18.1.5


