use black format all files;

remove "return state" for functions which will be executed in vmap;
recover randkey as args in mutation methods
This commit is contained in:
wls2002
2024-05-26 15:46:04 +08:00
parent 79d53ea7af
commit cf69b916af
38 changed files with 932 additions and 582 deletions

View File

@@ -6,9 +6,9 @@ from utils import State
class BaseProblem:
jitable = None
def setup(self, randkey, state: State = State()):
def setup(self, state: State = State()):
"""initialize the state of the problem"""
pass
return state
def evaluate(self, randkey, state: State, act_func: Callable, params):
"""evaluate one individual"""