Using Behaviours to Model Problems

Recall that one technique to solving problems is to transform them into a form you already understand. While every problem seems different, and on the surface may require different techniques to solve, they almost always have patterns and similarities between them. This is especially true with the problems you’ll solve with genetic algorithms.

The framework you built in Chapter 2, Breaking Down Genetic Algorithms, separates a few problem-specific parameters from the common aspects of a genetic algorithm. These parameters are a fitness function, a genotype, and termination criteria. This means that every problem you attempt to solve using a genetic algorithm must implement all three of these functions—the ...

Get Genetic Algorithms in Elixir 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.