modify NEAT package; successfully run xor example

This commit is contained in:
root
2024-07-11 10:10:16 +08:00
parent 52d5f046d3
commit 4a631f9464
14 changed files with 420 additions and 502 deletions

View File

@@ -14,13 +14,11 @@ class BaseAlgorithm(StatefulBaseClass):
"""transform the genome into a neural network"""
raise NotImplementedError
def restore(self, state, transformed):
raise NotImplementedError
def forward(self, state, transformed, inputs):
raise NotImplementedError
def update_by_batch(self, state, batch_input, transformed):
def show_details(self, state: State, fitness):
"""Visualize the running details of the algorithm"""
raise NotImplementedError
@property
@@ -30,15 +28,3 @@ class BaseAlgorithm(StatefulBaseClass):
@property
def num_outputs(self):
raise NotImplementedError
@property
def pop_size(self):
raise NotImplementedError
def member_count(self, state: State):
# to analysis the species
raise NotImplementedError
def generation(self, state: State):
# to analysis the algorithm
raise NotImplementedError