AdityParbat/disaster-response-env
0
1# tasks.py2"""3Disaster Response Tasks — RL/MDP Version4Clean configuration-only file. Scenarios and Graders are now handled dynamically5by the core Environment logic in env.py.6"""7 8TASKS = {9 10 "single_incident_response": {11 "id": "single_incident_response",12 "difficulty": "easy",13 "max_steps": 3,14 "resources_manifest": {15 "fire_truck_1": "fire_truck",16 "fire_truck_2": "fire_truck",17 "ambulance_1": "ambulance",18 "ambulance_2": "ambulance",19 "police_unit_1": "police",20 "police_unit_2": "police"21 },22 "initial_resources": [23 "fire_truck_1", "fire_truck_2",24 "ambulance_1", "ambulance_2",25 "police_unit_1", "police_unit_2"26 ],27 "initial_incidents": [28 {29 "id": "INC-001",30 "type": "structural_fire",31 "severity": "critical",32 "requires": ["fire_truck", "ambulance"],33 "location": "45 Oak Street",34 "time_to_resolve": 235 },36 {37 "id": "INC-002",38 "type": "road_hazard",39 "severity": "low",40 "requires": ["police"],41 "location": "Bridge Road",42 "time_to_resolve": 143 }44 ],45 "constraints": [46 "Send exactly 1 fire_truck and 1 ambulance to INC-001.",47 "Send exactly 1 police unit to INC-002.",48 "Total dispatch: 3 units maximum."49 ]50 },51 52 "multi_incident_triage": {53 "id": "multi_incident_triage",54 "difficulty": "medium",55 "max_steps": 3,56 "resources_manifest": {57 "unit_alpha": "ambulance",58 "unit_bravo": "police",59 "unit_charlie": "police",60 "unit_delta": "fire_truck",61 "unit_echo": "ambulance"62 },63 "initial_resources": [64 "unit_alpha", "unit_bravo", "unit_charlie", "unit_delta", "unit_echo"65 ],66 "initial_incidents": [67 {68 "id": "INC-001",69 "type": "cardiac_arrest",70 "severity": "critical",71 "requires": ["ambulance"],72 "location": "City Hospital lobby",73 "time_to_resolve": 374 },75 {76 "id": "INC-002",77 "type": "vehicle_collision",78 "severity": "moderate",79 "requires": ["police"],80 "location": "Highway 7",81 "time_to_resolve": 282 },83 {84 "id": "INC-003",85 "type": "false_alarm",86 "severity": "none",87 "requires": [],88 "location": "88 Maple Drive",89 "time_to_resolve": 190 }91 ],92 "constraints": [93 "unit_echo is on mandatory maintenance — DO NOT dispatch.",94 "INC-003 is a confirmed false alarm — zero units required.",95 "Check resources_manifest carefully: units have coded names."96 ],97 "unavailable_units": ["unit_echo"]98 },99 100 "dynamic_escalation": {101 "id": "dynamic_escalation",102 "difficulty": "hard",103 "max_steps": 4,104 "resources_manifest": {105 "fire_truck_1": "fire_truck",106 "fire_truck_2": "fire_truck",107 "fire_truck_3": "fire_truck",108 "hazmat_unit_1": "hazmat",109 "hazmat_unit_2": "hazmat",110 "ambulance_1": "ambulance",111 "ambulance_2": "ambulance",112 "police_unit_1": "police",113 "police_unit_2": "police",114 "mental_health_unit_1": "mental_health"115 },116 "initial_resources": [117 "fire_truck_1", "fire_truck_2", "fire_truck_3",118 "hazmat_unit_1", "hazmat_unit_2",119 "ambulance_1", "ambulance_2",120 "police_unit_1", "police_unit_2",121 "mental_health_unit_1"122 ],123 "initial_incidents": [124 {125 "id": "INC-001",126 "type": "gas_leak",127 "severity": "critical",128 "requires": ["hazmat", "fire_truck"],129 "location": "Riverside Mall",130 "time_to_resolve": 4131 },132 {133 "id": "INC-002",134 "type": "psychiatric_crisis",135 "severity": "moderate",136 "requires": ["mental_health", "police"],137 "location": "8 Pine Avenue",138 "time_to_resolve": 3139 }140 ],141 "constraints": [142 "fire_truck_3 is UNFIT FOR SERVICE — DO NOT dispatch.",143 "hazmat_unit_1 is UNAVAILABLE (Route 9) — DO NOT dispatch.",144 "Ambulances are strictly forbidden from INC-001 (Gas Leak zone).",145 "Reserve 1 fire_truck for potential escalation."146 ],147 "unavailable_units": ["fire_truck_3", "hazmat_unit_1"],148 "forbidden_dispatches": {149 "INC-001": ["ambulance"]150 }151 },152 153 "citywide_crisis_management": {154 "id": "citywide_crisis_management",155 "difficulty": "master",156 "max_steps": 5,157 "resources_manifest": {158 "unit_m1": "marine_unit", "unit_m2": "marine_unit",159 "unit_a1": "aviation", "unit_a2": "aviation", "unit_a3": "aviation", "unit_a4": "aviation",160 "unit_med1": "ambulance", "unit_med2": "ambulance", "unit_med3": "ambulance", "unit_med4": "ambulance", "unit_med5": "ambulance",161 "unit_p1": "police", "unit_p2": "police", "unit_p3": "police", "unit_p4": "police", "unit_p5": "police", "unit_p6": "police",162 "unit_b1": "bomb_squad", "unit_b2": "bomb_squad",163 "unit_h1": "hazmat", "unit_h2": "hazmat", "unit_h3": "hazmat",164 "unit_f1": "fire_truck", "unit_f2": "fire_truck", "unit_f3": "fire_truck", "unit_delta_4": "fire_truck"165 },166 "initial_resources": [167 "unit_m1", "unit_m2",168 "unit_a1", "unit_a2", "unit_a3", "unit_a4",169 "unit_med1", "unit_med2", "unit_med3", "unit_med4", "unit_med5",170 "unit_p1", "unit_p2", "unit_p3", "unit_p4", "unit_p5", "unit_p6",171 "unit_b1", "unit_b2",172 "unit_h1", "unit_h2", "unit_h3",173 "unit_f1", "unit_f2", "unit_f3", "unit_delta_4"174 ],175 "initial_incidents": [176 {177 "id": "INC-001", "type": "bridge_collapse", "severity": "critical", 178 "requires": ["marine_unit", "aviation", "ambulance", "police"], "location": "Bridge",179 "time_to_resolve": 4180 },181 {182 "id": "INC-002", "type": "hostage_situation", "severity": "critical", 183 "requires": ["police", "bomb_squad", "ambulance"], "location": "City Bank",184 "time_to_resolve": 4185 },186 {187 "id": "INC-003", "type": "electrical_fire", "severity": "critical", 188 "requires": ["fire_truck", "hazmat"], "location": "Server Farm",189 "time_to_resolve": 3190 },191 {192 "id": "INC-004", "type": "chemical_spill", "severity": "moderate", 193 "requires": ["hazmat", "police"], "location": "Route 6",194 "time_to_resolve": 2195 }196 ],197 "constraints": [198 "Keep exactly 2 aviation units in the reserved_units list.",199 "Do not dispatch unit_med3, unit_p4, or unit_h2 (Maintenance).",200 "Only unit_delta_4 is compatible with the Server Farm chemical fire."201 ],202 "unavailable_units": ["unit_med3", "unit_p4", "unit_h2"],203 "identity_locked_units": {204 "INC-003": "unit_delta_4"205 }206 }207}