remove create_func....

This commit is contained in:
wls2002
2023-08-02 15:02:08 +08:00
parent 1499e062fe
commit c7fb1ddabe
22 changed files with 425 additions and 21 deletions

View File

@@ -2,4 +2,5 @@ from .algorithm import Algorithm
from .state import State
from .genome import Genome
from .gene import Gene
from .substrate import Substrate
from .substrate import Substrate
from .problem import Problem

View File

@@ -6,6 +6,9 @@ class Gene:
node_attrs = []
conn_attrs = []
def __init__(self, config: GeneConfig):
raise NotImplementedError
def setup(self, state=State()):
raise NotImplementedError

15
core/problem.py Normal file
View File

@@ -0,0 +1,15 @@
from typing import Callable
from config import ProblemConfig
from state import State
class Problem:
def __init__(self, config: ProblemConfig):
raise NotImplementedError
def setup(self, state=State()):
raise NotImplementedError
def evaluate(self, state: State, act_func: Callable, params):
raise NotImplementedError

View File

@@ -6,3 +6,5 @@ class Substrate:
@staticmethod
def setup(state, config: SubstrateConfig):
return state