Genetic Algorithms in Elixir: Ch4. Cargo: odd population size produces error in crossover (page 54)

When running the Cargo problem with

soln = Genetic.run(Cargo, population_size: 25)

we get an error due to an odd population size against the crossover’s chromosome pairing strategy. Making the population even (i.e. 26) resolves the issue.

1 Like