77ethers commited on
Commit
edf2bb1
·
verified ·
1 Parent(s): 2ab05b1

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -150,16 +150,17 @@ The environment has 5 mechanisms that prevent reward hacking:
150
 
151
  ## Baseline Scores
152
 
153
- | Strategy | Task 1 | Task 2 | Task 3 |
154
- |----------|--------|--------|--------|
155
- | **Oracle (rule-based)** | **0.79** | **0.81** | **0.70** |
156
- | Do-Nothing (grid only) | 0.58 | 0.51 | 0.45 |
157
- | Always-Discharge | 0.59 | 0.51 | 0.45 |
158
- | Always-Diesel | 0.42 | 0.42 | 0.44 |
159
 
160
  - **Deterministic**: identical scores across 3 runs (seeded RNG)
161
- - **Oracle ceiling is < 1.0**: proves the environment has real physics constraints, not inflated scores
162
- - **Clear separation**: oracle >> heuristics on every task
 
163
 
164
  ---
165
 
 
150
 
151
  ## Baseline Scores
152
 
153
+ | Strategy | Task 1 | Task 2 | Task 3 | What it does |
154
+ |----------|--------|--------|--------|-------------|
155
+ | **Oracle (rule-based)** | **0.79** | **0.81** | **0.70** | Time-of-day + price + SOC aware |
156
+ | Do-Nothing (grid only) | 0.58 | 0.51 | 0.45 | Grid covers everything it can |
157
+ | Always-Discharge | 0.59 | 0.51 | 0.45 | Drains battery, empty by evening |
158
+ | Always-Diesel | 0.42 | 0.42 | 0.44 | Rs 25/kWh burns money |
159
 
160
  - **Deterministic**: identical scores across 3 runs (seeded RNG)
161
+ - **Oracle ceiling < 1.0**: real physics constraints, not inflated scores
162
+ - **Clear separation**: oracle >> heuristics on every task (0.20-0.35 gap)
163
+ - **Task 3 hardest**: grid outage drops oracle from 0.81 to 0.70
164
 
165
  ---
166
 
gridops/server/app.py CHANGED
@@ -79,19 +79,22 @@ def list_tasks():
79
  "id": "task_1_normal",
80
  "name": "Normal Summer",
81
  "difficulty": "Easy",
82
- "description": "Clear skies, standard demand, Rs 3-12 price range.",
 
83
  },
84
  {
85
  "id": "task_2_heatwave",
86
- "name": "Heatwave + Clouds",
87
  "difficulty": "Medium",
88
- "description": "Day 2-3 heatwave, +30% demand, price spikes to Rs 18.",
 
89
  },
90
  {
91
  "id": "task_3_crisis",
92
- "name": "Extreme Crisis",
93
  "difficulty": "Hard",
94
- "description": "Full 3-day heatwave, -30% solar, prices Rs 8-20, limited diesel.",
 
95
  },
96
  ]
97
  }
 
79
  "id": "task_1_normal",
80
  "name": "Normal Summer",
81
  "difficulty": "Easy",
82
+ "description": "Clear skies, ~100 kW avg demand, Rs 3-12 prices. Tests basic battery arbitrage.",
83
+ "oracle_score": 0.79,
84
  },
85
  {
86
  "id": "task_2_heatwave",
87
+ "name": "Heatwave + Price Spike",
88
  "difficulty": "Medium",
89
+ "description": "Day 2-3 heatwave (+30% demand), Rs 20 price spike. Tests temporal planning via forecast.",
90
+ "oracle_score": 0.81,
91
  },
92
  {
93
  "id": "task_3_crisis",
94
+ "name": "Extreme Crisis + Grid Outage",
95
  "difficulty": "Hard",
96
+ "description": "Full 3-day heatwave, -30% solar, +50% demand, limited diesel, 6-hour grid outage. Tests islanding.",
97
+ "oracle_score": 0.70,
98
  },
99
  ]
100
  }
gridops/server/environment.py CHANGED
@@ -168,10 +168,19 @@ class GridOpsEnvironment(Environment):
168
  )
169
 
170
  def get_metadata(self) -> EnvironmentMetadata:
 
 
 
 
 
 
 
 
171
  return EnvironmentMetadata(
172
  name="GridOps",
173
  description="Community microgrid bridge operator — balance solar, battery, diesel, and grid across 3-day episodes.",
174
  version="0.2.0",
 
175
  )
