update README.md

This commit is contained in:
root
2024-07-15 21:03:40 +08:00
parent 0760882aae
commit 0cdfa6d3c7

View File

@@ -84,30 +84,30 @@ from tensorneat.common import ACT, AGG
# define the pipeline # define the pipeline
pipeline = Pipeline( pipeline = Pipeline(
algorithm=NEAT( algorithm=NEAT(
pop_size=1000, pop_size=1000,
species_size=20, species_size=20,
survival_threshold=0.1, survival_threshold=0.1,
compatibility_threshold=1.0, compatibility_threshold=1.0,
genome=DefaultGenome( genome=DefaultGenome(
num_inputs=11, num_inputs=11,
num_outputs=3, num_outputs=3,
init_hidden_layers=(), init_hidden_layers=(),
node_gene=BiasNode( node_gene=BiasNode(
activation_options=ACT.tanh, activation_options=ACT.tanh,
aggregation_options=AGG.sum, aggregation_options=AGG.sum,
),
output_transform=ACT.tanh,
), ),
output_transform=ACT.tanh,
), ),
problem=BraxEnv( ),
env_name="hopper", problem=BraxEnv(
max_step=1000, env_name="hopper",
), max_step=1000,
seed=42, ),
generation_limit=100, seed=42,
fitness_target=5000, generation_limit=100,
) fitness_target=5000,
)
# initialize state # initialize state
state = pipeline.setup() state = pipeline.setup()