How does Crossover occur in a Genetic Learning Algorithm- do genes ever mix/change locations?

2 views (last 30 days)
If I have an individual that is made up of several different kinds of inputs, do the "genes" only crossover to the same "kind" ie same location (as in #1 in the image, or do they ever change spots/locations like #2 in the image.
To explain in an example. Say I am having the ga() optimize NACA airfoil shape for a specific condition. Each individual contains 3 numbers that describe the characteristics of 1 individual, camber, camber location, and thickness.When crossover occurs it only makes sense for thickness values to crossover with thickness values (like in #1) and not mix (like in #2). Am I correct in assuming that they do not mix when they crossover like in #1?

Answers (1)

Prateekshya
Prateekshya on 7 Sep 2023
Hi Jacob,
As per my understanding, you want to know about the scope of "crossover" operation.
When you are using the ‘Genetic Algorithm Solver’ of MATLAB, you have a definite set of crossover operations that are supported. Please go through the following link for more details: https://in.mathworks.com/help/gads/genetic-algorithm-options.html#f7820
If you are implementing Genetic Algorithm from scratch, then you have a huge spectrum. It is a research topic. There are indeed crossover operations available which can behave like the "#2" way you mentioned or even produce new values altogether.
To conclude, if you want the crossover operation to behave like the "#1" way you mentioned, you can choose the relevant crossover operation accordingly. In your case, since the genes contain only 3 values, a "single-point crossover" operation ("crossoversinglepoint" in case of Genetic Algorithm Solver) is suggested.
I hope this helps!

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!