Xiaochuang Yuan commited on
Commit
ee5ec03
·
1 Parent(s): d4d38ed

Address PR #21 review: drop redundant SSR write + stale scenarios.json entry

Browse files

- app.py: remove the `os.environ["GRADIO_SSR_MODE"] = "false"` module-level
write I added during conflict resolution. The latest main commit
(8c1267a, "Patch Gradio schema crash") explicitly removed it as
"the ineffective GRADIO_SSR_MODE env var workaround" — the
schema-patch monkeypatch on lines 28–33 is the real fix and is
preserved. Reintroducing the env-var line was a regression vs main.

- site/public/scenarios.json: drop `artofwar-decoy-sacrifice` (now
archived under openra_bench/scenarios/packs/_archive/). Filtered
in-place since regenerating via site/generate.py needs pydantic
+ PIL which aren't installed in this checkout. 209 → 208 entries.

Files changed (2) hide show
  1. app.py +0 -3
  2. site/public/scenarios.json +1 -88
app.py CHANGED
@@ -2206,9 +2206,6 @@ def build_app() -> gr.Blocks:
2206
  return app
2207
 
2208
 
2209
- os.environ["GRADIO_SSR_MODE"] = "false"
2210
-
2211
-
2212
  if __name__ == "__main__":
2213
  app = build_app()
