Files
tensorneat-mend/core/problem.py
2023-10-22 21:01:06 +08:00

30 lines
695 B
Python

from typing import Callable
from config import ProblemConfig
from .state import State
class Problem:
jitable = None
def __init__(self, problem_config: ProblemConfig = ProblemConfig()):
self.config = problem_config
def evaluate(self, randkey, state: State, act_func: Callable, params):
raise NotImplementedError
@property
def input_shape(self):
raise NotImplementedError
@property
def output_shape(self):
raise NotImplementedError
def show(self, randkey, state: State, act_func: Callable, params, *args, **kwargs):
"""
show how a genome perform in this problem
"""
raise NotImplementedError