geneticOptimization.conf 9.15 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
22
showMonitorGui=true


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

24
# Weak references for an in-memory cache. Can help with exploding memory consumption
25
weakRefCache=false
26
# If set, a persistent cache is used. If the value is empty, GenIe uses an in-memory cache
27
persistentCacheDir=
28
# Parallelize the vector fitness calculations. If multithreaded, the system uses as many threads as cpu cores
29
30
31
singleThreaded=true


32
33
34
# 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
35
36
37
skipGeneticRun=false


38
39
40
41
42
43
44
45
# 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.
46
47
independentParamNames=

48
49
# 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)
50
51
constantRandomSeed=true

52
53
54
# 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)
55
56
selectionStrategy=SigmaScaling

57
58
59
# 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

60
61
62
63
64
65
# 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
66
67
populationSize=70

68
# The number of islands
69
70
islandCount=1

71
72
73
74
75
76
77
78
# 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
79
80
epochLength=-1

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

84
# Specifies if a lower fitness value is better or vice versa
85
lowerScoreIsBetter=false
86
# The optimization process will halt after a specified number of generations passes without improvement in the population's fittest individual
87
maxNumImprovementGenerationsBreak=70
88
# The optimization will halt after a specified amount of time
89
90
# 8h=28800,12h=43200,1day=86400,2d=172800,3d=259200,10day=864000,18d=1555200
maxDurationSecondsBreak=1555200
91
# The optimization will halt if a specific fitness value is reached
92
93
94
targetFitnessBreak=1


95
96
# 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
97
98
99
paramNames2DiscreteValSpaces=
{

100
101
102
	# 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.
103

104
105
106
107
108
	# Examples:
	# # default value: TANH:
	# defaultActivation=TANH,LEAKYRELU,RELU
	# # default value: 0.1:
	# learningRate=0.1,0.5,0.05,0.01,0.001
109
110
111
112
113
114
115
116

	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
	
}

117
118
119
120
# A fitness function can attach metadata to a candidate vector, together with it's calculated fitness. Further, the fitness function recieves a
# candidate vector together with the attached metadata from its parent vectors. GenIe doesn't do anything with this metadata, it is just a possibility
# 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
121
122
123
124
125
126
127
128
firstGenerationParentMetadata=
{
   # Double key entries are not allowed

   initialMetadataAtt_1=initVal_1
   initialMetadataAtt_2=initVal_2
}

129
130
131
132
133
# 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
# optimization, it is just about metadata for the fitness function
eliteMetadataCount=3

134
# For using GenIe standalone, you can specify an exec call for the fitness function. This executable will be called for each candidate vector
135
136
137
138
139
140
# 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
# the following example Json structure, and should be somewhere at the end of the processes output. GenIe have a look the tail of the output only for
# performance purposes. Configure the tail length with consideredTailLength.
141
142
143
144
145
146
147
# {
#   "fitness":0.0,
#   "metadata":{
#     "someMetadataKey1":"someMetadataValue",
#     "someMetadataKeyN":"someMetadataValue"
#   }
# }
148
fitnessFunctionExecPath=sum23TestFitnessFunction.sh
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
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"},
#        ...
#      ]
# }
inputOverStdIn=false
# The tail of the fitness function output should be logged
logExecOutputTail=true
167
168
169
170
171
172
173
174
175