Conditions | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
29 | def _move_climb(self, pos, epsilon_mod=1): |
||
30 | sigma = self.space_dim * self.epsilon * epsilon_mod |
||
31 | pos_normal = self.distribution(pos, sigma, pos.shape) |
||
32 | pos_new_int = np.rint(pos_normal) |
||
33 | |||
34 | n_zeros = [0] * len(self.space_dim) |
||
35 | pos = np.clip(pos_new_int, n_zeros, self.space_dim) |
||
36 | |||
37 | self.pos_new = pos.astype(int) |
||
38 | return self.pos_new |
||
39 | |||
43 |