| Conditions | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 40 | def move_climb(self, _cand_, pos, epsilon_mod=1): |
||
| 41 | sigma = 3 + _cand_._space_.dim * self.epsilon * epsilon_mod |
||
| 42 | pos_normal = self.climb_dist(pos, sigma, pos.shape) |
||
| 43 | pos_new_int = np.rint(pos_normal) |
||
| 44 | |||
| 45 | n_zeros = [0] * len(_cand_._space_.dim) |
||
| 46 | pos = np.clip(pos_new_int, n_zeros, _cand_._space_.dim) |
||
| 47 | |||
| 48 | return pos.astype(int) |
||
| 49 | |||
| 52 |