Skip to content

Commit

Permalink
Merge pull request #226 from gabriele-0201/master
Browse files Browse the repository at this point in the history
Adding an argument to the config object
  • Loading branch information
CodeReclaimers committed May 5, 2022
2 parents f078860 + aa775d2 commit 4928381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Config(object):
ConfigParameter('reset_on_extinction', bool),
ConfigParameter('no_fitness_termination', bool, False)]

def __init__(self, genome_type, reproduction_type, species_set_type, stagnation_type, filename):
def __init__(self, genome_type, reproduction_type, species_set_type, stagnation_type, filename, config_information=None):
# Check that the provided types have the required methods.
assert hasattr(genome_type, 'parse_config')
assert hasattr(reproduction_type, 'parse_config')
Expand All @@ -138,6 +138,7 @@ def __init__(self, genome_type, reproduction_type, species_set_type, stagnation_
self.reproduction_type = reproduction_type
self.species_set_type = species_set_type
self.stagnation_type = stagnation_type
self.config_information = config_information

if not os.path.isfile(filename):
raise Exception('No such config file: ' + os.path.abspath(filename))
Expand Down

0 comments on commit 4928381

Please sign in to comment.