Files
tensorneat-mend/examples/tmp.py
root 1d606eb1c3 fix bug;
feat: Add support for max_nodes and max_conns in DefaultGenome initialization
2024-07-10 11:30:20 +08:00

11 lines
358 B
Python

import jax, jax.numpy as jnp
from tensorneat.algorithm import NEAT
from tensorneat.algorithm.neat import DefaultGenome
key = jax.random.key(0)
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))