move crossover_gene from ga.crossover to gene.basegene.

This commit is contained in:
wls2002
2024-05-30 15:06:08 +08:00
parent 9f6154d128
commit 20320105e6
4 changed files with 34 additions and 10 deletions

View File

@@ -23,6 +23,9 @@ class BaseGene:
def mutate(self, state, randkey, gene):
raise NotImplementedError
def crossover(self, state, randkey, gene1, gene2):
raise NotImplementedError
def distance(self, state, gene1, gene2):
raise NotImplementedError