pygenetics/ga_core.py
def fitness(self):
        '''Population fitness == average member fitness score'''

        if len(self.__members) != 0:
            if self.__num_processes > 1:
                members = [m.get() for m in self.__members]
            else:
                members = self.__members
            return sum(m.fitness_score for m in members) / len(members)
        else:
            return None
def fitness(self):
        '''Population fitness == average member fitness score'''

        if len(self.__members) != 0:
            if self.__num_processes > 1:
                members = [m.get() for m in self.__members]
            else:
                members = self.__members
            return sum(m.fitness_score for m in members) / len(members)
        else:
            return None
def fitness ( self ) : if len ( self . __members ) != 0 : if self . __num_processes > 1 : members = [ m . get ( ) for m in self . __members ] else : members = self . __members return sum ( m . fitness_score for m in members ) / len ( members ) else : return None
Population fitness == average member fitness score
Population fitness == average member fitness score