complete HyperNEAT!

This commit is contained in:
wls2002
2023-07-21 15:03:12 +08:00
parent 80ee5ea2ea
commit 48f90c7eef
32 changed files with 432 additions and 136 deletions

View File

@@ -1,8 +1,10 @@
import jax
import numpy as np
from algorithm import Configer, NEAT
from algorithm.neat import NormalGene, RecurrentGene, Pipeline
from pipeline import Pipeline
from config import Configer
from algorithm import NEAT
from algorithm.neat import RecurrentGene
xor_inputs = np.array([[0, 0], [0, 1], [1, 0], [1, 1]], dtype=np.float32)
xor_outputs = np.array([[0], [1], [1], [0]], dtype=np.float32)
@@ -21,7 +23,6 @@ def evaluate(forward_func):
def main():
config = Configer.load_config("xor.ini")
# algorithm = NEAT(config, NormalGene)
algorithm = NEAT(config, RecurrentGene)
pipeline = Pipeline(config, algorithm)
best = pipeline.auto_run(evaluate)