176
 
177
  def _make_observation(self, reward: float, done: bool, narration: str) -> GridOpsObservation:
 
168
  )
169
 
170
  def get_metadata(self) -> EnvironmentMetadata:
171
+ readme = None
172
+ try:
173
+ from pathlib import Path
174
+ readme_path = Path(__file__).parent.parent.parent / "README.md"
175
+ if readme_path.exists():
176
+ readme = readme_path.read_text()
177
+ except Exception:
178
+ pass
179
  return EnvironmentMetadata(
180
  name="GridOps",
181
  description="Community microgrid bridge operator — balance solar, battery, diesel, and grid across 3-day episodes.",
182
  version="0.2.0",
183
+ readme_content=readme,
184
  )
185
 
186
  def _make_observation(self, reward: float, done: bool, narration: str) -> GridOpsObservation:
openenv.yaml CHANGED
@@ -1,6 +1,6 @@
1
  name: gridops
2
- description: "Community microgrid bridge operator — balance solar, battery, diesel, and grid trade across 3-day summer episodes in India."
3
- version: "0.1.0"
4
 
5
  environment:
6
  module: gridops.server.app
@@ -19,21 +19,23 @@ tasks:
19
  - id: task_1_normal
20
  name: "Normal Summer"
21
  difficulty: easy
22
- description: "Clear skies, standard demand curve, smooth IEX prices Rs 4-8."
23
 
24
  - id: task_2_heatwave
25
- name: "Heatwave + Clouds"
26
  difficulty: medium
27
- description: "Day 2-3 heatwave (+30% demand), intermittent clouds, price spikes to Rs 18."
28
 
29
  - id: task_3_crisis
30
- name: "Extreme Crisis"
31
  difficulty: hard
32
- description: "Full 3-day heatwave, -30% solar, Rs 8-20 prices, limited diesel fuel."
33
 
34
  metadata:
35
  action_space: "3D continuous: battery_dispatch [-1,1], diesel_dispatch [0,1], demand_shedding [0,1]"
36
- observation_space: "12 fields: hour, demand, solar, battery_soc, price, fuel, 3×4h forecasts, cumulative metrics"
37
  episode_length: 72
38
  step_duration: "1 hour"
 
39
  grading: "Composite: 50% cost efficiency + 25% reliability + 25% green score. VoLL Rs 150/kWh blackout penalty."
 
 
1
  name: gridops
2
+ description: "Community microgrid bridge operator — balance solar, battery, diesel, and grid across 3-day summer episodes in India."
3
+ version: "0.2.0"
4
 
5
  environment:
6
  module: gridops.server.app
 
19
  - id: task_1_normal
20
  name: "Normal Summer"
21
  difficulty: easy
22
+ description: "Clear skies, ~100 kW avg demand, 250 kW evening peak, IEX prices Rs 3-12. Tests basic battery arbitrage."
23
 
24
  - id: task_2_heatwave
25
+ name: "Heatwave + Price Spike"
26
  difficulty: medium
27
+ description: "Day 2-3 heatwave (+30% demand), intermittent clouds, Rs 20 evening price spike. Tests temporal planning via 4h forecast."
28
 
29
  - id: task_3_crisis
30
+ name: "Extreme Crisis + Grid Outage"
31
  difficulty: hard
32
+ description: "Full 3-day heatwave, -30% solar, +50% demand, limited diesel (33%), 6-hour grid outage on Day 2. Tests islanding and constraint management."
33
 
34
  metadata:
35
  action_space: "3D continuous: battery_dispatch [-1,1], diesel_dispatch [0,1], demand_shedding [0,1]"
36
+ observation_space: "30+ fields: hour, demand, solar, battery_soc, price, fuel, diesel_is_on, 3x4h noisy forecasts, cumulative metrics, detailed energy flows"
37
  episode_length: 72
38
  step_duration: "1 hour"
39
+ episode_start: "6 AM Day 1"
40
  grading: "Composite: 50% cost efficiency + 25% reliability + 25% green score. VoLL Rs 150/kWh blackout penalty."
41
+ anti_gaming: "Shedding Rs 40/kWh + 100% rebound, battery Rs 2.5/kWh degradation, diesel Rs 100 startup, smooth VoLL, grid cap 200 kW"