Skip to content

Commit

Permalink
Update selection.py
Browse files Browse the repository at this point in the history
- Add default value for tournament_size in tournament_selection
  • Loading branch information
AndreaCampagner committed Jan 28, 2025
1 parent 3b355ee commit f6fb535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion softpy/evolutionary/selection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

def tournament_selection(fitness: np.ndarray, tournament_size: int, current_step=None):
def tournament_selection(fitness: np.ndarray, tournament_size: int=2, current_step=None):
'''
An implementation of tournament selection
'''
Expand Down

0 comments on commit f6fb535

Please sign in to comment.