3.2. Evolution Graph#

The evolution graph visualizes the progression of fitness scores across generations in a genetic optimization process. This plot helps you understand the algorithm’s convergence behavior, track improvements in fitness scores, and observe the distribution of individual scores within each generation.

3.2.2. Overview#

The evolution graph highlights key metrics throughout the optimization process:

  • Max and Min Fitness Lines: Black lines showing the overall max and min fitness values across generations.

  • Generation-Based Metrics: Green, red, and blue lines for max, min, and average fitness within each generation.

  • Individual Fitness Scores: Gray points representing fitness scores of each individual, illustrating the population’s diversity and convergence at each stage.

The mloptimizer library provides a function to generate this graph using Plotly, making it interactive and customizable.

3.2.3. Saved Graph and Data Files#

After the optimization completes, the evolution graph and related data are saved for future reference:

  • Graph Path: An HTML file of the evolution graph is saved in the graphics directory.

  • Data Path: CSV files with population data and logbook statistics are saved in the results directory.

For a detailed directory layout, refer to Optimizer Directory Structure.

Note: The evolution graph helps identify whether the genetic algorithm has converged or if additional generations might improve fitness further.