All function with state will update the state and return it.
Remove randkey args in functions with state, since it can attach the randkey by states.
This commit is contained in:
@@ -9,13 +9,13 @@ class BaseGene:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def setup(self, key, state=State()):
|
||||
def setup(self, state=State()):
|
||||
return state
|
||||
|
||||
def new_attrs(self, state, key):
|
||||
def new_attrs(self, state):
|
||||
raise NotImplementedError
|
||||
|
||||
def mutate(self, state, key, gene):
|
||||
def mutate(self, state, gene):
|
||||
raise NotImplementedError
|
||||
|
||||
def distance(self, state, gene1, gene2):
|
||||
|
||||
Reference in New Issue
Block a user