| Conditions | 3 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 46 | @HillClimbingOptimizer.track_new_pos |
||
| 47 | @HillClimbingOptimizer.random_iteration |
||
| 48 | def iterate(self): |
||
| 49 | notZero = self.nth_trial != 0 |
||
| 50 | modZero = self.nth_trial % self.n_iter_restart == 0 |
||
| 51 | |||
| 52 | if notZero and modZero: |
||
| 53 | return self.move_random() |
||
| 54 | else: |
||
| 55 | return self.move_climb( |
||
| 56 | self.pos_current, |
||
| 57 | epsilon=self.epsilon, |
||
| 58 | distribution=self.distribution, |
||
| 59 | ) |
||
| 60 |