Toxic stag¶

Three hunters on a 7×7 grid. Every time the stag appears it is toxic with probability 0.5: a healthy stag is worth 5 and a toxic one costs 5, and a toxic stag left alone for 5 steps reappears elsewhere with its toxicity drawn again (ToxicStag(toxic_lifetime=...) changes or randomizes this; a fixed lifetime lets agents infer that a stag which stays longer is healthy). Only predator_0 can tell whether the stag is toxic, and it sees only the cells next to it, so the team has to act on one member's private information.
import gridhunt
env = gridhunt.make("GridHunt-ToxicStag-v0")
What it tests¶
Acting on one teammate's private information. Only predator_0 can tell a toxic stag, and only from next to it; the others have to go by what it does.
- Removing one agent costs the scripted team:
predator_02%,predator_11%,predator_20% (interdependence ablation; capture only, not information) - Vary it with:
toxic_probability,toxic_lifetime, which hunters aretoxicity_aware
Overview¶
| Environment ID | GridHunt-ToxicStag-v0 |
| Grid | 7 × 7 |
| Agents | 3 |
| Episode length | 1000 steps |
| Actions | Discrete(5): stay, up, down, left, right |
| Observations | toxic, 849 values per agent |
| Global state | 18 values (env.state()) |
| Prey motion | static |
Agents¶
| Agent | Capture power | Speed | Vision | Terrain | Notes |
|---|---|---|---|---|---|
predator_0 |
1 | 1 | 1 cell around it | - | knows whether the stag is toxic |
predator_1 |
1 | 1 | whole board | - | - |
predator_2 |
1 | 1 | whole board | - | - |
Prey¶
| Prey | Type | Reward | Capture power needed | Reappears after capture | Notes |
|---|---|---|---|---|---|
stag_0 |
stag | 5 | 2 | yes | toxic with probability 0.5 (then worth -5); an uncaught toxic stag moves after 5 steps |
hare_0 |
hare | 1 | 1 | yes | overcrowding costs 0.5 |
hare_1 |
hare | 1 | 1 | yes | overcrowding costs 0.5 |
A capture happens when the hunters on a prey's cell have at least the capture power it needs. With more power than needed, the prey's overcrowding penalty is subtracted from its reward.
Benchmark¶
The benchmark plays it with team reward, 200-step episodes and a budget of 20M environment steps. Scores are team returns: IQM over 20 seeds with 95% bootstrap intervals (details).
| Configuration | Algorithm | IQM [95% CI] | Normalized | Random | Scripted |
|---|---|---|---|---|---|
toxic_stag |
IPPO | 161.5 [159.6, 162.8] | 1.39 | 9.9 | 118.6 |
toxic_stag |
MAPPO | 150.8 [149.6, 151.7] | 1.30 | 9.9 | 118.6 |
toxic_stag |
HAPPO | 156.2 [153.3, 158.9] | 1.35 | 9.9 | 118.6 |
toxic_stag_blind |
IPPO | 134.5 [130.8, 136.3] | 1.15 | 9.9 | 118.6 |
toxic_stag_blind |
MAPPO | 131.6 [130.1, 132.3] | 1.12 | 9.9 | 118.6 |
toxic_stag_blind |
HAPPO | 134.6 [132.6, 136.4] | 1.15 | 9.9 | 118.6 |
Version history¶
v0(GridHunt 1.0.0): first release.