remove create_func....

This commit is contained in:
wls2002
2023-08-04 17:29:36 +08:00
parent c7fb1ddabe
commit 0e44b13291
29 changed files with 591 additions and 259 deletions

View File

@@ -1,15 +1,27 @@
from typing import Callable
from config import ProblemConfig
from state import State
from .state import State
class Problem:
def __init__(self, config: ProblemConfig):
def __init__(self, problem_config: ProblemConfig = ProblemConfig()):
self.config = problem_config
def evaluate(self, randkey, state: State, act_func: Callable, params):
raise NotImplementedError
def setup(self, state=State()):
@property
def input_shape(self):
raise NotImplementedError
def evaluate(self, state: State, act_func: Callable, params):
@property
def output_shape(self):
raise NotImplementedError
def show(self, randkey, state: State, act_func: Callable, params):
"""
show how a genome perform in this problem
"""
raise NotImplementedError