Last change
on this file since 1161 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:
404 bytes
|
Line | |
---|
1 | from abc import abstractmethod |
---|
2 | from evolalg.base.step import Step |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | class Remove(Step): |
---|
7 | def __init__(self, *args, **kwargs): |
---|
8 | super(Remove, self).__init__(*args , **kwargs) |
---|
9 | pass |
---|
10 | |
---|
11 | @abstractmethod |
---|
12 | def remove(self, individual): |
---|
13 | pass |
---|
14 | |
---|
15 | def call(self, population): |
---|
16 | super(Remove, self).call(population) |
---|
17 | return [_ for _ in population if not self.remove(_)] |
---|
Note: See
TracBrowser
for help on using the repository browser.