Spaces:
Sleeping
Sleeping
.
#12
by gensis88 - opened
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172spec_version: 1name: wildfireEnvironmenttype: spaceruntime: fastapiapp: server.app:appport: 8000metadata:name: "Wildfire Incident Command"description: >Real-world wildfire ICS simulation with hierarchical multi-agent coordination.Agents control Division Supervisors and Crew Bosses on a 20x20 dynamic fire gridwhere fire spreads based on wind direction and terrain.version: "1.0.0"author: "Meta Hackathon 2026"license: "BSD-3-Clause"tags:- wildfire- ICS- multi-agent- hierarchical-rl- openenvinference_script: "inference.py"environment:type: "discrete"grid_size: 20divisions: 4crews_per_division: 2cell_states:0: "Clear"1: "Burning"2: "Burnt"3: "Firebreak"observation_space:type: "dict"fields:grid:type: "List[List[int]]"description: "20x20 fire state matrix"division_zones:type: "List[Zone]"description: "Zone ID, label, and cell ranges for each division A-D"crew_positions:type: "List[Crew]"description: "Each crew: id, division, current cell, status"wind:type: "WindVector"description: "Direction (N/S/E/W) and speed (0.0-1.0)"assets_at_risk:type: "List[Asset]"description: "Named assets with id, name, cell, and status (safe/burned)"timestep:type: "int"description: "Current step number in the episode"containment_pct:type: "float"description: "Overall fire containment percentage (0.0-1.0)"action_space:type: "dict"fields:division_id:type: "int"range: "0-3"description: "Division to command: 0=A, 1=B, 2=C, 3=D"crew_id:type: "int"range: "0-1"description: "Crew boss index within the division"action_type:type: "enum"values: ["SUPPRESS", "FIREBREAK", "MOVE", "HOLD"]description: "Action to perform"target_cell:type: "List[int]"description: "Target grid coordinates [row, col] (0-19)"reward:formula: >reward = (0.4 * containment_delta)+ (0.3 * asset_safety_ratio)+ (0.2 * crew_efficiency)- (0.1 * idle_penalty)- (0.5 * assets_destroyed)- (0.8 * front_merge)components:containment_delta:weight: 0.4type: "positive"trigger: "Every step fire containment % increases"asset_safety_ratio:weight: 0.3type: "positive"trigger: "Every step based on how many assets remain safe"crew_efficiency:weight: 0.2type: "positive"trigger: "When a crew action directly reduces burning cells"idle_penalty:weight: -0.1type: "negative"trigger: "When HOLD action is used near active fire"asset_destroyed:weight: -0.5type: "negative"trigger: "Hard penalty each time an asset is burned"front_merge_penalty:weight: -0.8type: "negative"trigger: "Task 3 only — when two fire fronts merge"endpoints:reset: "/reset"step: "/step"state: "/state"tasks: "/tasks"grader: "/grader"baseline: "/baseline"tasks:- id: task_1name: "Single Front Containment"difficulty: easymax_steps: 30description: >Fire starts as a 5x5 cluster in Division A.Contain all fire within Division A within 30 steps.No fire must cross into Divisions B, C, or D.initial_fire: "5x5 cluster in center of Division A"wind: "Fixed East, speed 0.3"assets: []score_formula: "(cells_contained_in_A / total_burning_cells) * containment_speed_bonus"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_1"- id: task_2name: "Asset Protection"difficulty: mediummax_steps: 50description: >Fire starts on the north edge and spreads toward 3 named assets.Suppress the fire AND keep Town, Water Tower, and Road Junction safe.initial_fire: "10 cells burning on north edge of map"wind: "Fixed South, speed 0.5"assets:- name: "Town"cell: [15, 10]- name: "Water Tower"cell: [12, 5]- name: "Road Junction"cell: [14, 15]score_formula: "containment_ratio * (assets_saved / 3)"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_2"- id: task_3name: "Multi-Front Outbreak"difficulty: hardmax_steps: 60description: >Fire ignites simultaneously in Divisions A, B, and C.Coordinate all Division Supervisors and Crew Bosses across the entire map.Prevent fronts from merging. Protect 6 assets (2 per division).initial_fire: "5 cells burning in Division A, B, and C simultaneously"wind: "Seeded deterministic (seed=42): direction=S, speed=0.57"assets: "2 assets per active division (6 total)"score_formula: "avg_containment * speed_factor * asset_factor - merge_penalty"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_3"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171spec_version: 1name: wildfireEnvironmenttype: spaceruntime: fastapiapp: server.app:appport: 8000metadata:name: "Wildfire Incident Command"description: >Real-world wildfire ICS simulation with hierarchical multi-agent coordination.Agents control Division Supervisors and Crew Bosses on a 20x20 dynamic fire gridwhere fire spreads based on wind direction and terrain fuel resistance.Reward follows the benchmark-relative formula from Tapley et al. (arXiv:2311.15925).version: "1.1.0"author: "Meta Hackathon 2026"license: "BSD-3-Clause"tags:- wildfire- ICS- multi-agent- hierarchical-rl- openenv- llm-agentinference_script: "inference.py"reference: "https://arxiv.org/abs/2311.15925"environment:type: "discrete"grid_size: 20divisions: 4crews_per_division: 2cell_states:0: "Clear"1: "Burning"2: "Burnt"3: "Firebreak"observation_space:type: "dict"fields:grid:type: "List[List[int]]"description: "20x20 fire state matrix"division_zones:type: "List[Zone]"description: "Zone ID, label, and cell ranges for each division A-D"crew_positions:type: "List[Crew]"description: "Each crew: id, division, current cell, status"wind:type: "WindVector"description: "Direction (N/S/E/W) and speed (0.0-1.0)"assets_at_risk:type: "List[Asset]"description: "Named assets with id, name, cell, and status (safe/burned)"timestep:type: "int"description: "Current step number in the episode"containment_pct:type: "float"description: "Overall fire containment percentage (0.0-1.0)"burning_per_division:type: "Dict[str, int]"description: "Burning cell count keyed by division label A-D"action_space:type: "dict"fields:division_id:type: "int"range: "0-3"description: "Division to command: 0=A, 1=B, 2=C, 3=D"crew_id:type: "int"range: "0-1"description: "Crew boss index within the division"action_type:type: "enum"values: ["SUPPRESS", "FIREBREAK", "WETLINE", "SCRATCHLINE", "MOVE", "HOLD"]description: "Action to perform — see efficiency values in reward section"target_cell:type: "List[int]"description: "Target grid coordinates [row, col] (0-19 each)"# ---------------------------------------------------------------------------# Reward: benchmark-relative formula from Tapley et al. arXiv:2311.15925# A shadow simulation (no agent) runs in parallel each episode.# Positive reward = agent saved more land than doing nothing would have.# ---------------------------------------------------------------------------reward:formula: >Reward_t = (NewDamagedBench_t - NewDamagedSim_t) / TotalEndangered+ 0.25/400 [if new mitigation placed on previously clear cell]- 0.5 * assets_destroyed_this_step- 0.8 * front_merges_this_step [Task 3 only]paper_equations:eq1: "DamagedSim_t = Sim[Burned_t] + Sim[Burning_t] + Sim[Mitigated_t]"eq2: "DamagedBench_t = Bench[Burned_t] + Bench[Burning_t]"eq3: "NewDamagedSim_t = DamagedSim_t - DamagedSim_{t-1}"eq4: "NewDamagedBench_t = DamagedBench_t - DamagedBench_{t-1}"eq5: "TotalEndangered = Bench_final[Burned] (pre-computed at reset)"eq6: "Reward_t = (NewDamagedBench_t - NewDamagedSim_t) / TotalEndangered"eq7: "Reward_t += 0.25 / Area_sim (bonus for new mitigation on clear cell)"action_efficiencies:SUPPRESS: 1.0 # extinguishes burning cell immediatelyWETLINE: 0.7 # suppressant on burning or clear cellFIREBREAK: 0.5 # removes fuel from clear cellSCRATCHLINE: 0.3 # quick partial fuel removalMOVE: 0.0 # reposition crewHOLD: 0.0 # idle (-penalty if fire nearby)endpoints:reset: "/reset"step: "/step"state: "/state"tasks: "/tasks"grader: "/grader"baseline: "/baseline"tasks:- id: task_1name: "Single Front Containment"difficulty: easymax_steps: 30description: >Fire starts as a 5x5 cluster in Division A.Contain all fire within Division A within 30 steps.No fire must cross into Divisions B, C, or D.initial_fire: "5x5 cluster in center of Division A (rows 2-6, cols 2-6)"wind: "Fixed East, speed 0.3"assets: []score_formula: "(cells_contained_in_A / total_burning_cells) * speed_bonus"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_1()"- id: task_2name: "Asset Protection"difficulty: mediummax_steps: 50description: >Fire starts on the north edge and spreads toward 3 named assets.Suppress the fire AND keep Town, Water Tower, and Road Junction safe.initial_fire: "10 cells burning on north edge of map (cols 5-14)"wind: "Fixed South, speed 0.5"assets:- name: "Town"cell: [15, 10]- name: "Water Tower"cell: [12, 5]- name: "Road Junction"cell: [14, 15]score_formula: "containment_ratio * (assets_saved / 3)"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_2()"- id: task_3name: "Multi-Front Outbreak"difficulty: hardmax_steps: 75 # corrected from 60description: >Fire ignites simultaneously in Divisions A, B, and C.Coordinate all Division Supervisors and Crew Bosses across the entire map.Prevent fronts from merging. Protect 6 assets (2 per active division).initial_fire: "5 cells burning in Division A, B, and C simultaneously"wind: "Seeded deterministic (seed=42)"assets: "2 assets per active division (6 total)"score_formula: "avg_containment * speed_factor * asset_factor - merge_penalty"score_range: [0.0, 1.0]grader: "TaskGrader.grade_task_3()"
openenv.yaml+171-172