GeneticAlgorithmPython
GeneticAlgorithmPython copied to clipboard
GA.run_completed attribute initializer missing
I can't check ga_instance.run_completed == False
during runtime because ga_instance.run_completed
is initialized to True
only after a finished run. It was never initialized to False
inside of class GA
. This line is missing from pygad.py
I suppose (lines 911 - 941):
self.run_completed = False
Workaround for now in example.py
:
ga_instance = pygad.GA(
# [...]
)
ga_instance.run_completed = False
Thanks @FeBe95 for your suggestion. This is definitely a good thing to support.
In the next release, the run_completed
property will be initialized to False
.