Skip to content

Classic stag hunt

Classic stag hunt

The two-player stag hunt on a 5×5 grid. The stag is worth 5 but needs both hunters on its cell at once; a hare is worth 1 and one hunter can catch it. Captured prey reappear on a random free cell. With individual rewards it is a social dilemma: hares are safe, the stag pays more but only if the partner commits too.

import gridhunt
env = gridhunt.make("GridHunt-ClassicStag-v0")

What it tests

Choosing to cooperate. The stag pays more but needs both hunters; a hare is a safe catch alone. Individual rewards (the default) make it a social dilemma, team reward a pure coordination problem.

  • Removing one agent costs the scripted team: predator_0 75%, predator_1 74% (interdependence ablation; capture only, not information)
  • Vary it with: reward_mode, prey rewards (prey=)

Overview

Environment ID GridHunt-ClassicStag-v0
Grid 5 × 5
Agents 2
Episode length 1000 steps
Actions Discrete(5): stay, up, down, left, right
Observations flat_coords, 10 values per agent
Global state 16 values (env.state())
Prey motion static

Agents

Agent Capture power Speed Vision Terrain Notes
predator_0 1 1 whole board - -
predator_1 1 1 whole board - -

Prey

Prey Type Reward Capture power needed Reappears after capture Notes
stag_0 stag 5 2 yes -
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 3M environment steps. Scores are team returns: IQM over 20 seeds with 95% bootstrap intervals (details).

Configuration Algorithm IQM [95% CI] Normalized Random Scripted
classic_stag IPPO 123.8 [123.6, 124.2] 0.38 14.0 306.4
classic_stag MAPPO 124.0 [123.8, 124.2] 0.38 14.0 306.4
classic_stag HAPPO 123.9 [123.7, 124.2] 0.38 14.0 306.4

Version history

  • v0 (GridHunt 1.0.0): first release.