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

@@ -1,3 +1,5 @@
from typing import Type
import jax
from jax import numpy as jnp
import numpy as np
@@ -10,9 +12,9 @@ from .species import SpeciesInfo, update_species, speciate
class NEAT(Algorithm):
def __init__(self, config: Config, gene: Gene):
def __init__(self, config: Config, gene_type: Type[Gene]):
self.config = config
self.gene = gene
self.gene = gene_type(config.gene)
self.forward_func = None
self.tell_func = None