Skip to content

Commit b3183c2

Browse files
authored
Merge branch 'master' into github-actions
2 parents f83c973 + e946f04 commit b3183c2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/source/pygad.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -1037,10 +1037,11 @@ Let's discuss how to do each of these steps.
10371037
Preparing the ``fitness_func`` Parameter
10381038
-----------------------------------------
10391039

1040-
Even though some steps in the genetic algorithm pipeline can work the
1041-
same regardless of the problem being solved, one critical step is the
1042-
calculation of the fitness value. There is no unique way of calculating
1043-
the fitness value and it changes from one problem to another.
1040+
Even though some steps in the genetic algorithm pipeline can
1041+
work the same regardless of the problem being solved, one critical step
1042+
is the calculation of the fitness value. There is no unique way of
1043+
calculating the fitness value and it changes from one problem to
1044+
another.
10441045

10451046
PyGAD has a parameter called ``fitness_func`` that allows the user to
10461047
specify a custom function/method to use when calculating the fitness.

docs/source/pygad_more.rst

-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ After running the code again, it will find the same result.
632632
0.04872203136549972
633633
634634
Continue without Losing Progress
635-
================================
636635

637636
In `PyGAD
638637
2.18.0 <https://pygad.readthedocs.io/en/latest/releases.html#pygad-2-18-0>`__,

pygad/pygad.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def __init__(self,
726726
if self.mutation_probability is None:
727727
if not self.suppress_warnings:
728728
warnings.warn(
729-
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
729+
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
730730
mutation_num_genes = 1
731731

732732
elif type(mutation_percent_genes) in GA.supported_int_float_types:
@@ -745,7 +745,7 @@ def __init__(self,
745745
if mutation_num_genes == 0:
746746
if self.mutation_probability is None:
747747
if not self.suppress_warnings:
748-
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
748+
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
749749
mutation_num_genes = 1
750750
else:
751751
self.valid_parameters = False
@@ -771,7 +771,7 @@ def __init__(self,
771771
# Based on the mutation percentage of genes, if the number of selected genes for mutation is less than the least possible value which is 1, then the number will be set to 1.
772772
if mutation_num_genes[idx] == 0:
773773
if not self.suppress_warnings:
774-
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]}) resutled in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
774+
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]}) resulted in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
775775
mutation_num_genes[idx] = 1
776776
if mutation_percent_genes[0] < mutation_percent_genes[1]:
777777
if not self.suppress_warnings:

0 commit comments

Comments
 (0)