RohitChandramouli6618 commited on
Commit
bf35524
Β·
1 Parent(s): 455b146

Fix 1-step termination bug, fix done field in trajectory, recalibrate seeds

Browse files
server/constants.py CHANGED
@@ -46,7 +46,7 @@ HOSPITAL_BREACH_POINT = 0.00 # At or below this β†’ hospital has collapsed
46
  SPREAD_RATE_MIN = 0.04 # Slowest possible true spread rate per day
47
  SPREAD_RATE_MAX = 0.15 # Fastest possible true spread rate per day
48
  GROWTH_HINT_NOISE = 0.03 # Random noise added to growth_rate_hint (Β± value)
49
- TREATMENT_REDUCTION = 0.10 # Allocating also reduces existing infection
50
  ALLOCATE_REDUCTION = 0.10 # How much one 'allocate' reduces spread this step
51
  RESTRICT_REDUCTION = 0.05 # How much one 'restrict' reduces spread per step
52
  SPILLOVER_RATE = 0.01 # Fraction of infection that spreads to adjacent districts per day
 
46
  SPREAD_RATE_MIN = 0.04 # Slowest possible true spread rate per day
47
  SPREAD_RATE_MAX = 0.15 # Fastest possible true spread rate per day
48
  GROWTH_HINT_NOISE = 0.03 # Random noise added to growth_rate_hint (Β± value)
49
+ TREATMENT_REDUCTION = 0.06 # Allocating also reduces existing infection
50
  ALLOCATE_REDUCTION = 0.10 # How much one 'allocate' reduces spread this step
51
  RESTRICT_REDUCTION = 0.05 # How much one 'restrict' reduces spread per step
52
  SPILLOVER_RATE = 0.01 # Fraction of infection that spreads to adjacent districts per day
server/environment.py CHANGED
@@ -176,7 +176,7 @@ class EpidemicContainmentEnv(Environment):
176
  "total_steps": result.total_steps,
177
  "task_name": self._task_name,
178
  }
179
-
180
  # ── 11. Build and return observation ──────────────────────────────────
181
  final_message = terminal_message if terminal_message else message
182
 
 
176
  "total_steps": result.total_steps,
177
  "task_name": self._task_name,
178
  }
179
+ self._trajectory[-1].done = True
180
  # ── 11. Build and return observation ──────────────────────────────────
181
  final_message = terminal_message if terminal_message else message
182
 
server/tasks/task_hard.py CHANGED
@@ -29,7 +29,7 @@ class HardTask(BaseTask):
29
  # All districts start with small infections that grow at different rates.
30
  # The 3-day lag means the agent won't see today's true rates until day 3.
31
  # Districts with high true_spread_rate will accelerate invisibly.
32
- seed_infections = [0.07, 0.05, 0.08, 0.04, 0.10, 0.06]
33
 
34
  # Pre-populate infection_history with 3 days of identical
35
  # starting values so the lag mechanic works from step 1.
 
29
  # All districts start with small infections that grow at different rates.
30
  # The 3-day lag means the agent won't see today's true rates until day 3.
31
  # Districts with high true_spread_rate will accelerate invisibly.
32
+ seed_infections = [0.12, 0.08, 0.14, 0.06, 0.16, 0.09]
33
 
34
  # Pre-populate infection_history with 3 days of identical
35
  # starting values so the lag mechanic works from step 1.
server/tasks/task_medium.py CHANGED
@@ -28,7 +28,7 @@ class MediumTask(BaseTask):
28
  # Districts 0 and 2 are seeded with outbreaks (non-adjacent).
29
  # Districts 1 and 3 are clean but will receive spillover.
30
  # Agent must choose which outbreak to tackle first.
31
- seed_infections = [0.12, 0.03, 0.10, 0.03]
32
 
33
  return CityState(
34
  day = 0,
 
28
  # Districts 0 and 2 are seeded with outbreaks (non-adjacent).
29
  # Districts 1 and 3 are clean but will receive spillover.
30
  # Agent must choose which outbreak to tackle first.
31
+ seed_infections = [0.25, 0.06, 0.22, 0.06]
32
 
33
  return CityState(
34
  day = 0,