18 Genetic algorithms: Biologically inspired, fast-converging optimization

This chapter covers

  • Introducing the genetic algorithm
  • Exploring whether genetic algorithms are better than simulated annealing
  • Solving the “Packing to Mars” problem with genetic algorithms
  • Solving TSP and assigning deliveries to trucks with genetic algorithms
  • Creating a genetic algorithm to solve minimum vertex cover
  • Discussing applications of genetic algorithms

While gradient descent and simulated annealing are great optimization techniques, they both have shortcomings: the former is fast but has a tendency to get stuck in local minima and needs the cost function to be differentiable, while the latter can be quite slow in converging.

In this chapter we are going to ...

Get Advanced Algorithms and Data Structures now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.