如何修复 python neat openai retro 中的配置错误
How to fix config Error in python neat openai retro
按照指南进行操作:https://www.youtube.com/watch?v=8dY3nQRcsac&list=PLTWFMbPFsvz3CeozHfeuJIXWAJMkPtAdS&index=7
当我 运行 python 程序 python 整洁的配置文件
中出现错误
看起来和基因组变量有关
我的 python 现在整洁的配置文件
#--- parameters for the XOR-2 experiment ---#
[NEAT]
fitness_criterion = max
fitness_threshold = 10000
pop_size = 20
reset_on_extinction = True
[DefaultGenome]
# node activation options
activation_default = sigmoid
activation_mutate_rate = 0.05
activation_options = sigmoid
# node aggregation options
aggregation_default = sum
aggregation_mutate_rate = 0.05
aggregation_options = sum
# node bias options
bias_init_mean = 0.0
bias_init_stdev = 1.0
bias_max_value = 30.0
bias_min_value = -30.0
bias_mutate_power = 0.5
bias_mutate_rate = 0.7
bias_replace_rate = 0.1
# genome compatibility options
compatibility_disjoint_coefficient = 1.0
compatibility_weight_coefficient = 0.5
# connection add/remove rates
conn_add_prob = 0.5
conn_delete_prob = 0.5
# connection enable options
enabled_default = True
enabled_mutate_rate = 0.01
feed_forward = False
initial_connection = unconn nected
# node add/remove rates
node_add_prob = 0.5
node_delete_prob = 0.2
# network parameters
num_hidden = 0
num_inputs = 1120
num_outputs = 12
# node response options
response_init_mean = 1.0
response_init_stdev = 0.0
response_max_value = 30.0
response_min_value = -30.0
response_mutate_power = 0.0
response_mutate_rate = 0.0
response_replace_rate = 0.0
# connection weight options
weight_init_mean = 0.0
weight_init_stdev = 1.0
weight_max_value = 30
weight_min_value = -30
weight_mutate_power = 0.5
weight_mutate_rate = 0.8
weight_replace_rate = 0.1
[DefaultSpeciesSet]
compatibility_threshold = 205
[DefaultStagnation]
species_fitness_func = max
max_stagnation = 50
species_elitism = 0
[DefaultReproduction]
elitism = 3
survival_threshold = 0.2
来自终端的错误代码
'config-feedforward')
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/config.py", line 189, in __init__
self.genome_config = genome_type.parse_config(genome_dict)
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/genome.py", line 158, in parse_config
return DefaultGenomeConfig(param_dict)
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/genome.py", line 72, in __init__
assert self.initial_connection in self.allowed_connectivity
AssertionError
来自 python 简洁代码的配置代码
config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction,
neat.DefaultSpeciesSet, neat.DefaultStagnation,
config-feedforward')
问题出在 "initial_connection = unconn nected"
行
有错字。 'unconnected' 中不应该有一个中断,它应该如下所示:
"initial_connection = unconnected"
按照指南进行操作:https://www.youtube.com/watch?v=8dY3nQRcsac&list=PLTWFMbPFsvz3CeozHfeuJIXWAJMkPtAdS&index=7
当我 运行 python 程序 python 整洁的配置文件
中出现错误看起来和基因组变量有关
我的 python 现在整洁的配置文件
#--- parameters for the XOR-2 experiment ---#
[NEAT]
fitness_criterion = max
fitness_threshold = 10000
pop_size = 20
reset_on_extinction = True
[DefaultGenome]
# node activation options
activation_default = sigmoid
activation_mutate_rate = 0.05
activation_options = sigmoid
# node aggregation options
aggregation_default = sum
aggregation_mutate_rate = 0.05
aggregation_options = sum
# node bias options
bias_init_mean = 0.0
bias_init_stdev = 1.0
bias_max_value = 30.0
bias_min_value = -30.0
bias_mutate_power = 0.5
bias_mutate_rate = 0.7
bias_replace_rate = 0.1
# genome compatibility options
compatibility_disjoint_coefficient = 1.0
compatibility_weight_coefficient = 0.5
# connection add/remove rates
conn_add_prob = 0.5
conn_delete_prob = 0.5
# connection enable options
enabled_default = True
enabled_mutate_rate = 0.01
feed_forward = False
initial_connection = unconn nected
# node add/remove rates
node_add_prob = 0.5
node_delete_prob = 0.2
# network parameters
num_hidden = 0
num_inputs = 1120
num_outputs = 12
# node response options
response_init_mean = 1.0
response_init_stdev = 0.0
response_max_value = 30.0
response_min_value = -30.0
response_mutate_power = 0.0
response_mutate_rate = 0.0
response_replace_rate = 0.0
# connection weight options
weight_init_mean = 0.0
weight_init_stdev = 1.0
weight_max_value = 30
weight_min_value = -30
weight_mutate_power = 0.5
weight_mutate_rate = 0.8
weight_replace_rate = 0.1
[DefaultSpeciesSet]
compatibility_threshold = 205
[DefaultStagnation]
species_fitness_func = max
max_stagnation = 50
species_elitism = 0
[DefaultReproduction]
elitism = 3
survival_threshold = 0.2
来自终端的错误代码
'config-feedforward')
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/config.py", line 189, in __init__
self.genome_config = genome_type.parse_config(genome_dict)
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/genome.py", line 158, in parse_config
return DefaultGenomeConfig(param_dict)
File "/home/gym/OPAI/lib/python3.6/site-packages/neat/genome.py", line 72, in __init__
assert self.initial_connection in self.allowed_connectivity
AssertionError
来自 python 简洁代码的配置代码
config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction,
neat.DefaultSpeciesSet, neat.DefaultStagnation,
config-feedforward')
问题出在 "initial_connection = unconn nected"
行有错字。 'unconnected' 中不应该有一个中断,它应该如下所示: "initial_connection = unconnected"