|
1
|
|
|
# Author: Simon Blanke |
|
2
|
|
|
# Email: [email protected] |
|
3
|
|
|
# License: MIT License |
|
4
|
|
|
|
|
5
|
|
|
from .search import Search |
|
6
|
|
|
from .optimizers import ( |
|
7
|
|
|
HillClimbingOptimizer as _HillClimbingOptimizer, |
|
8
|
|
|
StochasticHillClimbingOptimizer as _StochasticHillClimbingOptimizer, |
|
9
|
|
|
RepulsingHillClimbingOptimizer as _RepulsingHillClimbingOptimizer, |
|
10
|
|
|
SimulatedAnnealingOptimizer as _SimulatedAnnealingOptimizer, |
|
11
|
|
|
DownhillSimplexOptimizer as _DownhillSimplexOptimizer, |
|
12
|
|
|
RandomSearchOptimizer as _RandomSearchOptimizer, |
|
13
|
|
|
GridSearchOptimizer as _GridSearchOptimizer, |
|
14
|
|
|
RandomRestartHillClimbingOptimizer as _RandomRestartHillClimbingOptimizer, |
|
15
|
|
|
RandomAnnealingOptimizer as _RandomAnnealingOptimizer, |
|
16
|
|
|
PowellsMethod as _PowellsMethod, |
|
17
|
|
|
PatternSearch as _PatternSearch, |
|
18
|
|
|
ParallelTemperingOptimizer as _ParallelTemperingOptimizer, |
|
19
|
|
|
ParticleSwarmOptimizer as _ParticleSwarmOptimizer, |
|
20
|
|
|
SpiralOptimization as _SpiralOptimization, |
|
21
|
|
|
EvolutionStrategyOptimizer as _EvolutionStrategyOptimizer, |
|
22
|
|
|
BayesianOptimizer as _BayesianOptimizer, |
|
23
|
|
|
LipschitzOptimizer as _LipschitzOptimizer, |
|
24
|
|
|
DirectAlgorithm as _DirectAlgorithm, |
|
25
|
|
|
TreeStructuredParzenEstimators as _TreeStructuredParzenEstimators, |
|
26
|
|
|
ForestOptimizer as _ForestOptimizer, |
|
27
|
|
|
EnsembleOptimizer as _EnsembleOptimizer, |
|
28
|
|
|
) |
|
29
|
|
|
|
|
30
|
|
|
|
|
31
|
|
|
class HillClimbingOptimizer(_HillClimbingOptimizer, Search): |
|
32
|
|
|
def __init__(self, *args, **kwargs): |
|
33
|
|
|
super().__init__(*args, **kwargs) |
|
34
|
|
|
|
|
35
|
|
|
|
|
36
|
|
|
class StochasticHillClimbingOptimizer(_StochasticHillClimbingOptimizer, Search): |
|
37
|
|
|
def __init__(self, *args, **kwargs): |
|
38
|
|
|
super().__init__(*args, **kwargs) |
|
39
|
|
|
|
|
40
|
|
|
|
|
41
|
|
|
class RepulsingHillClimbingOptimizer(_RepulsingHillClimbingOptimizer, Search): |
|
42
|
|
|
def __init__(self, *args, **kwargs): |
|
43
|
|
|
super().__init__(*args, **kwargs) |
|
44
|
|
|
|
|
45
|
|
|
|
|
46
|
|
|
class SimulatedAnnealingOptimizer(_SimulatedAnnealingOptimizer, Search): |
|
47
|
|
|
def __init__(self, *args, **kwargs): |
|
48
|
|
|
super().__init__(*args, **kwargs) |
|
49
|
|
|
|
|
50
|
|
|
|
|
51
|
|
|
class DownhillSimplexOptimizer(_DownhillSimplexOptimizer, Search): |
|
52
|
|
|
def __init__(self, *args, **kwargs): |
|
53
|
|
|
super().__init__(*args, **kwargs) |
|
54
|
|
|
|
|
55
|
|
|
|
|
56
|
|
|
class RandomSearchOptimizer(_RandomSearchOptimizer, Search): |
|
57
|
|
|
def __init__(self, *args, **kwargs): |
|
58
|
|
|
super().__init__(*args, **kwargs) |
|
59
|
|
|
|
|
60
|
|
|
|
|
61
|
|
|
class GridSearchOptimizer(_GridSearchOptimizer, Search): |
|
62
|
|
|
def __init__(self, *args, **kwargs): |
|
63
|
|
|
super().__init__(*args, **kwargs) |
|
64
|
|
|
|
|
65
|
|
|
|
|
66
|
|
|
class RandomRestartHillClimbingOptimizer(_RandomRestartHillClimbingOptimizer, Search): |
|
67
|
|
|
def __init__(self, *args, **kwargs): |
|
68
|
|
|
super().__init__(*args, **kwargs) |
|
69
|
|
|
|
|
70
|
|
|
|
|
71
|
|
|
class RandomAnnealingOptimizer(_RandomAnnealingOptimizer, Search): |
|
72
|
|
|
def __init__(self, *args, **kwargs): |
|
73
|
|
|
super().__init__(*args, **kwargs) |
|
74
|
|
|
|
|
75
|
|
|
|
|
76
|
|
|
class PowellsMethod(_PowellsMethod, Search): |
|
77
|
|
|
def __init__(self, *args, **kwargs): |
|
78
|
|
|
super().__init__(*args, **kwargs) |
|
79
|
|
|
|
|
80
|
|
|
|
|
81
|
|
|
class PatternSearch(_PatternSearch, Search): |
|
82
|
|
|
def __init__(self, *args, **kwargs): |
|
83
|
|
|
super().__init__(*args, **kwargs) |
|
84
|
|
|
|
|
85
|
|
|
|
|
86
|
|
|
class ParallelTemperingOptimizer(_ParallelTemperingOptimizer, Search): |
|
87
|
|
|
def __init__(self, *args, **kwargs): |
|
88
|
|
|
super().__init__(*args, **kwargs) |
|
89
|
|
|
|
|
90
|
|
|
|
|
91
|
|
|
class ParticleSwarmOptimizer(_ParticleSwarmOptimizer, Search): |
|
92
|
|
|
def __init__(self, *args, **kwargs): |
|
93
|
|
|
super().__init__(*args, **kwargs) |
|
94
|
|
|
|
|
95
|
|
|
|
|
96
|
|
|
class SpiralOptimization(_SpiralOptimization, Search): |
|
97
|
|
|
def __init__(self, *args, **kwargs): |
|
98
|
|
|
super().__init__(*args, **kwargs) |
|
99
|
|
|
|
|
100
|
|
|
|
|
101
|
|
|
class EvolutionStrategyOptimizer(_EvolutionStrategyOptimizer, Search): |
|
102
|
|
|
def __init__(self, *args, **kwargs): |
|
103
|
|
|
super().__init__(*args, **kwargs) |
|
104
|
|
|
|
|
105
|
|
|
|
|
106
|
|
|
class BayesianOptimizer(_BayesianOptimizer, Search): |
|
107
|
|
|
def __init__(self, *args, **kwargs): |
|
108
|
|
|
super().__init__(*args, **kwargs) |
|
109
|
|
|
|
|
110
|
|
|
|
|
111
|
|
|
class LipschitzOptimizer(_LipschitzOptimizer, Search): |
|
112
|
|
|
def __init__(self, *args, **kwargs): |
|
113
|
|
|
super().__init__(*args, **kwargs) |
|
114
|
|
|
|
|
115
|
|
|
|
|
116
|
|
|
class DirectAlgorithm(_DirectAlgorithm, Search): |
|
117
|
|
|
def __init__(self, *args, **kwargs): |
|
118
|
|
|
super().__init__(*args, **kwargs) |
|
119
|
|
|
|
|
120
|
|
|
|
|
121
|
|
|
class TreeStructuredParzenEstimators(_TreeStructuredParzenEstimators, Search): |
|
122
|
|
|
def __init__(self, *args, **kwargs): |
|
123
|
|
|
super().__init__(*args, **kwargs) |
|
124
|
|
|
|
|
125
|
|
|
|
|
126
|
|
|
class ForestOptimizer(_ForestOptimizer, Search): |
|
127
|
|
|
def __init__(self, *args, **kwargs): |
|
128
|
|
|
super().__init__(*args, **kwargs) |
|
129
|
|
|
|
|
130
|
|
|
|
|
131
|
|
|
class EnsembleOptimizer(_EnsembleOptimizer, Search): |
|
132
|
|
|
def __init__(self, *args, **kwargs): |
|
133
|
|
|
super().__init__(*args, **kwargs) |
|
134
|
|
|
|