Using Genetic Algorithms to Simulate Evolution
Learn how genetic algorithms can be used for simulating evolution.
Tracking the progress using metrics
Up to this chapter, we’ve spent all our time learning about the details and intricacies that drive genetic algorithms. We learned how to represent solutions, how to evaluate solutions, and how to alter populations using selection, crossover, mutation, and reinsertion.
The goal of all of the problems we’ve solved has been to optimize an objective. In all of the algorithms we’ve written, we define the problem, configure the algorithm, and run the algorithm until we obtain a solution. While, for the most part, the process of obtaining the solution is the most important thing, sometimes we need a way to track the progress of an evolution over time.
Imagine if we wanted to analyze how our population’s collective fitness grew over time. Or perhaps we want to visualize how the distribution of fitness changed between generations. Or even still, perhaps we want to trace the genealogy of the best solution when the algorithm returns.
Metrics are important because they offer insights that can help us make decisions about how to reconfigure or adjust the algorithm. It’s difficult to make decisions and identify bottlenecks in the algorithm without detailed metrics to analyze.
In this chapter, we’ll learn how to integrate utilities that ...