Summary
This paper details the implementation and evaluation of a Simple Genetic Algorithm (SGA) using a binary encoding scheme to solve complex optimization problems.Objective and Methodology1
The main goal was to develop a modular solution in Python (v3.10+) to implement and test the SGA. The system uses standard operators: proportional selection (roulette wheel), one-point crossover, and bit-flip mutation, enhanced by a Hall of Fame structure to preserve the best historical individual (elitism). The implementation utilized the DEAP framework for evolutionary algorithms and Streamlit to create a dynamic GUI for real-time parameter setting and visualization.Test Problems1
The algorithm was validated using two functions with distinct topological features:1 Six-Hump Camel Back (2D): A function with multiple local minima and two symmetric global minima, tested in the range [-5, 5].1 Schwefel Function (30D): A highly complex, multi-modal function evaluated in 30 dimensions, posing a significant challenge due to its irregular surface and numerous local minima distant from the global optimum.1 Key Findings and Conclusion Six-Hump Camel Back: The algorithm achieved 100% efficacy, identifying the global minimum (f(x*) = -1.0316) early in the process (generation 23 of 200).1 Schwefel (30D): The experiments showed that finding a balance between exploration and exploitation is critical for high-dimensional, multimodal problems.1 Impact of Parameters: The mutation probability (Pm) was the factor with the greatest impact on performance, with the highest rate (Pm = 0.01) consistently producing the best results. This indicated that higher mutation was essential to maintain genetic diversity and prevent premature convergence.1 Optimal Setting: The best overall solution (fitness of -8904.14600) was achieved using a combination of moderate crossover (Pc = 0.60) and high mutation (Pm = 0.01).1 The overall optimal parametrization identified for robustness and quality was {N=500, G=200, Pc=0.8, Pm=0.005, L=16, Elitism=Active}
I'm open to new opportunities. Let's discuss how I can bring this level of engineering to your team.
Let's Talk