feat: Add support for max_nodes and max_conns in DefaultGenome initialization
This commit is contained in:
root
2024-07-10 11:30:20 +08:00
parent ee8ec84202
commit 1d606eb1c3
2 changed files with 3 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ from tensorneat.algorithm import NEAT
from tensorneat.algorithm.neat import DefaultGenome
key = jax.random.key(0)
genome = DefaultGenome(num_inputs=5, num_outputs=3, init_hidden_layers=(1, ))
genome = DefaultGenome(num_inputs=5, num_outputs=3, max_nodes=100, max_conns=500, init_hidden_layers=())
state = genome.setup()
nodes, conns = genome.initialize(state, key)
print(genome.repr(state, nodes, conns))