2214
  app.launch(
 
2206
  return app
2207
 
2208
 
 
 
 
2209
  if __name__ == "__main__":
2210
  app = build_app()
2211
  app.launch(
site/public/scenarios.json CHANGED
@@ -1,91 +1,4 @@
1
  [
2
- {
3
- "scenarioId": "artofwar-decoy-sacrifice",
4
- "title": "Decoy Sacrifice — Divert Hunting Defenders So the Main Body Reaches the Objective",
5
- "capability": "reasoning",
6
- "capabilityLabel": {
7
- "en": "Reasoning",
8
- "zh": "推理"
9
- },
10
- "map": {
11
- "type": "image",
12
- "src": "maps/artofwar-decoy-sacrifice.png",
13
- "baseMap": "rush-hour-arena"
14
- },
15
- "raw": {
16
- "realWorldMeaning": "以利动之 — \"move the enemy with the prospect of gain.\" A reactive HUNTING force (it actively pursues the nearest of your units) sits astride the only corridor to the objective. Push the durable main body straight through and the hunters converge and destroy it before three of them arrive. The winning policy commits the fast, expendable bait on a divergent vector so the hunters lock onto and chase IT — clearing the corridor for the main body. This is long-horizon credit assignment: a decoy maneuver whose payoff is delayed and whose cost (the bait drawing fire / dying) looks locally negative; greedy \"keep everyone safe, push head-on\" and \"do nothing\" both fail.\n",
17
- "roboticsAnalogue": "Sacrificial-decoy planning against a pursuing adversary: expend or risk a cheap agent to draw a reactive interceptor off the protected corridor, accepting negative short-term reward for the delayed arrival of the main payload.\n",
18
- "benchmarkAnchor": "",
19
- "author": "openra-bench"
20
- },
21
- "humanReadable": {
22
- "summary": {
23
- "en": "以利动之 — \"move the enemy with the prospect of gain.\" A reactive HUNTING force (it actively pursues the nearest of your units) sits astride the only corridor to the objective. Push the durable main body straight through and the hunters converge and destroy it before three of them arrive. The winning policy commits the fast, expendable bait on a divergent vector so the hunters lock onto and chase IT — clearing the corridor for the main body. This is long-horizon credit assignment: a decoy maneuver whose payoff is delayed and whose cost (the bait drawing fire / dying) looks locally negative; greedy \"keep everyone safe, push head-on\" and \"do nothing\" both fail.\n",
24
- "zh": "以利动之 — \"move the enemy with the prospect of gain.\" A reactive HUNTING force (it actively pursues the nearest of your units) sits astride the only corridor to the objective. Push the durable main body straight through and the hunters converge and destroy it before three of them arrive. The winning policy commits the fast, expendable bait on a divergent vector so the hunters lock onto and chase IT — clearing the corridor for the main body. This is long-horizon credit assignment: a decoy maneuver whose payoff is delayed and whose cost (the bait drawing fire / dying) looks locally negative; greedy \"keep everyone safe, push head-on\" and \"do nothing\" both fail.\n"
25
- },
26
- "playerInstructions": {
27
- "en": [
28
- "A hunting rocket-and-rifle picket blocks the corridor to the far east objective. Get three tanks to the objective within about 65 turns. The picket chases the nearest unit, so an unsupported head-on push is fatal.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 5800.\nYOU LOSE IF: (not before game tick 5801 OR your whole force is destroyed).\nYou have at most 66 decision turns; acting decisively and early matters.",
29
- "Heavier rocket-infantry picket. Land three tanks on the far east objective within about 75 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 6600.\nYOU LOSE IF: (not before game tick 6601 OR your whole force is destroyed).\nYou have at most 76 decision turns; acting decisively and early matters.",
30
- "Strongest hunting picket. The force stages from a seed-chosen latitude. Land three tanks on the far east objective, losing at most two units, within about 82 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 7400 AND lose ≤2 of your own units.\nYOU LOSE IF: (not before game tick 7401 OR NOT (lose ≤2 of your own units) OR your whole force is destroyed).\nYou have at most 84 decision turns; acting decisively and early matters."
31
- ],
32
- "zh": [
33
- "A hunting rocket-and-rifle picket blocks the corridor to the far east objective. Get three tanks to the objective within about 65 turns. The picket chases the nearest unit, so an unsupported head-on push is fatal.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 5800.\nYOU LOSE IF: (not before game tick 5801 OR your whole force is destroyed).\nYou have at most 66 decision turns; acting decisively and early matters.",
34
- "Heavier rocket-infantry picket. Land three tanks on the far east objective within about 75 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 6600.\nYOU LOSE IF: (not before game tick 6601 OR your whole force is destroyed).\nYou have at most 76 decision turns; acting decisively and early matters.",
35
- "Strongest hunting picket. The force stages from a seed-chosen latitude. Land three tanks on the far east objective, losing at most two units, within about 82 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 7400 AND lose ≤2 of your own units.\nYOU LOSE IF: (not before game tick 7401 OR NOT (lose ≤2 of your own units) OR your whole force is destroyed).\nYou have at most 84 decision turns; acting decisively and early matters."
36
- ]
37
- },
38
- "annotatorHints": {
39
- "en": [
40
- "This scenario tests reasoning capability.",
41
- "Map: rush-hour-arena."
42
- ],
43
- "zh": [
44
- "此场景测试推理能力。",
45
- "地图:rush-hour-arena。"
46
- ]
47
- },
48
- "ambiguities": {
49
- "en": [],
50
- "zh": []
51
- }
52
- },
53
- "levels": {
54
- "easy": {
55
- "description": "A hunting rocket-and-rifle picket blocks the corridor to the far east objective. Get three tanks to the objective within about 65 turns. The picket chases the nearest unit, so an unsupported head-on push is fatal.\n",
56
- "maxTurns": 66,
57
- "startingCash": null,
58
- "fogMode": "vision",
59
- "objectiveCoords": "exact",
60
- "objective": {
61
- "en": "A hunting rocket-and-rifle picket blocks the corridor to the far east objective. Get three tanks to the objective within about 65 turns. The picket chases the nearest unit, so an unsupported head-on push is fatal.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 5800.\nYOU LOSE IF: (not before game tick 5801 OR your whole force is destroyed).\nYou have at most 66 decision turns; acting decisively and early matters.",
62
- "zh": "A hunting rocket-and-rifle picket blocks the corridor to the far east objective. Get three tanks to the objective within about 65 turns. The picket chases the nearest unit, so an unsupported head-on push is fatal.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 5800.\nYOU LOSE IF: (not before game tick 5801 OR your whole force is destroyed).\nYou have at most 66 decision turns; acting decisively and early matters."
63
- }
64
- },
65
- "medium": {
66
- "description": "Heavier rocket-infantry picket. Land three tanks on the far east objective within about 75 turns.\n",
67
- "maxTurns": 76,
68
- "startingCash": null,
69
- "fogMode": "vision",
70
- "objectiveCoords": "exact",
71
- "objective": {
72
- "en": "Heavier rocket-infantry picket. Land three tanks on the far east objective within about 75 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 6600.\nYOU LOSE IF: (not before game tick 6601 OR your whole force is destroyed).\nYou have at most 76 decision turns; acting decisively and early matters.",
73
- "zh": "Heavier rocket-infantry picket. Land three tanks on the far east objective within about 75 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 6600.\nYOU LOSE IF: (not before game tick 6601 OR your whole force is destroyed).\nYou have at most 76 decision turns; acting decisively and early matters."
74
- }
75
- },
76
- "hard": {
77
- "description": "Strongest hunting picket. The force stages from a seed-chosen latitude. Land three tanks on the far east objective, losing at most two units, within about 82 turns.\n",
78
- "maxTurns": 84,
79
- "startingCash": null,
80
- "fogMode": "vision",
81
- "objectiveCoords": "exact",
82
- "objective": {
83
- "en": "Strongest hunting picket. The force stages from a seed-chosen latitude. Land three tanks on the far east objective, losing at most two units, within about 82 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 7400 AND lose ≤2 of your own units.\nYOU LOSE IF: (not before game tick 7401 OR NOT (lose ≤2 of your own units) OR your whole force is destroyed).\nYou have at most 84 decision turns; acting decisively and early matters.",
84
- "zh": "Strongest hunting picket. The force stages from a seed-chosen latitude. Land three tanks on the far east objective, losing at most two units, within about 82 turns.\nWIN WHEN: get ≥3 units into region (112,20) r=6 AND before game tick 7400 AND lose ≤2 of your own units.\nYOU LOSE IF: (not before game tick 7401 OR NOT (lose ≤2 of your own units) OR your whole force is destroyed).\nYou have at most 84 decision turns; acting decisively and early matters."
85
- }
86
- }
87
- }
88
- },
89
  {
90
  "scenarioId": "action-multiunit-coordination",
91
  "title": "Multi-Squad Coordination — Drive Several Groups to Different Objectives at Once",
@@ -18546,4 +18459,4 @@
18546
  }
18547
  }
18548
  }
18549
- ]
 
1
  [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
  "scenarioId": "action-multiunit-coordination",
4
  "title": "Multi-Squad Coordination — Drive Several Groups to Different Objectives at Once",
 
18459
  }
18460
  }
18461
  }
18462
+ ]