Spaces:
Runtime error
Runtime error
Commit ·
acebf2a
1
Parent(s): b89d17e
docs(engine): document check_success in MotiveGridGame turn-loop + survived docstring
Browse files
proteus/game/engine/grid.py
CHANGED
|
@@ -71,8 +71,9 @@ class MotiveGridGame(ARCBaseGame):
|
|
| 71 |
keeps it in place).
|
| 72 |
2. ``scenario.advance_threat`` moves the predator/NPCs.
|
| 73 |
3. If ``scenario.check_elimination`` -> :meth:`lose`.
|
| 74 |
-
4. Else if
|
| 75 |
-
5.
|
|
|
|
| 76 |
|
| 77 |
Boundary handling: arc_grid enforces no world border, so the framework
|
| 78 |
guards the grid edge for the focal agent itself. Every scenario uses
|
|
@@ -246,7 +247,7 @@ class MotiveGridGame(ARCBaseGame):
|
|
| 246 |
|
| 247 |
@property
|
| 248 |
def survived(self) -> bool:
|
| 249 |
-
"""Whether the focal agent survived the
|
| 250 |
return self._state == GameState.WIN
|
| 251 |
|
| 252 |
def current_grid(self) -> np.ndarray:
|
|
|
|
| 71 |
keeps it in place).
|
| 72 |
2. ``scenario.advance_threat`` moves the predator/NPCs.
|
| 73 |
3. If ``scenario.check_elimination`` -> :meth:`lose`.
|
| 74 |
+
4. Else if ``scenario.check_success`` -> :meth:`win` (early win).
|
| 75 |
+
5. Else if the step budget is exhausted -> :meth:`win`.
|
| 76 |
+
6. ``complete_action`` ends the turn.
|
| 77 |
|
| 78 |
Boundary handling: arc_grid enforces no world border, so the framework
|
| 79 |
guards the grid edge for the focal agent itself. Every scenario uses
|
|
|
|
| 247 |
|
| 248 |
@property
|
| 249 |
def survived(self) -> bool:
|
| 250 |
+
"""Whether the focal agent won (survived the step budget or achieved an early goal)."""
|
| 251 |
return self._state == GameState.WIN
|
| 252 |
|
| 253 |
def current_grid(self) -> np.ndarray:
|