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
as I use the framework using a custom individual, I wanted to understand how to use the tournament selection operator and whether it needs to be customised in any way.
I ask this because when I use the standard torunament selection operator, with the command 'selection=get_selection('tournament')' I get the following error:
Traceback (most recent call last):
File "C:\Users\GA-for-ML\genetic_algorithm_init_.py", line 21, in
selection=get_selection('tournament'),
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\factory.py", line 134, in get_selection
return get_from_list(get_selection_options(), name, args, {**d, **kwargs})
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\factory.py", line 41, in get_from_list
return clazz(*args, **kwargs)
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\operators\selection\tournament.py", line 33, in init
raise Exception("Please provide the comparing function for the tournament selection!")
Exception: Please provide the comparing function for the tournament selection!
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
-
Hello,
as I use the framework using a custom individual, I wanted to understand how to use the tournament selection operator and whether it needs to be customised in any way.
I ask this because when I use the standard torunament selection operator, with the command 'selection=get_selection('tournament')' I get the following error:
Traceback (most recent call last):
File "C:\Users\GA-for-ML\genetic_algorithm_init_.py", line 21, in
selection=get_selection('tournament'),
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\factory.py", line 134, in get_selection
return get_from_list(get_selection_options(), name, args, {**d, **kwargs})
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\factory.py", line 41, in get_from_list
return clazz(*args, **kwargs)
File "C:\Users\GA-for-ML\venv\lib\site-packages\pymoo\operators\selection\tournament.py", line 33, in init
raise Exception("Please provide the comparing function for the tournament selection!")
Exception: Please provide the comparing function for the tournament selection!
Beta Was this translation helpful? Give feedback.
All reactions