LudvigOlsen / evolutionaryComputing

Repository for project in Evolutionary Computing at VU
0 stars 0 forks source link

n-crossover recombination with rolling, to have less positional bias. #14

Open LudvigOlsen opened 6 years ago

LudvigOlsen commented 6 years ago

When having an array [0,1,...m] and doing n-crossover, 0 and m tends to either be together (with even numbers) or not together (with odd numbers) (with 2 parents). By rolling the array before splitting, this is less likely to happen.

E.g. Instead of [0,1,2,3,4,5,6,7,8,9] and n = 3, where we might get [[0,1,2],[3,4,5],[6,7],[8,9]] with parents [0,1,0,1] We could roll the first array by a random amount, e.g. 1 => [1,2,3,4,5,6,7,8,9,0], and now 9 and 0 can be together with even number of crossovers. E.g. [[1,2],[3,4,5],[6,7],[8,9,0]]