GeneticAlgorithmPython icon indicating copy to clipboard operation
GeneticAlgorithmPython copied to clipboard

Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).

Results 114 GeneticAlgorithmPython issues
Sort by recently updated
recently updated
newest added
trafficstars

Hi, I am refactoring `pygad.py` I wonder why there are lots of duplicate code in function `unique_genes_by_space`, which the function `unique_int_gene_from_range` are mostly use same arguments in the function `unique_genes_by_space`....

enhancement

I noticed a behaviour where when my desired_output is set to = desired_output: return 1.0 / ((output / desired_output)**2) else: return 1.0 / ((desired_output / output)**2) def crossover_func(): return 0...

question

The following code is buggy : def mutation_func(offspring, ga_instance): for chromosome_idx in range(offspring.shape[0]): random_gene_idx = numpy.random.choice(range(offspring.shape[0])) offspring[chromosome_idx, random_gene_idx] += numpy.random.random() return offspring The following line : random_gene_idx = numpy.random.choice(range(offspring.shape[0])) should...

## Suggestion: I created a GA with pygad where the fitness function needs a lot of time to calculate (several minutes per fitness calculation). When I am manually stopping it...

enhancement

Initially I would like to thank you for the excellent work. Moving on to the question at hand, I've identified that there is no version of PyGAD that has already...

enhancement

Hello, may I know how to add inequality constraint of two different genes. For example, I have a gene space `gene_space=[{'low': 0, 'high': 16}, {'low': 0, 'high': 24}]`. I would...

question

Hi everyone. I'd like to use pygad's `parallel_processing` feature to enable parallelization with multiprocessing like that: ```parallel_processing=["process", 2]``` Then I have my fitness function which is a closure which has...

question

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...

enhancement

When I load a previously saved instance of the genetic algorithm with `ga_instance = pygad.load(filename=filename)` the loaded instance has only the best solution as parent and not the selected number...

bug