def crossover(agents): next_generation = [] # random.shuffle(agents) s = int((1 - SELECT_PERC) * POP_SIZE) for _ in range(s): p1 = random.choice(agents) p2 = random.choice(agents) next_generation.append(BST.crossover(p1, p2)) return next_generation