Land and sea¶

A 10×10 grid split into sea and land along an irregular shore. The land hunter can never enter the sea and the boat can never come ashore. Either can catch the bird alone, and it reappears on a random cell after every capture, so whoever is on its side of the shore has to go for it while the other waits for the next one. It tests division of labour by territory: neither hunter can cover for the other, and a bird on a missing hunter's side is never caught (removing either hunter loses over 96% of the score; see the interdependence ablation). Where the off-side hunter waits is the room for anticipation.
import gridhunt
env = gridhunt.make("GridHunt-LandAndSea-v0")
What it tests¶
Division of labour by territory. Neither hunter can enter the other's side, so whoever is on the bird's side has to take it.
- Removing one agent costs the scripted team:
land_predator98%,sea_predator96% (interdependence ablation; capture only, not information) - Vary it with: the shore (
terrain_config),restricted_terrains
Overview¶
| Environment ID | GridHunt-LandAndSea-v0 |
| Grid | 10 × 10 |
| Agents | 2 |
| Episode length | 1000 steps |
| Actions | Discrete(5): stay, up, down, left, right |
| Observations | one_hot, 506 values per agent |
| Global state | 208 values (env.state()) |
| Prey motion | static |
Agents¶
| Agent | Capture power | Speed | Vision | Terrain | Notes |
|---|---|---|---|---|---|
land_predator |
1 | 1 | whole board | cannot enter sea | starts at (8, 5) |
sea_predator |
1 | 1 | whole board | cannot enter land | starts at (1, 5) |
Prey¶
| Prey | Type | Reward | Capture power needed | Reappears after capture | Notes |
|---|---|---|---|---|---|
bird |
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.
Terrain¶
| Terrain | Movement | Layout |
|---|---|---|
| sea | passable | fixed layout |
| land | passable | fixed layout |
Benchmark¶
The benchmark plays it with team reward, 200-step episodes and a budget of 7M environment steps. Scores are team returns: IQM over 20 seeds with 95% bootstrap intervals (details).
| Configuration | Algorithm | IQM [95% CI] | Normalized | Random | Scripted |
|---|---|---|---|---|---|
land_and_sea |
IPPO | 42.0 [41.9, 42.2] | 1.06 | 1.3 | 39.6 |
land_and_sea |
MAPPO | 41.5 [41.2, 41.7] | 1.05 | 1.3 | 39.6 |
land_and_sea |
HAPPO | 42.2 [42.1, 42.3] | 1.07 | 1.3 | 39.6 |
Version history¶
v0(GridHunt 1.0.0): first release.