-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
192 lines (179 loc) · 4.39 KB
/
config.yaml
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
# Environment settings
width: 100
height: 100
# Agent settings
system_agents: 10
independent_agents: 10
control_agents: 10
initial_resource_level: 5
max_population: 300
starvation_threshold: 0
max_starvation_time: 15
offspring_cost: 6
min_reproduction_resources: 10
offspring_initial_resources: 5
perception_radius: 2
base_attack_strength: 2
base_defense_strength: 2
# Resource settings
initial_resources: 20
resource_regen_rate: 0.1
resource_regen_amount: 2
max_resource_amount: 30
# Agent behavior settings
base_consumption_rate: 0.1
max_movement: 8
gathering_range: 20
max_gather_amount: 3
territory_range: 30
# Agent type ratios (must sum to 1.0)
agent_type_ratios:
SystemAgent: 1.0
IndependentAgent: 0.0
ControlAgent: 0.0
# General Learning parameters
learning_rate: 0.001
gamma: 0.95
epsilon_start: 1.0
epsilon_min: 0.01
epsilon_decay: 0.995
memory_size: 2000
batch_size: 32
training_frequency: 4
dqn_hidden_size: 24
tau: 0.005
# Movement Module Parameters
move_target_update_freq: 100
move_memory_size: 10000
move_learning_rate: 0.001
move_gamma: 0.99
move_epsilon_start: 1.0
move_epsilon_min: 0.01
move_epsilon_decay: 0.995
move_dqn_hidden_size: 64
move_batch_size: 32
move_reward_history_size: 100
move_epsilon_adapt_threshold: 0.1
move_epsilon_adapt_factor: 1.5
move_min_reward_samples: 10
move_tau: 0.005
move_base_cost: -0.1
move_resource_approach_reward: 0.3
move_resource_retreat_penalty: -0.2
# Attack Module Parameters
attack_target_update_freq: 100
attack_memory_size: 10000
attack_learning_rate: 0.001
attack_gamma: 0.99
attack_epsilon_start: 1.0
attack_epsilon_min: 0.01
attack_epsilon_decay: 0.995
attack_dqn_hidden_size: 64
attack_batch_size: 32
attack_tau: 0.005
attack_base_cost: -0.2
attack_success_reward: 1.0
attack_failure_penalty: -0.3
attack_defense_threshold: 0.3
attack_defense_boost: 2.0
# Combat Parameters
starting_health: 100.0
attack_range: 20.0
attack_base_damage: 10.0
attack_kill_reward: 5.0
# Action Multipliers
attack_mult_desperate: 1.4
attack_mult_stable: 0.6
attack_starvation_threshold: 0.5
# Gathering Parameters
gather_success_reward: 0.5
gather_failure_penalty: -0.1
gather_base_cost: -0.05
gather_target_update_freq: 100
gather_memory_size: 10000
gather_learning_rate: 0.001
gather_gamma: 0.99
gather_epsilon_start: 1.0
gather_epsilon_min: 0.01
gather_epsilon_decay: 0.995
gather_dqn_hidden_size: 64
gather_batch_size: 32
gather_tau: 0.005
gather_distance_penalty_factor: 0.1
gather_resource_threshold: 0.2
gather_competition_penalty: -0.2
gather_efficiency_bonus: 0.3
# Visualization settings
visualization:
canvas_size: [400, 400]
padding: 20
background_color: "black"
max_animation_frames: 5
animation_min_delay: 50
max_resource_amount: 30
resource_colors:
glow_red: 50
glow_green: 255
glow_blue: 50
resource_size: 2
agent_radius_scale: 2
birth_radius_scale: 4
death_mark_scale: 1.5
agent_colors:
SystemAgent: "blue"
IndependentAgent: "red"
ControlAgent: "#DAA520"
min_font_size: 10
font_scale_factor: 40
font_family: "arial"
death_mark_color: [255, 0, 0]
birth_mark_color: [255, 255, 255]
metric_colors:
total_agents: "#4a90e2"
system_agents: "#50c878"
independent_agents: "#e74c3c"
control_agents: "#DAA520"
total_resources: "#f39c12"
average_agent_resources: "#9b59b6"
# Sharing Parameters
share_range: 30.0
share_target_update_freq: 100
share_memory_size: 10000
share_learning_rate: 0.001
share_gamma: 0.99
share_epsilon_start: 1.0
share_epsilon_min: 0.01
share_epsilon_decay: 0.995
share_dqn_hidden_size: 64
share_batch_size: 32
share_tau: 0.005
share_success_reward: 0.5
share_failure_penalty: -0.1
share_base_cost: -0.05
min_share_amount: 1
max_share_amount: 5
share_threshold: 0.3
share_cooperation_bonus: 0.2
share_altruism_factor: 1.2
cooperation_memory: 100 # Number of past interactions to remember
cooperation_score_threshold: 0.5 # Threshold for considering an agent cooperative
# Agent-specific parameters
agent_parameters:
SystemAgent:
gather_efficiency_multiplier: 0.4
gather_cost_multiplier: 0.4
min_resource_threshold: 0.2
share_weight: 0.3
attack_weight: 0.05
IndependentAgent:
gather_efficiency_multiplier: 0.7
gather_cost_multiplier: 0.2
min_resource_threshold: 0.05
share_weight: 0.05
attack_weight: 0.25
ControlAgent:
gather_efficiency_multiplier: 0.55
gather_cost_multiplier: 0.3
min_resource_threshold: 0.125
share_weight: 0.15
attack_weight: 0.15