The constructor of the search problem. x: the x coordinate of the current search state. y: the y coordinate of the current search state. step_size: size of the step to take when looking for neighbors. function_to_optimize: a function to optimize having the s
(self, x: int, y: int, step_size: int, function_to_optimize)
| 9 | """ |
| 10 | |
| 11 | def __init__(self, x: int, y: int, step_size: int, function_to_optimize): |
| 12 | """ |
| 13 | The constructor of the search problem. |
| 14 | |
| 15 | x: the x coordinate of the current search state. |
| 16 | y: the y coordinate of the current search state. |
| 17 | step_size: size of the step to take when looking for neighbors. |
| 18 | function_to_optimize: a function to optimize having the signature f(x, y). |
| 19 | """ |
| 20 | self.x = x |
| 21 | self.y = y |
| 22 | self.step_size = step_size |
| 23 | self.function = function_to_optimize |
| 24 | |
| 25 | def score(self) -> int: |
| 26 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected