-
Notifications
You must be signed in to change notification settings - Fork 57
N-point crossover #14
Copy link
Copy link
Open
Labels
Description
This line was added in a commit a while ago:
inspyred/inspyred/ec/variators/crossovers.py
Line 123 in c16ffc3
| normal = not normal |
By changing the normal value back, the 'cut' only works at that one single point. In the version I have (1.0, before this commit), crossing over would look like the following:
ec.variators.n_point_crossover(random, [list('1234567890'), list('ABCDEFGHIJ')], {})
[['A', 'B', 'C', 'D', 'E', 'F', 'G', '8', '9', '0'],
['1', '2', '3', '4', '5', '6', '7', 'H', 'I', 'J']]
but now it will look like:
[['A', 'B', 'C', 'D', 'E', 'F', 'G', '8', 'I', 'J'],
['1', '2', '3', '4', '5', '6', '7', '8', 'I', '0']]
Reactions are currently unavailable