Intermediate

Population-based algorithms

Population-Based Algorithms

Estimated duration
20 minutes
Related questions
3
Related algorithms
4
Status
Log in to track

Lesson objectives

  • Comparing single-solution methods with population-based methods.
  • Understanding the general framework shared by population-based algorithms.
  • Estimating the cost of a population by the number of evaluations.

Explanation

Instead of a single solution moving through the space, population-based algorithms keep a set of solutions that exchange information, so they cover several regions at once.

The general framework: initialize a population, then a loop that evaluates the solutions, updates them with operators that use information from the solution itself and from others, then selects what survives, until a stopping criterion.

The differences between algorithms lie in how new solutions are built (mutation, crossover, movement towards a leader), who influences whom (a global or neighbourhood topology), and how the survivors are selected (greedy, generational, elitist).

The real cost is the number of objective function evaluations: about N×T. Some algorithms run two evaluations per individual per iteration (TLBO and sometimes HHO), so comparisons must use the number of evaluations (FEs), not the number of iterations.

A population of candidate solutions evolving together
Population-based algorithms keep several solutions at every iteration.

Mathematics

The evaluation budget

FEs \approx N\cdot T\cdot k

k is the number of evaluations per individual per iteration.

Python code

def evolve(init, update, evaluate, N, T):
    P = init(N); F = [evaluate(x) for x in P]
    for t in range(T):
        P, F = update(P, F, t)
    return min(zip(F, P))

Simplified teaching code that works with NumPy only; for research experiments use a documented library and fix the random seed.

Practical exercise

In the simulator's comparison mode, notice that the number of evaluations is counted and shown for each algorithm.

Common mistakes

  • Comparing algorithms with equal numbers of iterations when they differ in evaluations per iteration.

Summary

Population-based algorithms exchange information between several solutions; always compare them by the number of evaluations.

References

Related papers in the repository

Short quiz

3 questions are chosen at random from 3 questions linked to this lesson, and the quiz is graded on the server.

Links within the lab

Algorithms
Related lessons
In the paths