Skip to content

Commit

Permalink
(#67) edit seed_par
Browse files Browse the repository at this point in the history
  • Loading branch information
SevgiAkten committed Nov 5, 2024
1 parent df89c77 commit 379005c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pycellga/example/example_alpha_cga.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def run_alpha_cga_example():
recombination=optimizer.BlxalphaCrossover,
mutation=optimizer.FloatUniformMutation,
mins=[-32.768] * 10, # Minimum values for each gene
maxs=[32.768] * 10 # Maximum values for each gene
maxs=[32.768] * 10, # Maximum values for each gene
seed_par=100
)

# Print the results
Expand Down
3 changes: 2 additions & 1 deletion pycellga/example/example_cga.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def run_cga_example():
recombination=optimizer.ByteOnePointCrossover,
mutation=optimizer.ByteMutationRandom,
mins=[-32.768] * 5, # Minimum values for each gene
maxs=[32.768] * 5 # Maximum values for each gene
maxs=[32.768] * 5, # Maximum values for each gene
seed_par=100
)

# Print the results
Expand Down
3 changes: 2 additions & 1 deletion pycellga/example/example_sync_cga.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def run_sync_cga_example():
recombination=optimizer.BlxalphaCrossover,
mutation=optimizer.FloatUniformMutation,
mins=[-32.768] * 5, # Minimum values for each gene
maxs=[32.768] * 5 # Maximum values for each gene
maxs=[32.768] * 5, # Maximum values for each gene
seed_par=100
)

# Print the results
Expand Down
8 changes: 7 additions & 1 deletion pycellga/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def cga(
List of minimum values for each gene in the chromosome (for real value optimization).
maxs : list[float]
List of maximum values for each gene in the chromosome (for real value optimization).
seed_par : int
Ensures the random number generation is repeatable.
Returns
-------
Expand Down Expand Up @@ -245,7 +247,9 @@ def sync_cga(
mins : List[float]
List of minimum values for each gene in the chromosome (for real value optimization).
maxs : List[float]
List of maximum values for each gene in the chromosome (for real value optimization
List of maximum values for each gene in the chromosome (for real value optimization.
seed_par : int
Ensures the random number generation is repeatable.
Returns
-------
Expand Down Expand Up @@ -396,6 +400,8 @@ def alpha_cga(
List of minimum values for each gene in the chromosome (for real value optimization).
maxs : List[float]
List of maximum values for each gene in the chromosome (for real value optimization).
seed_par : int
Ensures the random number generation is repeatable.
Returns
-------
Expand Down

0 comments on commit 379005c

Please sign in to comment.