Skip to content

Commit 914a79e

Browse files
Fix error messages to include correct class/section name for missing config parameters.
1 parent 258cc6c commit 914a79e

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

examples/openai-lander/config

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# neat-python configuration for the LunarLander-v2 environment on OpenAI Gym
2-
31
[NEAT]
42
pop_size = 150
53
# Note: the fitness threshold will never be reached because
@@ -8,6 +6,8 @@ fitness_criterion = max
86
fitness_threshold = 1000.0
97
reset_on_extinction = 0
108

9+
no_fitness_termination = False
10+
1111
[LanderGenome]
1212
num_inputs = 8
1313
num_hidden = 0
@@ -28,13 +28,15 @@ aggregation_options = sum
2828
aggregation_mutate_rate = 0.0
2929
bias_init_mean = 0.0
3030
bias_init_stdev = 1.0
31+
bias_init_type = gaussian
3132
bias_replace_rate = 0.02
3233
bias_mutate_rate = 0.8
3334
bias_mutate_power = 0.4
3435
bias_max_value = 30.0
3536
bias_min_value = -30.0
3637
response_init_mean = 1.0
3738
response_init_stdev = 0.0
39+
response_init_type = gaussian
3840
response_replace_rate = 0.0
3941
response_mutate_rate = 0.1
4042
response_mutate_power = 0.01
@@ -45,12 +47,18 @@ weight_max_value = 30
4547
weight_min_value = -30
4648
weight_init_mean = 0.0
4749
weight_init_stdev = 1.0
50+
weight_init_type = gaussian
4851
weight_mutate_rate = 0.8
4952
weight_replace_rate = 0.02
5053
weight_mutate_power = 0.4
5154
enabled_default = True
5255
enabled_mutate_rate = 0.01
5356

57+
single_structural_mutation = false
58+
structural_mutation_surer = default
59+
enabled_rate_to_true_add = 0.0
60+
enabled_rate_to_false_add = 0.0
61+
5462
[DefaultSpeciesSet]
5563
compatibility_threshold = 3.0
5664

@@ -63,3 +71,5 @@ species_elitism = 4
6371
elitism = 2
6472
survival_threshold = 0.2
6573

74+
min_species_size = 2
75+

neat/genome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class DefaultGenome(object):
186186
def parse_config(cls, param_dict):
187187
param_dict['node_gene_type'] = DefaultNodeGene
188188
param_dict['connection_gene_type'] = DefaultConnectionGene
189-
return DefaultGenomeConfig(param_dict, 'DefaultGenome')
189+
return DefaultGenomeConfig(param_dict, cls.__name__)
190190

191191
@classmethod
192192
def write_config(cls, f, config):

0 commit comments

Comments
 (0)