fix bug;
feat: Add support for max_nodes and max_conns in DefaultGenome initialization
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user