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

3 次查看(过去 30 天)
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?

回答(1 个)

Prateekshya
Prateekshya 2023-9-7
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!

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by