Created
October 12, 2017 18:48
-
-
Save fedden/716efa1a546f69756eab4b0c828371d0 to your computer and use it in GitHub Desktop.
n_fittest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elif self.mode == 'n_fittest': | |
if r[i][x] < self.disturbance_threshold: | |
p[x] = np.random.normal(dev, mean) | |
else: | |
leader_rate = np.random.uniform(0.0, 1.0) | |
update = np.average(self.population[n_fittest]) - best_neighbour[x] | |
p[x] = best_neighbour[x] + leader_rate * update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment