[Python] NEAT-Python: "Missing configuration item: compatibility_disjoint_coefficient" error...

Discussão em 'Python' iniciado por Stack, Julho 24, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using the NEAT-Python library and trying to run a simple configuration with the following config file:

    [NEAT]
    fitness_criterion = max
    fitness_threshold = 1000
    pop_size = 10
    reset_on_extinction = False

    [DefaultGenome]
    num_inputs = 6
    num_outputs = 4
    num_hidden = 0
    feed_forward = True
    initial_connection = full

    activation_default = sigmoid
    activation_options = sigmoid
    aggregation_default = sum
    aggregation_options = sum

    [DefaultSpeciesSet]
    compatibility_threshold = 3.0
    compatibility_disjoint_coefficient = 1.0
    compatibility_weight_coefficient = 0.5

    [DefaultStagnation]
    species_fitness_func = max
    max_stagnation = 5
    species_elitism = 1

    [DefaultReproduction]
    elitism = 1
    survival_threshold = 0.2


    But when I run my code, I get this error:

    raise RuntimeError('Missing configuration item: ' + self.name)
    RuntimeError: Missing configuration item: compatibility_disjoint_coefficient


    As you can see, compatibility_disjoint_coefficient is present in the [DefaultSpeciesSet] section. I'm not sure why NEAT is throwing this error.

    Any ideas what might be causing this?

    P.S. i loaded using

    local_dir = os.path.dirname(__file__)
    config_file = os.path.join(local_dir, 'config-feedforward.txt')
    run_neat(config_file)


    and

    def run_neat(config_path):
    config = neat.Config(
    neat.DefaultGenome,
    neat.DefaultReproduction,
    neat.DefaultSpeciesSet,
    neat.DefaultStagnation,
    config_path
    )


    I have checked the file naming and path

    Continue reading...

Compartilhe esta Página