Update the State in tasks

#1
Files changed (1) hide show
  1. server/tasks.py +3 -3
server/tasks.py CHANGED
@@ -34,7 +34,7 @@ class TaskGrader:
34
  Task 1 (Easy): Contain fire within Division A.
35
  Score = (cells_in_A_contained / total_affected) * speed_bonus
36
  """
37
- state = self.env.get_internal_state()
38
  grid = state["grid"]
39
  zone = DIVISIONS["A"]
40
 
@@ -68,7 +68,7 @@ class TaskGrader:
68
  Task 2 (Medium): Contain fire AND protect 3 assets.
69
  Score = containment_ratio * (assets_saved / 3)
70
  """
71
- state = self.env.get_internal_state()
72
  grid = state["grid"]
73
 
74
  total_cells = 20 * 20
@@ -89,7 +89,7 @@ class TaskGrader:
89
  Task 3 (Hard): Contain all 3 fire fronts, protect 6 assets, no merges.
90
  Score = weighted_containment * speed_factor * asset_factor
91
  """
92
- state = self.env.get_internal_state()
93
  grid = state["grid"]
94
  timestep = state["timestep"]
95
  front_merges = state.get("front_merges", 0)
 
34
  Task 1 (Easy): Contain fire within Division A.
35
  Score = (cells_in_A_contained / total_affected) * speed_bonus
36
  """
37
+ state = self.env.state()
38
  grid = state["grid"]
39
  zone = DIVISIONS["A"]
40
 
 
68
  Task 2 (Medium): Contain fire AND protect 3 assets.
69
  Score = containment_ratio * (assets_saved / 3)
70
  """
71
+ state = self.env.state()
72
  grid = state["grid"]
73
 
74
  total_cells = 20 * 20
 
89
  Task 3 (Hard): Contain all 3 fire fronts, protect 6 assets, no merges.
90
  Score = weighted_containment * speed_factor * asset_factor
91
  """
92
+ state = self.env.state()
93
  grid = state["grid"]
94
  timestep = state["timestep"]
95
  front_merges = state.get("front_merges", 0)