-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimulation_config.yml
67 lines (65 loc) · 2.88 KB
/
simulation_config.yml
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
# configuration file for the actor-critic PPM
# DESCRIPTION -----------------------------------------------------------------
# - metabolism: a dict introduced with the GridOrientedPPM Model. It contains
# a dict for each species in the model (in the same order as in
# densities). The dict contents are: {Amount of food_reserve reduced
# per timestep, amount of fr gained from eating, amount of fr lost due to
# giving birth}
Model:
dim: !!python/tuple [10, 10] # dimensionality
densities: !!python/tuple [0.01, 0.01] # Predator, Prey
food_reserve: 0
max_food_reserve: 8
metabolism: # see description!
OrientedPredator:
fast: 0.25 # decrease every timestep
satiety: 3 # get for eating
exhaust: 3 # for mating
OrientedPrey:
fast: 1
satiety: 2
exhaust: 3
generation: 0
neighbourhood: 49 # only squares of odd numbers, e.g. 9, 25, 49
p_breed: 0.4
p_flee: 0.4
p_eat: 0.6 # = 1-p_flee
mortality: False # if False, agents are immortal, can't starve
instadeath: 0.005 # for predators; if there is more than 1 predator, each predator can die with that probability
rewards:
wrong_action: -1
default_prey: 1
default_predator: 1
indifferent: 0
succesful_predator: 5
offspring: 20
death_starvation: -5
death_prey: -5
default: 1
instadeath: 0
Sim:
goal: "training" # or "testing"; trainig is regular usage, testing is without using memory/history and without optimization
steps: 1000 # training with more than 1000 timesteps reeeeeeeally slows down the optimization
episodes: 10000
save_state_to: "plots/newtest/" # store simulation
resume_state_from: "" # resume but is also command line option
record_values: "generation, reward"
save_state_every: 2 # episodes
Plot:
every: 100
render: False
filepath: "plots/newtest/"
figsize: !!python/tuple [9,12]
fmt: "png"
dpi: 150
Network:
kind: 'fc' # fully connected without any conv layers
mode: 'cpu' # can also be 'gpu'
layers: # I still need a convenient way to describe this
input: !!python/tuple [50, 40] # Model -> neighbourhood + 1
hidden1: !!python/tuple [40, 40]
hidden2: !!python/tuple [40, 40]
hidden3: !!python/tuple [40, 40]
action_head: !!python/tuple [40, 27]
value_head: !!python/tuple [40, 1]
gamma: 0.9 # discount factor