#This is a configuration file for Biological Complexity simulations.
#The variables specified here are read by the globals.py module for access by
#the various simulation modules. If you add or remove a variable from this file
#be sure to run global_generator.py in order to rebuild globals.py.

[global]
chem_list = [5,0]
num_organisms = 50
generation_limit = 1000
runtime_limit = 480.0
complexity_limit = 0.0
generation_length = 10000
org_step = 1000
log_step = 20
save_step = 100
termination_size = 1000000
selection_exponent = 3.0
randomseed = 0
mean_to_aggregate = 0.8

[environment]
rows = 50
columns = 50
wrap = True

#diffusion_specific
diffusion = False
diffusion_step = 1000
diffusion_coefficient = .01

# flat, gaussian
grid_type = gaussian
base_concentration = 1.0
# list of gaussians where chemicals are concentrated
# each gaussian is specified as:
#  [chemical, concentration, center, radius]
gaussians = [[0, (10, 10), 15], [1, (40, 40), 15], [2, (10, 40), 15], [3, (40, 10), 15], [4, (25, 25), 15]]

[organism]
gather_proportion = 1.0
#fitness function for each chemical. Options are:
#("log", multiplier), ("power", multiplier, exponent), ("linear", multiplier), ("root", root)
chemical_fitnesses = [("root",4),("root",4),("root",4),("root",4),("root",4)]
#'base' fitness value
fitness_scale = 1

move_speed = 10
max_moves = 2
#self or random
child_location = random
#gfc*len(genome) is subtracted from the organism's fitness
genome_fitness_cost = 0.005
protein_cost = True


[genome]
num_gather = 1
num_move = 1
num_protein = 0
copy_probability = .01
delete_probability = .01
double_probability = .01
point_mutate_chance = .002
# mode_switch_probability is the probability that a point mutation results in 
# switching to a mode codon (build, gather, or move) Otherwise, it will switch
# to a chemical codon.
mode_switch_probability = 0.03
swap_probability = .01
initial_genome_length = 40
#uniform, random
initial_genome_creation = random
min_genome_length = 20
# genome_cap_ratio*generation_length is the max genome length. 0 => no cap.
genome_cap_ratio = 0.2
max_cut_del = 30


[protein]
min_protein_length = 3
max_protein_length = 8
strong_chance = 0.03
strong_factor = 10
weak_factor = .01
range_factor = 2.0
poison_chance = .005
poison_factor = 5.0


[complex]
max_complex_length = 5
max_binding_affinity = .9
min_binding_affinity = .2
maximum_bound = .9
complex_complex_binding = False


[family]
family_binding_chance = 0.05
sibling_distance = 1
max_relation_distance = 2
#chance to start a new family if related
separation_chance = .05
mutate_factor = 1.05


[data]
tracked_ancestors = [1,3,10]

[runtime]

#recorded actions - see docs

# enter your commands here as e.g.
# gen40 = ['gv.max_complex_length=1']
# gen32 = ['some_defined_function()]

[threshold-metrics]
# This section is used only for data collection and graphing. It does not
# effect the biological properties of the model.
#
# This section allows one to record how many generations it takes a metric to 
# reach a threshold.
#
# For example, in order to keep track of the number of generations it takes
# for complexity to reach 4.0, one would specify:
#    complexity_avg = [4.0]
# This data is used to make graphs such as "generations until complexity 4".
metrics = ["complexity_avg", "genome_length_avg"]
thresholds = [[0.5, 1.0, 2.0, 3.0, 4.0, 4.5, 5.0, 5.5, 6.0], [50, 100, 150, 200, 250, 300]]