-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbiosimrust.ini
More file actions
410 lines (354 loc) · 19.1 KB
/
biosimrust.ini
File metadata and controls
410 lines (354 loc) · 19.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# biosimrust.ini
# This is the default config file for BiosimRust (the Rust version of the simulator).
# The config filename is determined in simulator() in simulator.rs.
# The config file is parsed by ParamManager, see params.rs.
# Although not foolproof, the config file can be modified during a simulation
# run and the param manager will make any new params available to the simulator
# after the end of the current simulator step or after the end of the current
# generation.
#
# Parameter values can also be changed automatically based on the current generation
# number of the simulation using the syntax (see barriertype param for example):
# <parameterName>@<generationNumber> = <newValue>
# Instances of the same parameter have to be ascending by generation number to work
# correctly, e.g. barriertype@100 must be later in the file than barriertype@50,
# which in turn must come after barriertype. Not all parameters can be safely
# changed during a simulation. Some restrictions are noted below.
# numthreads must be 1 or greater. Best value is less than or equal to
# the number of CPU cores. Cannot be changed after a simulation starts.
numthreads = 16
# sizex, sizey define the size of the 2D world. Minimum size is 16,16.
# Maximum size is 32767, 32767. Cannot be changed after a simulation starts.
sizex = 128
sizey = 128
# population at the start of each generation. Maximum value = 32766.
# Cannot be changed after a simulation starts.
# BASELINE TEST: Reduced to 500 for faster speciation testing
population = 3000
# Number of simulation steps per generation. Range 1..INT_MAX.
stepspergeneration = 300
# The simulator will stop when the generation number == maxgenerations.
# Range 1..INT_MAX
# BASELINE TEST: Reduced to 500 generations for initial speciation testing
maxgenerations = 2000
# genomeinitiallengthmin and genomeinitiallengthmax should be set to
# the same value. (For future use, the max length might be larger to
# allow mutations that lengthen the genome.) Range 1..INT_MAX and
# must be no larger than genomemaxlength. The range of genomemaxlength
# is genomeinitiallengthmax..INT_MAX. Cannot be changed after a
# simulation starts.
genomeinitiallengthmin = 24
genomeinitiallengthmax = 24
genomemaxlength = 300
# maxnumberneurons is the maximum number of internal neurons that may
# be addressed by genes in the genome. Range 1..INT_MAX. Cannot be
# changed after a simulation starts. Cannot be changed after a
# simulation starts.
maxnumberneurons = 28
# If killenable is true and the "kill" action neuron is enabled in
# sensors-actions.h and compiled in, then agents are permitted to
# kill their neighbor in the adjacent location in the direction of
# forward movement. If false, the neighbors are safe.
killenable = true
# killkinprotection reduces the probability of killing genetically similar individuals.
# Range 0.0..1.0. Higher values = stronger protection against killing kin.
# 0.0 = no protection (identical genomes can kill each other)
# 1.0 = maximum protection (identical genomes never kill each other)
# Formula: adjusted_kill_prob = base_kill_prob * (1.0 - genetic_similarity * killkinprotection)
# Recommended: 0.5 to 0.9 for biological realism. Default: 0.8
# Higher values (0.8-0.9) provide strong kin protection, significantly reducing kills
# among related individuals as genetic diversity decreases.
killkinprotection = 0.9
# If sexualreproduction is false, newborns inherit the genes from a
# single parent. If true, newborns inherit a mixture of genes from
# two parents.
sexualreproduction = true
# If chooseparentbyfitness is false, then every agent that survives the
# selection criterion has equal chance of reproducing. If true, then
# preference is given to those parents who passed the selection criterion
# with a greater score. Fitness scores are determined in survival-criteria.cpp.
chooseparentsbyfitness = true
# pointmutationrate is the probability per gene of having a single-bit
# mutation during spawning. Range 0.0 .. 1.0. A reasonable range is
# 0.0001 to 0.01.
# Increased to 0.02 to promote genetic exploration and prevent premature convergence
pointmutationrate = 0.02
# geneinsertiondeletionrate is the probability per genome of having a gene
# inserted or deleted during reproduction. Range 0.0 .. 1.0.
# A reasonable range is 0.0001 to 0.01. Set to 0.0 to disable.
# For variable-length genome testing, 0.01 provides controlled, gradual changes.
# Increased to 0.02 to promote genetic exploration and prevent premature convergence
# deletionratio is the probability that a mutation will be a deletion vs insertion.
# Range 0.0 .. 1.0. 0.5 means equal chance of insertion or deletion.
# Note: Insertion probability automatically scales down as genome length increases.
geneinsertiondeletionrate = 0.02
deletionratio = 0.5
# fitnesslengthnormalization normalizes fitness scores by genome length to prevent
# selection pressure favoring longer genomes. Formula: normalized_score = score / (1 + beta * length)
# Range 0.0 .. 1.0. Higher values = stronger penalty for longer genomes.
# Reduced to 0.001 to minimize artificial constraints - metabolic costs (Phase 2) will provide natural regularization
# Default: 0.001 (minimal penalty)
fitnesslengthnormalization = 0.001
# allowduplicateconnections enables copy number effects by allowing duplicate connections
# in the neural network phenotype. When true, multiple genes encoding the same connection
# (source-sink pair) will create multiple parallel synapses, naturally summing their
# contributions during feed-forward. This models biological gene dosage effects.
# When false, duplicates are merged by summing weights (legacy behavior).
# Default: true (enabled for biological realism)
allowduplicateconnections = true
# Phase 2: Metabolic Regularization Parameters
# These parameters control energy-based fitness and natural genome length constraints
# metaboliccostpersynapse is the static maintenance cost per synapse per simulation step.
# Larger networks (more synapses) incur higher maintenance costs.
# Range: 0.0 .. 1.0. Recommended: 0.0001 to 0.001
# MODERATE TUNING: Increased 10x from default to create meaningful trade-off
# Default: 0.0001 (very small cost per synapse)
metaboliccostpersynapse = 0.001
# metaboliccostperspike is the dynamic signaling cost per neuron activation (spike).
# More active networks consume more energy.
# Range: 0.0 .. 1.0. Recommended: 0.00001 to 0.0001
# MODERATE TUNING: Increased 10x from default to create meaningful trade-off
# Default: 0.00001 (very small cost per activation)
metaboliccostperspike = 0.0001
# energyrewardpersuccess is the energy reward for surviving a generation.
# This helps successful individuals maintain energy levels.
# Range: >= 0.0. Recommended: 0.05 to 0.2
# MODERATE TUNING: Set to 0.0 to increase cost pressure (no reward offsets)
# Default: 0.1 (modest reward for survival)
energyrewardpersuccess = 0.0
# Phase 3: Homeostatic Plasticity Parameters
# Homeostatic plasticity stabilizes neural networks after duplication events
# by adjusting connection weights to maintain target firing rates.
# homeostasisenabled enables/disables homeostatic plasticity mechanisms.
# When enabled, neurons adjust their incoming connection weights to maintain
# a target firing rate, preventing network instability after gene duplications.
# Range: true or false. Default: true
homeostasisenabled = true
# homeostasisalpha is the learning rate for homeostatic weight adjustments.
# Higher values cause faster adaptation but may be less stable.
# Range: 0.0 to 1.0. Recommended: 0.001 to 0.1. Default: 0.01
homeostasisalpha = 0.01
# targetfiringrate is the target firing rate for neurons (as fraction of steps).
# Neurons will adjust their incoming weights to maintain this firing rate.
# Range: 0.0 to 1.0. Recommended: 0.05 to 0.2. Default: 0.1 (10% of steps)
targetfiringrate = 0.1
# firingratewindow is the window size for calculating moving average firing rates.
# Larger windows provide more stable estimates but respond slower to changes.
# Range: 1 to 10000. Recommended: 50 to 500. Default: 100
firingratewindow = 100
# nsga2enabled enables NSGA-II (Non-dominated Sorting Genetic Algorithm II)
# multi-objective selection. When enabled, parents are selected based on
# multiple objectives: survival score, metabolic efficiency, and genetic diversity.
# This helps maintain population diversity while selecting for performance.
# Phase 5: Multi-objective optimization for diversity preservation.
# Range: true or false. Default: false
nsga2enabled = true
# Phase 4.3: Dendritic Integration
# Enable dendritic computation for biological realism
# Dendritic integration applies non-linear computation to groups of synapses (dendrites)
# This models how real neurons integrate inputs from different dendritic branches
# Range: true or false. Default: false
dendritickenabled = true
# Integration exponent for excitatory inputs (1.0=linear, 2.0=quadratic, 0.5=sublinear)
# Quadratic (2.0) creates cooperative effects: multiple inputs amplify each other
# Sublinear (0.5) creates saturating effects: diminishing returns with more inputs
# Range: 0.1 to 10.0. Default: 2.0
dendriticexponent = 2.0
# Use different exponents for excitatory vs inhibitory inputs
# When true, excitatory uses dendriticexponent, inhibitory uses dendriticinhibitoryexponent
# Range: true or false. Default: true
dendriticseparateexcitatoryinhibitory = true
# Integration exponent for inhibitory inputs (typically sublinear for saturation)
# Range: 0.1 to 10.0. Default: 0.5
dendriticinhibitoryexponent = 0.5
# Phase 6: Speciation (NEAT-style) - TUNED CONFIGURATION
# Enable speciation to protect variable-length innovations
# Organisms are grouped into species based on genetic compatibility distance
# This allows innovative structures (like large genomes from duplication events) to compete
# within their species rather than being outcompeted by lean, optimized ancestors
# Parameters tuned based on 2000-generation analysis to encourage more dynamic speciation
# Range: true or false. Default: false
speciationenabled = true
# Compatibility distance threshold for same species (lower = more species, higher = fewer species)
# Based on NEAT algorithm: organisms with distance <= threshold are in same species
# FIXED: Was set to 0.1 (way too low, causing 10,000+ species). Set to 2.5 (baseline value).
# Range: 0.1 to 100.0. Default: 3.0
# Recommended: 2.0-3.0 for balanced speciation
compatibilitythreshold = 1.8
# Coefficients for compatibility distance calculation (NEAT algorithm)
# Formula: δ = (c1*E/N) + (c2*D/N) + (c3*W)
# where E=excess genes, D=disjoint genes, W=weight difference, N=longer genome length
# BASELINE TEST: Using NEAT defaults for standard behavior
# Range: 0.0 to 10.0. Default: 1.0
excesscoefficient = 1.0
# Range: 0.0 to 10.0. Default: 1.0
disjointcoefficient = 1.0
# Range: 0.0 to 10.0. Default: 0.4
weightcoefficient = 0.4
# Species management parameters
# Generations without improvement before species becomes extinct
# TUNED: Reduced from 10 to 6 for more aggressive culling of stagnant species
# Range: 1 to 1000. Default: 15
speciesstagnationthreshold = 15
# Minimum number of members required to keep species alive
# BASELINE TEST: Keep at 1 to allow small innovative species to survive
# Range: 1 to 100. Default: 1
minspeciessize = 1
# Maximum number of members per species (enforced by culling)
# TUNED: Increased from 100 to 150 since one species was consistently hitting the limit
# Range: 1 to 10000. Default: 50
maxspeciessize = 100
# Fraction of species members to preserve as elite (top performers)
# BASELINE TEST: Using default 0.2 (20% elite preservation)
# Range: 0.0 to 1.0. Default: 0.2
specieselitefraction = 0.2
# responsivenesscurvekfactor is a small positive integer that determines
# the shape of the curve that determines how reactive an agent is to its
# sensory inputs. Typical values are # 1, 2, 3, or 4, but greater values
# are allowed experimentally.
responsivenesscurvekfactor = 2
# populationsensorradius is the radius in which the population sensor
# looks for neighbors. Floating point value. A value of 1.5 includes
# all the immediate eight-neighborhood. Larger values incur exponentially
# increasing processor overhead. Range 0.5 up to (float)max(sizex, sizey).
populationsensorradius = 2.5
# longprobedistance is the default distance that the long-probe sensors
# are able to see. Applies to long-probe population sensor and long-probe
# signal (pheromone) sensor. Range 1..INT_MAX.
longprobedistance = 16
# shortprobebarrierdistance is the distance that the short-probe sensor
# can see. Range 1..INT_MAX.
shortprobebarrierdistance = 4
# signalsensorradius is the radius in which the signal (pheromone) sensor
# looks for pheromones. Floating point value. A value of 1.5 includes
# all the immediate eight-neighborhood. Larger values incur exponentially
# increasing processor overhead. Range 0.5 up to (float)max(sizex, sizey).
signalsensorradius = 2.0
# signallayers defines the number of pheromone layers. Must be 1 for now.
# Values > 1 are for future use. Cannot be changed after a simulation starts.
signallayers = 1
# imagedir is the relative or absolute directory path where generation
# movies are created.
imagedir = images
# logdir is the relative or absolute directory path where text log files
# are created.
logdir = logs
# displayscale scales the generation movie. Typical values are
# 1 for actual size, or 2, 4, 8, 16, or 32 to scale up the movie.
displayscale = 8
# agentsize controls the size of the dot used to represent an agent
# in the generation movie. Typical value is displayscale / 2.
agentsize = 4
# displayenabled controls whether to show a real-time display window
# during simulation. If true, a window will open showing the simulation
# as it runs. If false, only video files will be generated.
displayenabled = false
# If displaychallengearea is true, the simulator will draw colored outlines
# showing the survival challenge areas (circles, lines, borders, etc.)
# based on the current challenge setting.
displaychallengearea = true
# displaychallengeareaopacity controls the opacity of the challenge area outlines.
# Range 0.0 (fully transparent) to 1.0 (fully opaque). Default 0.5.
displaychallengeareaopacity = 1.0
# displaychallengeareacolor sets the RGB color of the challenge area outlines.
# Format: R,G,B where each value is 0-255. Default is "255,255,0" (yellow).
# Examples: "255,0,0" (red), "0,255,0" (green), "0,0,255" (blue), "255,255,255" (white)
displaychallengeareacolor = 255,0,0
# If videosavefirstframes is 0, then only the parameter videostride controls
# how often generation movies are made. If videosavefirstframes is nonzero,
# then generation movies will also be generated for every generation from 0
# through videosavefirstframes (because the first few generations are often
# the most interesting). Range 1..INT_MAX.
videosavefirstframes = 25
# updategraphlog can be set to true to cause the simulator program to
# invoke graphlog.gp to update the simulation progress graph. If true,
# then updategraphlogstride controls how often it is invoked. If
# updategraphlog is false, then the simulator program will not invoke
# graphlog.gp.
updategraphlog = true
# If savevideo is true, the simulator program will create generation
# movies in the directory named by imagedir at the intervals set by
# videosavefirstframes and videostride.
# Note: PNG frame files are automatically saved when savevideo is true
# (required for ffmpeg video generation).
# BASELINE TEST: Disable video to speed up testing
savevideo = true
# videostride determines how often generation movies will be created.
# Also see savevideo and videosavefirstframes. Range 1..INT_MAX.
videostride = 25
# videoframerate controls the playback speed of generated videos.
# Higher values (e.g., 60) make shorter, faster videos.
# Lower values (e.g., 10) make longer, slower videos.
# Typical values: 15-30 fps. Range 1..120.
videoframerate = 25
# updategraphlogstride determines how often the simulation progress graph
# is updated by direct invocation of graphlog.gp. Ignored if updategraphlog
# is false. updategraphlogstride may be a positive integer from 1 to INT_MAX,
# or may be set to the string videostride to use the value of videostride.
updategraphlogstride = videostride
# genomeanalysisstride determines how often the simulator will print genomic
# statistics. The stats are printed to stdout when the generation number
# modulo genomeanalysisstride == 0. The value may be a positive integer from
# 1 to INT_MAX, or may be set to the string videostride to use the value of
# videostride.
# BASELINE TEST: Print every 10 generations to track speciation effects more frequently
genomeanalysisstride = 10
# When the genomic statistics are printed (see genomeanalysisstride), the
# method used to measure genome diversity in the population is determined
# by genomecomparisonmethod. May be set to 0 for Jaro-Winkler method (useful
# for variable-length genomes that can grow or shrink in size); or 1
# for a Hamming measure bit-by-bit, or 2 for a Hamming measure byte-by-byte.
# Set to 0 for variable-length genome testing (required when geneinsertiondeletionrate > 0.0).
genomecomparisonmethod = 0
# When genomic statistics are printed (see genomeanalysisstride), the number
# of genomes sampled from the population and printed to stdout is determined
# by displaysamplegenomes. Range 0 to population size.
displaysamplegenomes = 5
# challenge determines the selection criterion for reproduction. This is
# typically always under active development. See survival-criteria.rs for
# more information.
# 0 = circle
# 1 = right half
# 2 = right quarter
# 3 = neighbor count
# 4 = center weighted
# 40 = center unweighted
# 5 = corner 1/4 radius
# 6 = corner 1/4 radius weighted
# 7 = migrate distance
# 8 = center sparse
# 9 = left eighth
# 10 = radioactive walls (Left side then Right side)
# 11 = against any wall
# 12 = touch any wall any time
# 13 = east-west eighths
# 14 = near barrier
# 15 = pairs
# 16 = contact location sequence
# 17 = altruism, circle + NE corner
challenge = 5
# The simulator supports a feature called "barriers." Barriers are locations
# in the simulated 2D world where agents may not occupy. The value of
# barriertype is typically under active development. See createBarrier.rs
# for more information.
# 0 = none
# 1 = vertical bar constant location
# 2 = vertical bar random locations
# 3 = five staggered vertical bars
# 4 = horiz bar constant location north center
# 5 = floating islands
# 6 = sequence of spots
barriertype = 0
# This is an example of an automatic parameter change based on the generation.
# If uncommented, the barrier type will automatically change to the new value
# when the simulation reaches the generation specified after the @ delimiter.
# barriertype@500 = 5
# If true, then the random number generator (RNG) will be seeded by the value
# in rngseed, causing each thread to receive a deterministic sequence from
# the RNG. If false, the RNG will be randomly seeded and program output will
# be non-deterministic. Cannot be changed after a simulation starts.
deterministic = false
# If deterministic is true, the random number generator will be seeded with
# this value. If deterministic is false, this value is ignored. Legal values
# are integers 0 to 4294967295. Cannot be changed after a simulation starts.
rngseed = 12345678