Commit Β·
d3b81d6
1
Parent(s): 33a1e6b
Lower spread rate to 0.09, fix medium seeds, teach focused allocation strategy
Browse files- baseline/policy.py +12 -11
- server/constants.py +1 -1
- server/tasks/task_medium.py +1 -1
baseline/policy.py
CHANGED
|
@@ -60,20 +60,21 @@ def build_prompt(obs: CityObservation) -> str:
|
|
| 60 |
lines += [""]
|
| 61 |
|
| 62 |
if not has_data_lag:
|
| 63 |
-
# Easy and medium: data is accurate, allocate reduces existing infection
|
| 64 |
lines += [
|
| 65 |
"HOW ACTIONS WORK:",
|
| 66 |
-
" - 'allocate': costs 1 resource
|
| 67 |
-
" - 'restrict': FREE
|
| 68 |
-
" -
|
| 69 |
"",
|
| 70 |
-
"
|
| 71 |
-
"1. If ANY hospital
|
| 72 |
-
"2.
|
| 73 |
-
"3.
|
| 74 |
-
"4.
|
| 75 |
-
"
|
| 76 |
-
"
|
|
|
|
|
|
|
| 77 |
]
|
| 78 |
else:
|
| 79 |
# Hard task: data is 3 days old, act on growth_hint
|
|
|
|
| 60 |
lines += [""]
|
| 61 |
|
| 62 |
if not has_data_lag:
|
|
|
|
| 63 |
lines += [
|
| 64 |
"HOW ACTIONS WORK:",
|
| 65 |
+
" - 'allocate': costs 1 resource. REDUCES existing infection AND slows spread.",
|
| 66 |
+
" - 'restrict': FREE. Only slows spread. Does NOT reduce existing infection.",
|
| 67 |
+
" - Resources replenish by 1 each step but cannot exceed starting pool.",
|
| 68 |
"",
|
| 69 |
+
"STRATEGY β follow this decision tree exactly:",
|
| 70 |
+
"1. If ANY hospital < 0.3 capacity β 'allocate' on that district immediately.",
|
| 71 |
+
"2. Find the district with HIGHEST infection rate.",
|
| 72 |
+
"3. If it is above 0.2 and you have resources β 'allocate' on it.",
|
| 73 |
+
"4. Keep allocating to the SAME district on the NEXT step too.",
|
| 74 |
+
" Only switch when that district drops below 0.2 (safe).",
|
| 75 |
+
"5. If resources = 0 β 'restrict' on the highest infected district.",
|
| 76 |
+
"6. NEVER use 'test' β data is real-time and accurate.",
|
| 77 |
+
"7. NEVER restrict a district below 0.2 β you will be penalised.",
|
| 78 |
]
|
| 79 |
else:
|
| 80 |
# Hard task: data is 3 days old, act on growth_hint
|
server/constants.py
CHANGED
|
@@ -43,7 +43,7 @@ HOSPITAL_BREACH_POINT = 0.00
|
|
| 43 |
# ββ Spread Mechanics ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 44 |
|
| 45 |
SPREAD_RATE_MIN = 0.05 # Slowest possible spread rate per day
|
| 46 |
-
SPREAD_RATE_MAX = 0.
|
| 47 |
GROWTH_HINT_NOISE = 0.03 # Noise on growth_rate_hint (Β± value)
|
| 48 |
|
| 49 |
TREATMENT_REDUCTION = 0.10 # Allocating reduces existing infection this step
|
|
|
|
| 43 |
# ββ Spread Mechanics ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 44 |
|
| 45 |
SPREAD_RATE_MIN = 0.05 # Slowest possible spread rate per day
|
| 46 |
+
SPREAD_RATE_MAX = 0.09 # Fastest possible spread rate per day
|
| 47 |
GROWTH_HINT_NOISE = 0.03 # Noise on growth_rate_hint (Β± value)
|
| 48 |
|
| 49 |
TREATMENT_REDUCTION = 0.10 # Allocating reduces existing infection this step
|
server/tasks/task_medium.py
CHANGED
|
@@ -23,7 +23,7 @@ class MediumTask(BaseTask):
|
|
| 23 |
# D1 and D3 start clean but will grow into critical within 3-4 steps.
|
| 24 |
# 8 total resources for 4 districts creates genuine triage pressure β
|
| 25 |
# agent cannot save all districts and must choose strategically.
|
| 26 |
-
seed_infections = [0.28, 0.
|
| 27 |
|
| 28 |
return CityState(
|
| 29 |
day = 0,
|
|
|
|
| 23 |
# D1 and D3 start clean but will grow into critical within 3-4 steps.
|
| 24 |
# 8 total resources for 4 districts creates genuine triage pressure β
|
| 25 |
# agent cannot save all districts and must choose strategically.
|
| 26 |
+
seed_infections = [0.28, 0.05, 0.25, 0.05]
|
| 27 |
|
| 28 |
return CityState(
|
| 29 |
day = 0,
|