Pyevolve icon indicating copy to clipboard operation
Pyevolve copied to clipboard

Using random.sample() in TournamentSelectorAlternative

Open computron opened this issue 12 years ago • 0 comments

You might consider providing an option for using random.sample() to choose candidates for tournament selection. In my experience it's much faster, plus it won't pick duplicate candidates.

The code would look like: tournament_pool = random.sample(population, pool_size)

computron avatar Nov 09 '12 00:11 computron