You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release has a major change where the fitness function accepts a mandatory parameter referring to the instance of the pygad.GA class.
This is the release notes:
The structure of the library is changed and some methods defined in the pygad.py module are moved to the pygad.utils, pygad.helper, and pygad.visualize submodules.
The pygad.utils.parent_selection module has a class named ParentSelection where all the parent selection operators exist. The pygad.GA class extends this class.
The pygad.utils.crossover module has a class named Crossover where all the crossover operators exist. The pygad.GA class extends this class.
The pygad.utils.mutation module has a class named Mutation where all the mutation operators exist. The pygad.GA class extends this class.
The pygad.helper.unique module has a class named Unique some helper methods exist to solve duplicate genes and make sure every gene is unique. The pygad.GA class extends this class.
The pygad.visualize.plot module has a class named Plot where all the methods that create plots exist. The pygad.GA class extends this class.
Fix an issue when building the initial population as (some) genes have their value taken from the mutation range (defined by the parameters random_mutation_min_val and random_mutation_max_val) instead of using the parameters init_range_low and init_range_high.
The summary() method returns the summary as a single-line string. Just log/print the returned string it to see it properly.
The callback_generation parameter is removed. Use the on_generation parameter instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This release has a major change where the fitness function accepts a mandatory parameter referring to the instance of the
pygad.GA
class.This is the release notes:
pygad.py
module are moved to thepygad.utils
,pygad.helper
, andpygad.visualize
submodules.pygad.utils.parent_selection
module has a class namedParentSelection
where all the parent selection operators exist. Thepygad.GA
class extends this class.pygad.utils.crossover
module has a class namedCrossover
where all the crossover operators exist. Thepygad.GA
class extends this class.pygad.utils.mutation
module has a class namedMutation
where all the mutation operators exist. Thepygad.GA
class extends this class.pygad.helper.unique
module has a class namedUnique
some helper methods exist to solve duplicate genes and make sure every gene is unique. Thepygad.GA
class extends this class.pygad.visualize.plot
module has a class namedPlot
where all the methods that create plots exist. Thepygad.GA
class extends this class.logging
module to log the outputs to both the console and text file instead of using theprint()
function. This is by assigning thelogging.Logger
to the newlogger
parameter. Check the [Logging Outputs](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#logging-outputs) for more information.logger
to save the logger.fitness_func
parameter accepts a new parameter that refers to the instance of thepygad.GA
class. Check this for an example: [Use Functions and Methods to Build Fitness Function and Callbacks](https://pygad.readthedocs.io/en/latest/README_pygad_ReadTheDocs.html#use-functions-and-methods-to-build-fitness-and-callbacks). ask for new features about fitness_func #163initial_population
parameter.pop_fitness
parameter of thebest_solution()
method.random_mutation_min_val
andrandom_mutation_max_val
) instead of using the parametersinit_range_low
andinit_range_high
.summary()
method returns the summary as a single-line string. Just log/print the returned string it to see it properly.callback_generation
parameter is removed. Use theon_generation
parameter instead.parallel_processing
parameter with Keras and PyTorch. As Keras/PyTorch are not thread-safe, thepredict()
method gives incorrect and weird results when more than 1 thread is used. Fitness function issues with Multiprocessing #145 Wrong results when when parallel processing is used. TorchGA#5 Wrong results when when parallel processing is used. KerasGA#6. Thanks to this [StackOverflow answer](https://stackoverflow.com/a/75606666/5426539).numpy.float
byfloat
in the 2 parent selection operators roulette wheel and stochastic universal. changed deprecated numpy.float to float #168This discussion was created from the release PyGAD-3.0.0.
Beta Was this translation helpful? Give feedback.
All reactions