source: framspy/evolalg/statistics/halloffame_stats.py @ 1114

Last change on this file since 1114 was 1113, checked in by Maciej Komosinski, 3 years ago

Added a framework for evolutionary algorithms cooperating with FramsticksLib?.py

File size: 409 bytes
Line 
1from evolalg.statistics.halloffame_custom import HallOfFameCustom
2from evolalg.statistics.statistics import Statistics
3
4
5class HallOfFameStatistics(Statistics):
6    def __init__(self, size, fields="fitness"):
7        self.haloffame = HallOfFameCustom(size, fitness_field=fields)
8
9    def init(self):
10        self.haloffame.clear()
11
12    def collect(self, population):
13        self.haloffame.update(population)
Note: See TracBrowser for help on using the repository browser.