Last change
on this file since 1156 was
1139,
checked in by Maciej Komosinski, 4 years ago
|
Added --debug mode that prints names of steps; final multiple evaluation now evaluates genotypes in hall of fame instead of the last population
|
File size:
497 bytes
|
Rev | Line | |
---|
[1113] | 1 | from evolalg.statistics.halloffame_custom import HallOfFameCustom |
---|
| 2 | from evolalg.statistics.statistics import Statistics |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | class HallOfFameStatistics(Statistics): |
---|
[1139] | 6 | def __init__(self, size, fields="fitness", *args, **kwargs): |
---|
| 7 | super(HallOfFameStatistics, self).__init__(*args, **kwargs) |
---|
[1128] | 8 | self.halloffame = HallOfFameCustom(size, fitness_field=fields) |
---|
[1113] | 9 | |
---|
| 10 | def init(self): |
---|
[1128] | 11 | self.halloffame.clear() |
---|
[1113] | 12 | |
---|
| 13 | def collect(self, population): |
---|
[1128] | 14 | self.halloffame.update(population) |
---|
Note: See
TracBrowser
for help on using the repository browser.