Ignore:
Timestamp:
05/08/21 12:42:58 (3 years ago)
Author:
Maciej Komosinski
Message:

Added --debug mode that prints names of steps; final multiple evaluation now evaluates genotypes in hall of fame instead of the last population

Location:
framspy/evolalg/selection
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • framspy/evolalg/selection/identity.py

    r1113 r1139  
    66
    77class IdentitySelection(Selection):
    8     def __init__(self, copy=False):
    9         super(IdentitySelection, self).__init__(copy)
     8    def __init__(self, copy=False, *args, **kwargs):
     9        super(IdentitySelection, self).__init__(copy, *args, **kwargs)
    1010
    1111    def call(self, population, selection_size=None):
     12        super(IdentitySelection, self).call(population)
    1213        res = population
    1314        if selection_size is not None:
  • framspy/evolalg/selection/selection.py

    r1113 r1139  
    66
    77class Selection(Step):
    8     def __init__(self, copy=False):
     8    def __init__(self, copy=False, *args, **kwargs):
     9        super(Selection, self).__init__(*args, **kwargs)
    910        self.copy = copy
    1011
     
    1415
    1516    def call(self, population, count=None):
     17        super(Selection, self).call(population)
    1618        res = []
    1719        if count is None:
  • framspy/evolalg/selection/tournament.py

    r1113 r1139  
    88
    99class TournamentSelection(Selection):
    10     def __init__(self, tournament_size: int, fit_attr="fitness", copy=False):
    11         super(TournamentSelection, self).__init__(copy)
     10    def __init__(self, tournament_size: int, fit_attr="fitness", copy=False, *args, **kwargs):
     11        super(TournamentSelection, self).__init__(copy, *args, **kwargs)
    1212        self.tournament_size = tournament_size
    1313        self.fit_attr = fit_attr
Note: See TracChangeset for help on using the changeset viewer.