Created
October 12, 2017 18:28
-
-
Save fedden/28a1af6a88e812343a0e42f76afd7df8 to your computer and use it in GitHub Desktop.
hybrid
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 == 'hybrid': | |
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 = (best_neighbour[x] + self.swarms_best[x]) / 2.0 - p[x] | |
p[x] = p[x] + leader_rate * update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment