geneticOptimization.conf 10.1 KB
Newer Older
1
2
3
4

### Genetic config


5
6
# Calculates the fitness as specified by the fitness function, but uses as final fitness the runtime needed to calculate the fitness. Lower score is
# better in this case (lower runtime), caches are disabled. This can be used for searching time-consuming parameters
7
runtimePerformanceCheck=false
8
9

# Show more log messages
10
verbose=true
11
12

# If an exception was thrown during fitness calculation, the optimization process won't be interrupted, just a log message will be shown
13
interruptIfException=true
14
15

# After genetic optimization, an entropy analysis of the last N generation winners will be shown. Here you can specify the number of winners
16
evaluateLastWinnersCount=42
17
18

# Shows a small window with information to the optimization process, e.g. the current generation fitness values
19
20
21
showMonitorGui=true


22
23
24



25
# Whether to use an in-memory or a persistent cache. In the case of runtimePerformanceCheck=true, the caches are disabled
26
27

# Weak references for an in-memory cache. Can help with exploding memory consumption
28
weakRefCache=false
29
# If set, a persistent cache is used. If the value is empty, GenIe uses an in-memory cache
30
persistentCacheDir=
31
32
# The number of threads that will be used to calculate fitness calculations in parallel. If set < 1, the system uses as many threads as cpu cores
threadCount=1
33
34


35
36
37



38
39
40
# GenIe first performs a loop over all given values of all parameters, whereby the default value of the other parameters stay fixed. The default
# value of a parameter is the first one specified in the list of possible values. Here you can choose if, after this simple loop, the succeeding
# genetic run will be skipped or not
41
42
43
skipGeneticRun=false


44
45
46
47
48
49
50
51
# The names of the parameters that should be absolutely treated as independent. GenIe first performs a loop over all attribute values, whereby, during
# iterating the values for one attribute, the values for all other attributes are fixed to their FIRST value of their values list in
# paramNames2DiscreteValSpaces.
# If an attribute is explicitly marked as independent, during the genetic run its value in EACH candidate vector will be set to its best value from
# the initial loop. Thus, this attribute will never get another value beside the best one from the initial loop.
# If it is clear that an attribute isn't influenced by another one - it is independent - you can reduce the complexity for finding it's optimal value
# drastically by setting it independent. On the other hand, if you set it independent and it is not, you won't get the optimal parameter value
# combination.
52
53
independentParamNames=

54
55
56
57




58
59
# If true, the system will produce the same results in suceeding calls. (This is true beside uncontrollable side effects e.g. sort order of identical
# vector fitness values)
60
61
constantRandomSeed=true

62
63
64
# The selection strategy selects the population candidates that are allowed to produce offsprings. Available are:
# RouletteWheelSelection (random, fitness-proportionate), StochasticUniversalSampling (less random, fitness-proportionate), SigmaScaling (fitness-
# proportionate, helps to avoid early dominance of one/two fit candidates. Amplifies minor fitness differences in more mature populations)
65
66
selectionStrategy=SigmaScaling

67
68
69
# The probability a vector value will mutate to another random value from its value range when a vector is created from its parents
mutationProbability=0.01

70
71
72
73
74
75
# The size of the first population. After the first population, the evolution goes further with the specified population size. This is to start wide
# spreaded and to evolve the best candidates more focused afterwards. Can be relevant if you have huge fitness calculation runtimes where every
# calculation counts.
firstPopulationSize=70
# The population size for each island. Therefore, if you have 5 islands, setting this parameter to 200 will result in 1000 individuals overall, 200 on
# each island. In the case the island count is <=1, it's just the population size of the non-islands generations
76
77
populationSize=70

78
# The number of islands
79
80
islandCount=1

81
82
83
84
85
86
87
88
# The number of candidates preserved via elitism on each island. In elitism, a sub-set of the population with the best fitness scores are preserved
# unchanged in the subsequent generation. Candidate solutions that are preserved unchanged through elitism remain eligible for selection for breeding
# the remainder of the next generation. This value must be non-negative and less than the population size. A value of zero means that no elitism will
# be applied.
eliteCount=0

# The number of generations that make up an epoch. Islands evolve independently for this number of generations and then migration occurs at the end of
# the epoch and the next epoch starts. Ignored if the island count is <=1
89
90
epochLength=-1

91
#The number of individuals that will be migrated from each island at the end of each epoch. Ignored if the island count is <=1
92
93
migrationCount=-1

94
95
96
97




98
# Specifies if a lower fitness value is better or vice versa
99
lowerScoreIsBetter=false
100
# The optimization process will halt after a specified number of generations passes without improvement in the population's fittest individual
101
maxNumImprovementGenerationsBreak=70
102
# The optimization will halt after a specified amount of time
103
104
# 8h=28800,12h=43200,1day=86400,2d=172800,3d=259200,10day=864000,18d=1555200
maxDurationSecondsBreak=1555200
105
106
# The optimization will halt if a specific fitness value is reached
targetFitnessBreak=1.1
107
108


109
110
111



112
113
# Each candidate vector entry gets a name and a list of possible values. These are all values GenIe will check. In the case you have number
# parameters, specify a list of discrete values from your number range
114
115
116
paramNames2DiscreteValSpaces=
{

117
118
119
	# The first value of a values list will be used as 'default value' for the independent parameters check. The number of keys/parameter names
	# defines the genetic candidates vector length. It can be wise to add keys with just one possibility in order to get compatible vectors for
	# succeeding runs with a persistent cache, if you are first unsure if you want to add a parameter to the optimization process or not.
120

121
122
123
124
125
	# Examples:
	# # default value: TANH:
	# defaultActivation=TANH,LEAKYRELU,RELU
	# # default value: 0.1:
	# learningRate=0.1,0.5,0.05,0.01,0.001
126
127
128
129
130
131
132
133

	summandA=0,1,2,3,4,5,6,7
	summandB=0,5,10,15,20,25
	summandC=0,10,20,30
	summandD=0,15,25,35
	
}

134
# A fitness function can attach metadata to a candidate vector, together with it's calculated fitness. Further, the fitness function receives a
135
# candidate vector together with the attached metadata from its parent vectors. GenIe doesn't do anything with this metadata, it is just a possibility
136
137
# to do something special for fitness functions. The first generation of candidate vectors doesn't have any parents. Thus you can specify the parents
# metadata for these vectors manually
138
139
140
141
142
143
144
145
firstGenerationParentMetadata=
{
   # Double key entries are not allowed

   initialMetadataAtt_1=initVal_1
   initialMetadataAtt_2=initVal_2
}

146
147
# The fitness function call for a candidate vector recieves the metadata of the top N candidate vectors from its parent population for information.
# This can e.g. be used for population based training. Here you can specify the count for the top N list. This value has NO influence to the genetic
148
149
# optimization, it is just about metadata for the fitness function. The fitness function also gets a randomly selected entry from this list of top N
# parent population candidates for population based training. This entry can also be empty, by random
150
151
eliteMetadataCount=3

152
# The fitnessScore of a candidate vector can be potentially calculated by the cost function with this data: 1. candidate vector entries,
153
154
155
156
157
158
159
160
161
# 2. metadata parts from the parents, 3. metadata parts from the population elite, 4. metadata parts from the randomly selected elite candidate (if picked).
# For cache lookup, GenIe needs to know all relevant parts beside the vector entries, that are somehow relevant for fitnessScore calculation.
# If not specified correctly, GenIe picks formerly calculated fitnessScores by the vector entries only, which can yield to wrong values
#e.g. selectedEliteMetadataAtts4cacheLookup=attName1,attName2,attNameN
parentMetadataAtts4cacheLookup=
eliteMetadataAtts4cacheLookup=
selectedEliteMetadataAtts4cacheLookup=


162
163
164



165
# For using GenIe standalone, you can specify an exec call for the fitness function. This executable will be called for each candidate vector
166
167
168
169
# evaluation, receiving the candidate vector values as invocation arguments (just strings from the configured value range), or over stdIn if enabled.
# The forelast invocation argument will be the parents metadata (json), the last argument the metadata from the top N candidate vectors of the parent
# population, also as Json string, simply as returned from the parents fitness function invocation.
# GenIe will wait for the process to terminate, looking for a calculation result in its output (stdOut). This calculation result have to be like
Christian Reuschling's avatar
Christian Reuschling committed
170
# the following example Json structure, and should be somewhere at the end of the processes output. GenIe has a look to the tail of the output only for
171
# performance purposes. Configure the tail length with consideredTailLength.
172
173
174
175
176
177
178
# {
#   "fitness":0.0,
#   "metadata":{
#     "someMetadataKey1":"someMetadataValue",
#     "someMetadataKeyN":"someMetadataValue"
#   }
# }
179
fitnessFunctionExecPath=sum23TestFitnessFunction.sh
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
consideredTailLength=10000
# It true, all input to the fitness function process will be given over standard input as json instead of process arguments. The format given to stdIn is as follows
# {
#   "candidateVectorParamNames":[“paramName1”, “paramName2”, “paramName3”,..],
#   "candidateVector":[“value1”, “value2”, “value3”,..],
#   "parentsMetadata":[
#        {"someMetadataKeyParent1_1":"someMetadataValue", "someMetadataKeyParent1_N":"someMetadataValue"},
#        {"someMetadataKeyParent2_1":"someMetadataValue", "someMetadataKeyParent2_N":"someMetadataValue"},
#      ],
#   "eliteMetadata":[
#        {"someMetadataKeyElite1_1":"someMetadataValue", "someMetadataKeyElite1_N":"someMetadataValue"},
#        {"someMetadataKeyElite2_1":"someMetadataValue", "someMetadataKeyElite2_N":"someMetadataValue"},
#        ...
#      ]
# }
195
inputOverStdIn=true
196
197
# The tail of the fitness function output should be logged
logExecOutputTail=true
198
199
200
201
202
203
204
205
206