change fitness from list to array

optimize the code of reproduction.
This commit is contained in:
wls2002
2023-05-11 08:14:58 +08:00
parent b271a56827
commit 299ff1f8f1
4 changed files with 37 additions and 34 deletions

View File

@@ -25,7 +25,7 @@ from problems import Sin, Xor, DIY
@partial(using_cprofile, root_abs_path='/mnt/e/neat-jax/', replace_pattern="/mnt/e/neat-jax/")
def main():
config = Configer.load_config()
config.neat.population.pop_size = 50
# config.neat.population.pop_size = 50
problem = Xor()
# problem = Sin()
# problem = DIY(func=lambda x: (np.sin(x) + np.exp(x) - x ** 2) / (np.cos(x) + np.sqrt(x)) - np.log(x + 1))