-
-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Description
Hey,
The UniformCrossover has MixProbability field for swapping genes. In the current implementation genes are swapped when the event is NOT occuried. Why not vice versa?
GeneticSharp/src/GeneticSharp.Domain/Crossovers/UniformCrossover.cs
Lines 62 to 71 in b6567e3
if (RandomizationProvider.Current.GetDouble() < MixProbability) | |
{ | |
firstChild.ReplaceGene(i, firstParent.GetGene(i)); | |
secondChild.ReplaceGene(i, secondParent.GetGene(i)); | |
} | |
else | |
{ | |
firstChild.ReplaceGene(i, secondParent.GetGene(i)); | |
secondChild.ReplaceGene(i, firstParent.GetGene(i)); | |
} |
Thanks!
Metadata
Metadata
Assignees
Labels
No labels