mutation_rate=.05 and current_pop is an array. How can I make this if statement randomly change values within the array? This is mutation in a genetic algorithm. Thanks for the help!
for i in range(len(current_pop)):
r= np.random.rand()
if r < mutation_rate:
return new_array
`
Aucun commentaire:
Enregistrer un commentaire