2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
This commit is contained in:
Esiur Project 2023-03-14 20:26:11 +03:00
parent 9e620a98ca
commit 3bbd43029e

View File

@ -124,6 +124,7 @@ namespace Esiur.Analysis.Optimization
var newGeneration = ordered.Select(x => x.Key).Take(eliteCount).ToList(); var newGeneration = ordered.Select(x => x.Key).Take(eliteCount).ToList();
// The rest 90% will be generated from mating the top 50% of the current poplulation
for (var i = 0; i < neededCount; i++) for (var i = 0; i < neededCount; i++)
{ {
var p1 = Population[rand.Next(0, PopulationSize / 2)]; var p1 = Population[rand.Next(0, PopulationSize / 2)];