QDpy
Loading...
Searching...
No Matches
base.py
Go to the documentation of this file.
1# This file is part of qdpy.
2#
3# qdpy is free software: you can redistribute it and/or modify
4# it under the terms of the GNU Lesser General Public License as
5# published by the Free Software Foundation, either version 3 of
6# the License, or (at your option) any later version.
7#
8# qdpy is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU Lesser General Public License for more details.
12#
13# You should have received a copy of the GNU Lesser General Public
14# License along with qdpy. If not, see <http://www.gnu.org/licenses/>.
15
16
17
19
20__all__ = ["Benchmark"]
21
22from qdpy.base import *
23
24
25class Benchmark(object):
26 """Describe an evaluator and compatible search and archive domains.
27
28 :param fn: Evaluation callable used by the search.
29 :param ind_domain: Common lower and upper genome coordinate bounds.
30 :param fitness_domain: One interval per returned objective.
31 :param features_domain: One interval per returned behaviour descriptor.
32 :param default_task: The optimisation direction for the benchmark.
33 """
34 fn: Callable
35 ind_domain: DomainLike
36 fitness_domain: Sequence[DomainLike]
37 features_domain: Sequence[DomainLike]
38 default_task: str
39 def __init__(self, fn: Callable, ind_domain: DomainLike, fitness_domain: Sequence[DomainLike], features_domain: Sequence[DomainLike], default_task: str = "minimisation"):
40 self.fn = fn # type: ignore
41 self.ind_domain = ind_domain
42 self.fitness_domain = fitness_domain
43 self.features_domain = features_domain
44 self.default_task = default_task
45
46
47# MODELINE "{{{1
48# vim:expandtab:softtabstop=4:shiftwidth=4:fileencoding=utf-8
49# vim:foldmethod=marker