Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dede266

Browse files
author
Ahmed Gad
committed
Fix selecting a unique value from gene space
1 parent 102e1fd commit dede266

31 files changed

+13
-8965
lines changed

‎.DS_Store‎

-2 KB
Binary file not shown.

‎example.py‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

‎example2.py‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎pygad/.DS_Store‎

2 KB
Binary file not shown.
-205 Bytes
Binary file not shown.
-78 KB
Binary file not shown.
-260 Bytes
Binary file not shown.
-15.7 KB
Binary file not shown.
-14.4 KB
Binary file not shown.

‎pygad/helper/misc.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,9 @@ def generate_gene_value_from_space(self,
349349
# We must check if the selected value will respect the allow_duplicate_genes parameter.
350350
# Instead of selecting a value randomly, we have to select a value that will be unique if allow_duplicate_genes=False.
351351
# Only select a value from the current gene space that is, hopefully, unique.
352-
print("KKKKKKKK", value_from_space)
353352
value_from_space = self.select_unique_value(gene_values=value_from_space,
354353
solution=solution,
355354
gene_index=gene_idx)
356-
print("<<<<<<<<<<", value_from_space)
357-
# TODO WHY THIS VALUE IS NONE
358355

359356
# The gene space might be [None, 1, 7].
360357
# It might happen that the value None is selected.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /