paramjitbaral commited on
Commit
61d594c
·
verified ·
1 Parent(s): 2a9f878

Upload folder using huggingface_hub

Browse files
app/environment/core.py CHANGED
@@ -30,6 +30,9 @@ TASKS = {
30
  },
31
  }
32
 
 
 
 
33
  OUTCOME_SCORE = {"accepted": 3, "partial": 2, "rejected": 1}
34
  CONDITION_ORDER = ["stable", "serious", "unstable", "critical"]
35
 
@@ -94,8 +97,8 @@ class EmergencyEnv:
94
  selected_hospital_id=None,
95
  done=False,
96
  final_outcome=None,
97
- reward=0.0,
98
- final_score=0.0,
99
  ambulance_status="en_route",
100
  current_location_context="incident_site",
101
  visited_hospitals=[],
@@ -120,14 +123,14 @@ class EmergencyEnv:
120
  task_id=resolved_task_id,
121
  difficulty=difficulty,
122
  objective=TASKS[resolved_task_id]["objective"],
123
- progress_score=0.0,
124
  reward_model=RewardModel(
125
- value=0.0,
126
  breakdown=RewardBreakdown(
127
- survival_component=0.0,
128
- time_efficiency_component=0.0,
129
- specialization_component=0.0,
130
- delay_penalty=0.0,
131
  ),
132
  ),
133
  grader=None,
@@ -152,7 +155,7 @@ class EmergencyEnv:
152
  info = self.last_info.model_dump() if self.last_info else {}
153
  return {
154
  "observation": self._build_observation(),
155
- "reward": 0.0,
156
  "done": True,
157
  "info": info,
158
  }
@@ -439,14 +442,14 @@ class EmergencyEnv:
439
  - traffic_penalty
440
  - hidden_case_penalty
441
  )
442
- reward = max(0.0, min(1.0, reward))
443
 
444
  breakdown = RewardBreakdown(
445
- survival_component=max(0.0, min(1.0, (status_reward + 0.5) / 1.5)),
446
- time_efficiency_component=max(0.0, min(1.0, 1.0 - (travel_time / 25.0))),
447
- specialization_component=(1.0 if self._specialization_match(selected) else 0.4),
448
  delay_penalty=min(
449
- 1.0,
450
  unknown_critical_penalty
451
  + repeat_penalty
452
  + failed_repeat_penalty
@@ -1103,19 +1106,19 @@ class EmergencyEnv:
1103
  if not self.trajectory:
1104
  return 0.0
1105
  raw = sum(float(t["reward"]) for t in self.trajectory) / len(self.trajectory)
1106
- return max(0.0, min(1.0, raw))
1107
 
1108
  def _failure_score(self) -> float:
1109
  assert self.state_data is not None
1110
  progress_component = self._progress_score()
1111
- reward_component = max(0.0, min(1.0, self.state_data.reward))
1112
  score = 0.15 + (0.35 * reward_component) + (0.25 * progress_component)
1113
  return max(0.1, min(0.85, score))
1114
 
1115
  def _success_score(self) -> float:
1116
  assert self.state_data is not None
1117
  progress_component = self._progress_score()
1118
- reward_component = max(0.0, min(1.0, self.state_data.reward))
1119
  total_steps = max(1, len(self.trajectory))
1120
  rejected_steps = sum(1 for item in self.trajectory if item.get("outcome_status") == "rejected")
1121
  route_quality = max(0.0, 1.0 - (rejected_steps / total_steps))
 
30
  },
31
  }
32
 
33
+ MIN_REWARD = 0.001
34
+ MAX_REWARD = 0.999
35
+
36
  OUTCOME_SCORE = {"accepted": 3, "partial": 2, "rejected": 1}
37
  CONDITION_ORDER = ["stable", "serious", "unstable", "critical"]
38
 
 
97
  selected_hospital_id=None,
98
  done=False,
99
  final_outcome=None,
100
+ reward=MIN_REWARD,
101
+ final_score=MIN_REWARD,
102
  ambulance_status="en_route",
103
  current_location_context="incident_site",
104
  visited_hospitals=[],
 
123
  task_id=resolved_task_id,
124
  difficulty=difficulty,
125
  objective=TASKS[resolved_task_id]["objective"],
126
+ progress_score=MIN_REWARD,
127
  reward_model=RewardModel(
128
+ value=MIN_REWARD,
129
  breakdown=RewardBreakdown(
130
+ survival_component=MIN_REWARD,
131
+ time_efficiency_component=MIN_REWARD,
132
+ specialization_component=MIN_REWARD,
133
+ delay_penalty=MIN_REWARD,
134
  ),
135
  ),
136
  grader=None,
 
155
  info = self.last_info.model_dump() if self.last_info else {}
156
  return {
157
  "observation": self._build_observation(),
158
+ "reward": MIN_REWARD,
159
  "done": True,
160
  "info": info,
161
  }
 
442
  - traffic_penalty
443
  - hidden_case_penalty
444
  )
445
+ reward = max(MIN_REWARD, min(MAX_REWARD, reward))
446
 
447
  breakdown = RewardBreakdown(
448
+ survival_component=max(MIN_REWARD, min(MAX_REWARD, (status_reward + 0.5) / 1.5)),
449
+ time_efficiency_component=max(MIN_REWARD, min(MAX_REWARD, 1.0 - (travel_time / 25.0))),
450
+ specialization_component=(MAX_REWARD if self._specialization_match(selected) else 0.4),
451
  delay_penalty=min(
452
+ MAX_REWARD,
453
  unknown_critical_penalty
454
  + repeat_penalty
455
  + failed_repeat_penalty
 
1106
  if not self.trajectory:
1107
  return 0.0
1108
  raw = sum(float(t["reward"]) for t in self.trajectory) / len(self.trajectory)
1109
+ return max(MIN_REWARD, min(MAX_REWARD, raw))
1110
 
1111
  def _failure_score(self) -> float:
1112
  assert self.state_data is not None
1113
  progress_component = self._progress_score()
1114
+ reward_component = max(MIN_REWARD, min(MAX_REWARD, self.state_data.reward))
1115
  score = 0.15 + (0.35 * reward_component) + (0.25 * progress_component)
1116
  return max(0.1, min(0.85, score))
1117
 
1118
  def _success_score(self) -> float:
1119
  assert self.state_data is not None
1120
  progress_component = self._progress_score()
1121
+ reward_component = max(MIN_REWARD, min(MAX_REWARD, self.state_data.reward))
1122
  total_steps = max(1, len(self.trajectory))
1123
  rejected_steps = sum(1 for item in self.trajectory if item.get("outcome_status") == "rejected")
1124
  route_quality = max(0.0, 1.0 - (rejected_steps / total_steps))
app/server/app.py CHANGED
@@ -14,6 +14,7 @@ MEMORY_FILE = ROOT / "data" / "learning_memory.json"
14
 
15
  app = FastAPI(title="Adaptive Crisis Decision Environment", version="1.0.0")
16
  env = ACDEEnvironment(memory_file=str(MEMORY_FILE))
 
17
 
18
 
19
  class ResetRequest(BaseModel):
@@ -55,7 +56,7 @@ def reset(payload: ResetRequest | None = None) -> StepResponse:
55
  task_id = payload.task_id if payload else None
56
  obs = env.reset(seed=seed, task_id=task_id)
57
  info = env.last_info.model_dump() if env.last_info else {}
58
- return StepResponse(observation=obs, reward=0.0, done=False, info=info)
59
 
60
 
61
  @app.post("/step", response_model=StepResponse)
 
14
 
15
  app = FastAPI(title="Adaptive Crisis Decision Environment", version="1.0.0")
16
  env = ACDEEnvironment(memory_file=str(MEMORY_FILE))
17
+ MIN_REWARD = 0.001
18
 
19
 
20
  class ResetRequest(BaseModel):
 
56
  task_id = payload.task_id if payload else None
57
  obs = env.reset(seed=seed, task_id=task_id)
58
  info = env.last_info.model_dump() if env.last_info else {}
59
+ return StepResponse(observation=obs, reward=MIN_REWARD, done=False, info=info)
60
 
61
 
62
  @app.post("/step", response_model=StepResponse)
data/learning_archive.json CHANGED
@@ -7036,6 +7036,197 @@
7036
  "best_scenario_name": "Mass Cardiac Event (Overload)",
7037
  "best_difficulty": "hard",
7038
  "best_required_specialization": "cardiac"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7039
  }
7040
  },
7041
  "episodes": [
@@ -8785,6 +8976,94 @@
8785
  "H4"
8786
  ],
8787
  "timestamp": "2026-04-09T04:31:28.103177+00:00"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8788
  }
8789
  ]
8790
  }
 
7036
  "best_scenario_name": "Mass Cardiac Event (Overload)",
7037
  "best_difficulty": "hard",
7038
  "best_required_specialization": "cardiac"
7039
+ },
7040
+ "123|acde_easy": {
7041
+ "attempts": 2,
7042
+ "best_score": 0.99,
7043
+ "best_actions": [
7044
+ "H1"
7045
+ ],
7046
+ "best_steps": 1,
7047
+ "step_stats": {
7048
+ "1": {
7049
+ "H1": {
7050
+ "count": 2,
7051
+ "success": 2,
7052
+ "accepted": 2,
7053
+ "partial": 0,
7054
+ "rejected": 0,
7055
+ "total_reward": 1.999,
7056
+ "avg_reward": 0.9995,
7057
+ "last_status": "ACCEPTED",
7058
+ "last_reason": "Patient admitted and treatment began",
7059
+ "success_rate": 1.0
7060
+ }
7061
+ }
7062
+ },
7063
+ "last_score": 0.99,
7064
+ "last_success": true,
7065
+ "last_run_at": "2026-04-09T04:44:42.938335+00:00",
7066
+ "last_actions": [
7067
+ "H1"
7068
+ ],
7069
+ "last_required_specialization": "trauma",
7070
+ "last_scenario_type": "accident",
7071
+ "last_scenario_name": "Highway Collision (Severe)",
7072
+ "best_success": true,
7073
+ "best_scenario_name": "Highway Collision (Severe)",
7074
+ "best_difficulty": "easy",
7075
+ "best_required_specialization": "trauma"
7076
+ },
7077
+ "124|acde_medium": {
7078
+ "attempts": 2,
7079
+ "best_score": 0.43970000000000004,
7080
+ "best_actions": [
7081
+ "H3",
7082
+ "H2",
7083
+ "H5",
7084
+ "H2"
7085
+ ],
7086
+ "best_steps": 4,
7087
+ "step_stats": {
7088
+ "1": {
7089
+ "H3": {
7090
+ "count": 2,
7091
+ "success": 0,
7092
+ "accepted": 0,
7093
+ "partial": 2,
7094
+ "rejected": 0,
7095
+ "total_reward": 0.5300000000000001,
7096
+ "avg_reward": 0.26500000000000007,
7097
+ "last_status": "PARTIAL",
7098
+ "last_reason": "Critical deterioration managed temporarily; reroute still needed",
7099
+ "success_rate": 0.0
7100
+ }
7101
+ },
7102
+ "2": {
7103
+ "H2": {
7104
+ "count": 2,
7105
+ "success": 0,
7106
+ "accepted": 0,
7107
+ "partial": 0,
7108
+ "rejected": 2,
7109
+ "total_reward": 0.2,
7110
+ "avg_reward": 0.1,
7111
+ "last_status": "REJECTED",
7112
+ "last_reason": "Condition relapsed after temporary stabilization",
7113
+ "success_rate": 0.0
7114
+ }
7115
+ },
7116
+ "3": {
7117
+ "H5": {
7118
+ "count": 2,
7119
+ "success": 0,
7120
+ "accepted": 0,
7121
+ "partial": 0,
7122
+ "rejected": 2,
7123
+ "total_reward": 0.14,
7124
+ "avg_reward": 0.07,
7125
+ "last_status": "REJECTED",
7126
+ "last_reason": "Hospital cannot admit: Hospital overloaded",
7127
+ "success_rate": 0.0
7128
+ }
7129
+ },
7130
+ "4": {
7131
+ "H2": {
7132
+ "count": 2,
7133
+ "success": 2,
7134
+ "accepted": 2,
7135
+ "partial": 0,
7136
+ "rejected": 0,
7137
+ "total_reward": 1.1680000000000001,
7138
+ "avg_reward": 0.5840000000000001,
7139
+ "last_status": "ACCEPTED",
7140
+ "last_reason": "Emergency stabilization at last attempt",
7141
+ "success_rate": 1.0
7142
+ }
7143
+ }
7144
+ },
7145
+ "last_score": 0.43970000000000004,
7146
+ "last_success": true,
7147
+ "last_run_at": "2026-04-09T04:44:44.442229+00:00",
7148
+ "last_actions": [
7149
+ "H3",
7150
+ "H2",
7151
+ "H5",
7152
+ "H2"
7153
+ ],
7154
+ "last_required_specialization": "cardiac",
7155
+ "last_scenario_type": "medical",
7156
+ "last_scenario_name": "Heart Attack (Unstable)",
7157
+ "best_success": true,
7158
+ "best_scenario_name": "Heart Attack (Unstable)",
7159
+ "best_difficulty": "medium",
7160
+ "best_required_specialization": "cardiac"
7161
+ },
7162
+ "125|acde_hard": {
7163
+ "attempts": 2,
7164
+ "best_score": 0.32093333333333335,
7165
+ "best_actions": [
7166
+ "H2",
7167
+ "H1",
7168
+ "H3"
7169
+ ],
7170
+ "best_steps": 3,
7171
+ "step_stats": {
7172
+ "1": {
7173
+ "H2": {
7174
+ "count": 2,
7175
+ "success": 0,
7176
+ "accepted": 0,
7177
+ "partial": 0,
7178
+ "rejected": 2,
7179
+ "total_reward": 0.001,
7180
+ "avg_reward": 0.0005,
7181
+ "last_status": "REJECTED",
7182
+ "last_reason": "Hospital cannot admit: Hospital overloaded",
7183
+ "success_rate": 0.0
7184
+ }
7185
+ },
7186
+ "2": {
7187
+ "H1": {
7188
+ "count": 2,
7189
+ "success": 0,
7190
+ "accepted": 0,
7191
+ "partial": 0,
7192
+ "rejected": 2,
7193
+ "total_reward": 0.001,
7194
+ "avg_reward": 0.0005,
7195
+ "last_status": "REJECTED",
7196
+ "last_reason": "Hidden mismatch at arrival (wrong risky guess). Rerouting required.",
7197
+ "success_rate": 0.0
7198
+ }
7199
+ },
7200
+ "3": {
7201
+ "H3": {
7202
+ "count": 2,
7203
+ "success": 2,
7204
+ "accepted": 2,
7205
+ "partial": 0,
7206
+ "rejected": 0,
7207
+ "total_reward": 0.9280000000000002,
7208
+ "avg_reward": 0.4640000000000001,
7209
+ "last_status": "ACCEPTED",
7210
+ "last_reason": "Condition stabilized after progressive treatment",
7211
+ "success_rate": 1.0
7212
+ }
7213
+ }
7214
+ },
7215
+ "last_score": 0.32093333333333335,
7216
+ "last_success": true,
7217
+ "last_run_at": "2026-04-09T04:44:45.351743+00:00",
7218
+ "last_actions": [
7219
+ "H2",
7220
+ "H1",
7221
+ "H3"
7222
+ ],
7223
+ "last_required_specialization": "general",
7224
+ "last_scenario_type": "fire",
7225
+ "last_scenario_name": "Wildfire Front (Evacuation Gridlock)",
7226
+ "best_success": true,
7227
+ "best_scenario_name": "Wildfire Front (Evacuation Gridlock)",
7228
+ "best_difficulty": "hard",
7229
+ "best_required_specialization": "general"
7230
  }
7231
  },
7232
  "episodes": [
 
8976
  "H4"
8977
  ],
8978
  "timestamp": "2026-04-09T04:31:28.103177+00:00"
8979
+ },
8980
+ {
8981
+ "seed": 123,
8982
+ "task_id": "acde_easy",
8983
+ "difficulty": "easy",
8984
+ "required_specialization": "trauma",
8985
+ "scenario_name": "Highway Collision (Severe)",
8986
+ "score": 0.99,
8987
+ "success": true,
8988
+ "actions": [
8989
+ "H1"
8990
+ ],
8991
+ "timestamp": "2026-04-09T04:42:46.257823+00:00"
8992
+ },
8993
+ {
8994
+ "seed": 124,
8995
+ "task_id": "acde_medium",
8996
+ "difficulty": "medium",
8997
+ "required_specialization": "cardiac",
8998
+ "scenario_name": "Heart Attack (Unstable)",
8999
+ "score": 0.43970000000000004,
9000
+ "success": true,
9001
+ "actions": [
9002
+ "H3",
9003
+ "H2",
9004
+ "H5",
9005
+ "H2"
9006
+ ],
9007
+ "timestamp": "2026-04-09T04:42:47.531681+00:00"
9008
+ },
9009
+ {
9010
+ "seed": 125,
9011
+ "task_id": "acde_hard",
9012
+ "difficulty": "hard",
9013
+ "required_specialization": "general",
9014
+ "scenario_name": "Wildfire Front (Evacuation Gridlock)",
9015
+ "score": 0.3206666666666667,
9016
+ "success": true,
9017
+ "actions": [
9018
+ "H2",
9019
+ "H1",
9020
+ "H3"
9021
+ ],
9022
+ "timestamp": "2026-04-09T04:42:48.535321+00:00"
9023
+ },
9024
+ {
9025
+ "seed": 123,
9026
+ "task_id": "acde_easy",
9027
+ "difficulty": "easy",
9028
+ "required_specialization": "trauma",
9029
+ "scenario_name": "Highway Collision (Severe)",
9030
+ "score": 0.99,
9031
+ "success": true,
9032
+ "actions": [
9033
+ "H1"
9034
+ ],
9035
+ "timestamp": "2026-04-09T04:44:42.938335+00:00"
9036
+ },
9037
+ {
9038
+ "seed": 124,
9039
+ "task_id": "acde_medium",
9040
+ "difficulty": "medium",
9041
+ "required_specialization": "cardiac",
9042
+ "scenario_name": "Heart Attack (Unstable)",
9043
+ "score": 0.43970000000000004,
9044
+ "success": true,
9045
+ "actions": [
9046
+ "H3",
9047
+ "H2",
9048
+ "H5",
9049
+ "H2"
9050
+ ],
9051
+ "timestamp": "2026-04-09T04:44:44.442229+00:00"
9052
+ },
9053
+ {
9054
+ "seed": 125,
9055
+ "task_id": "acde_hard",
9056
+ "difficulty": "hard",
9057
+ "required_specialization": "general",
9058
+ "scenario_name": "Wildfire Front (Evacuation Gridlock)",
9059
+ "score": 0.32093333333333335,
9060
+ "success": true,
9061
+ "actions": [
9062
+ "H2",
9063
+ "H1",
9064
+ "H3"
9065
+ ],
9066
+ "timestamp": "2026-04-09T04:44:45.351743+00:00"
9067
  }
9068
  ]
9069
  }
data/learning_memory.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "H2": {
3
- "success": 107,
4
- "fail": 206,
5
- "avg": 0.34283865814696546,
6
- "accepted": 107,
7
- "rejected": 206
8
  },
9
  "H6": {
10
  "success": 50,
@@ -15,30 +15,30 @@
15
  },
16
  "H5": {
17
  "success": 112,
18
- "fail": 173,
19
- "avg": 0.38748456140350857,
20
  "accepted": 112,
21
- "rejected": 173
22
  },
23
  "H1": {
24
- "success": 107,
25
- "fail": 105,
26
- "avg": 0.4121962264150941,
27
- "accepted": 107,
28
- "rejected": 105
29
  },
30
  "H3": {
31
- "success": 93,
32
  "fail": 152,
33
- "avg": 0.3563742857142854,
34
- "accepted": 93,
35
  "rejected": 152
36
  },
37
  "H4": {
38
  "success": 37,
39
- "fail": 100,
40
- "avg": 0.3597846715328463,
41
  "accepted": 37,
42
- "rejected": 100
43
  }
44
  }
 
1
  {
2
  "H2": {
3
+ "success": 109,
4
+ "fail": 208,
5
+ "avg": 0.3422003154574139,
6
+ "accepted": 109,
7
+ "rejected": 208
8
  },
9
  "H6": {
10
  "success": 50,
 
15
  },
16
  "H5": {
17
  "success": 112,
18
+ "fail": 175,
19
+ "avg": 0.3852721254355398,
20
  "accepted": 112,
21
+ "rejected": 175
22
  },
23
  "H1": {
24
+ "success": 109,
25
+ "fail": 107,
26
+ "avg": 0.4147435185185182,
27
+ "accepted": 109,
28
+ "rejected": 107
29
  },
30
  "H3": {
31
+ "success": 97,
32
  "fail": 152,
33
+ "avg": 0.35650481927710814,
34
+ "accepted": 97,
35
  "rejected": 152
36
  },
37
  "H4": {
38
  "success": 37,
39
+ "fail": 102,
40
+ "avg": 0.3546151079136686,
41
  "accepted": 37,
42
+ "rejected": 102
43
  }
44
  }
data/trajectory_history.jsonl CHANGED
@@ -305,3 +305,19 @@
305
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 2, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2"], "visited_hospitals": ["H2"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H3", "policy_score": 0.12565735415854704, "strategy": "risk-aware policy + anti-stupidity guard"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: No specialist available"}, "reward": 0.0}
306
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 3, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2", "H3"], "visited_hospitals": ["H2", "H3"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H6", "policy_score": 0.11518464278270465, "strategy": "risk-aware policy + guided-exploration"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: ICU unavailable, No specialist available"}, "reward": 0.11}
307
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 4, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2", "H3", "H6"], "visited_hospitals": ["H2", "H3", "H6"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H4", "policy_score": 0.11979326699339597, "strategy": "risk-aware policy"}, "outcome": {"status": "PARTIAL", "reason": "Critical deterioration managed temporarily; reroute still needed"}, "reward": 0.215}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 2, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2"], "visited_hospitals": ["H2"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H3", "policy_score": 0.12565735415854704, "strategy": "risk-aware policy + anti-stupidity guard"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: No specialist available"}, "reward": 0.0}
306
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 3, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2", "H3"], "visited_hospitals": ["H2", "H3"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H6", "policy_score": 0.11518464278270465, "strategy": "risk-aware policy + guided-exploration"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: ICU unavailable, No specialist available"}, "reward": 0.11}
307
  {"seed": 894675820, "task": "acde_hard", "difficulty": "hard", "step": 4, "state": {"patient_condition": "critical", "remaining_time_minutes": 12.0, "failed_hospitals": ["H2", "H3", "H6"], "visited_hospitals": ["H2", "H3", "H6"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H4", "policy_score": 0.11979326699339597, "strategy": "risk-aware policy"}, "outcome": {"status": "PARTIAL", "reason": "Critical deterioration managed temporarily; reroute still needed"}, "reward": 0.215}
308
+ {"seed": 123, "task": "acde_easy", "difficulty": "easy", "step": 1, "state": {"patient_condition": "serious", "remaining_time_minutes": 20.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H1", "policy_score": 0.38513944081914836, "strategy": "safe policy + guided-exploration"}, "outcome": {"status": "ACCEPTED", "reason": "Patient admitted and treatment began"}, "reward": 1.0}
309
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 1, "state": {"patient_condition": "critical", "remaining_time_minutes": 14.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H3", "policy_score": 0.2542313592519237, "strategy": "safe policy + critical triage"}, "outcome": {"status": "PARTIAL", "reason": "Critical deterioration managed temporarily; reroute still needed"}, "reward": 0.26500000000000007}
310
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 2, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": [], "visited_hospitals": ["H3"], "ambulance_status": "in_transit"}, "action": {"hospital_id": "H2", "policy_score": 0.28564476176964476, "strategy": "balanced policy + critical triage"}, "outcome": {"status": "REJECTED", "reason": "Condition relapsed after temporary stabilization"}, "reward": 0.1}
311
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 3, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": ["H1"], "visited_hospitals": ["H3", "H1"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H5", "policy_score": 0.2676381567105855, "strategy": "risk-aware policy + immediate-retry override"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: Hospital overloaded"}, "reward": 0.07}
312
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 4, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": ["H1", "H5"], "visited_hospitals": ["H3", "H1", "H5"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H2", "policy_score": 0.4602097000108944, "strategy": "risk-aware policy"}, "outcome": {"status": "ACCEPTED", "reason": "Emergency stabilization at last attempt"}, "reward": 0.5840000000000001}
313
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 1, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H2", "policy_score": 0.24347869935725594, "strategy": "safe policy + critical triage"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: Hospital overloaded"}, "reward": 0.0}
314
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 2, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": ["H2"], "visited_hospitals": ["H2"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H1", "policy_score": 0.399222905770927, "strategy": "risk-aware policy + anti-stupidity guard"}, "outcome": {"status": "REJECTED", "reason": "Hidden mismatch at arrival (wrong risky guess). Rerouting required."}, "reward": 0.0}
315
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 3, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": ["H2", "H4"], "visited_hospitals": ["H2", "H4"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H3", "policy_score": 0.08687123376577266, "strategy": "risk-aware policy + immediate-retry override"}, "outcome": {"status": "ACCEPTED", "reason": "Condition stabilized after progressive treatment"}, "reward": 0.4640000000000001}
316
+ {"seed": 123, "task": "acde_easy", "difficulty": "easy", "step": 1, "state": {"patient_condition": "serious", "remaining_time_minutes": 20.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H1", "policy_score": 0.3997022038653544, "strategy": "best-route retain"}, "outcome": {"status": "ACCEPTED", "reason": "Patient admitted and treatment began"}, "reward": 0.999}
317
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 1, "state": {"patient_condition": "critical", "remaining_time_minutes": 14.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H3", "policy_score": 0.25891360812102787, "strategy": "best-route retain"}, "outcome": {"status": "PARTIAL", "reason": "Critical deterioration managed temporarily; reroute still needed"}, "reward": 0.26500000000000007}
318
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 2, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": [], "visited_hospitals": ["H3"], "ambulance_status": "in_transit"}, "action": {"hospital_id": "H2", "policy_score": 0.3007912164646373, "strategy": "best-route retain"}, "outcome": {"status": "REJECTED", "reason": "Condition relapsed after temporary stabilization"}, "reward": 0.1}
319
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 3, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": ["H1"], "visited_hospitals": ["H3", "H1"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H5", "policy_score": 0.28052648402402824, "strategy": "risk-aware policy + immediate-retry override"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: Hospital overloaded"}, "reward": 0.07}
320
+ {"seed": 124, "task": "acde_medium", "difficulty": "medium", "step": 4, "state": {"patient_condition": "unstable", "remaining_time_minutes": 14.0, "failed_hospitals": ["H1", "H5"], "visited_hospitals": ["H3", "H1", "H5"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H2", "policy_score": 0.4602176574461837, "strategy": "risk-aware policy"}, "outcome": {"status": "ACCEPTED", "reason": "Emergency stabilization at last attempt"}, "reward": 0.5840000000000001}
321
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 1, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": [], "visited_hospitals": [], "ambulance_status": "en_route"}, "action": {"hospital_id": "H2", "policy_score": 0.24347869935725594, "strategy": "best-route retain"}, "outcome": {"status": "REJECTED", "reason": "Hospital cannot admit: Hospital overloaded"}, "reward": 0.001}
322
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 2, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": ["H2"], "visited_hospitals": ["H2"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H1", "policy_score": 0.39922290989538656, "strategy": "risk-aware policy + anti-stupidity guard"}, "outcome": {"status": "REJECTED", "reason": "Hidden mismatch at arrival (wrong risky guess). Rerouting required."}, "reward": 0.001}
323
+ {"seed": 125, "task": "acde_hard", "difficulty": "hard", "step": 3, "state": {"patient_condition": "critical", "remaining_time_minutes": 11.0, "failed_hospitals": ["H2", "H4"], "visited_hospitals": ["H2", "H4"], "ambulance_status": "rerouting"}, "action": {"hospital_id": "H3", "policy_score": 0.08687125701068692, "strategy": "risk-aware policy + anti-stupidity guard + immediate-retry override"}, "outcome": {"status": "ACCEPTED", "reason": "Condition stabilized after progressive treatment"}, "reward": 0.4640000000000001}