Allelopathic Harvest Open¶
allelopathic_harvest/open is a native PettingZoo port of Melting Pot's
Allelopathic Harvest Open substrate. Sixteen players move through a toroidal
berry field, eat ripe berries, and use color-specific planting beams to shift
the future composition of the field.
Screenshot¶

API¶
See the generated Allelopathic Harvest API reference for signatures and public objects.
Use the family dispatcher:
from mp.allelopathic_harvest import env, parallel_env
parallel = parallel_env("open")
aec = env("open")
Or import the variant directly:
from mp.allelopathic_harvest.open import (
AllelopathicHarvestOpenConfig,
parallel_env,
)
config = AllelopathicHarvestOpenConfig()
env = parallel_env(config=config, render_mode="rgb_array")
Agents are named player_0 through player_15. Each infos[agent] includes
meltingpot_player_index, preserving Melting Pot's 1-based player ID.
Actions and observations¶
The action space is Discrete(11):
| Action | Meaning |
|---|---|
0 |
no-op |
1 |
forward |
2 |
backward |
3 |
step left |
4 |
step right |
5 |
turn left |
6 |
turn right |
7 |
fire zap |
8 |
plant red |
9 |
plant green |
10 |
plant blue |
Default per-agent observations are:
| Key | Shape | Type |
|---|---|---|
RGB |
(88, 88, 3) |
uint8 |
READY_TO_SHOOT |
() |
float64 |
state() and render_mode="rgb_array" return the global world RGB frame with
shape (240, 232, 3).
Mechanics¶
Berries start unripe. Once their countdown reaches zero, each unripe berry
ripens with probability based on the total number of berries of the same color.
Eating a ripe berry gives reward 2 if it matches the agent's preferred color
and 1 otherwise, then returns the berry to the unripe state.
Planting beams recolor the first unripe berry they hit and color the planting avatar. Zap beams implement graduated sanctions: the first hit freezes and marks the target, while the second hit before recovery removes the target and applies the sanction penalty.
Reward strategy and failure modes¶
Agents receive the best sustained reward when they keep enough high-value preferred-color berries in the population while avoiding overuse of sanctions. That usually means eating ripe berries opportunistically, planting to preserve future preferred-color supply, and using zaps only when policing protects the field more than it costs.
Bad equilibria include monocultures that benefit one preference group while starving the others, planting wars where players repeatedly overwrite each other's future food, and sanction spirals where marked or removed players lose time that could have been spent maintaining the berry commons.
Playable notebook¶
Launch the playable notebook with:
Controls:
- WASD or arrow keys move the active player.
- Q/E turn the active player.
- SPACE fires the zap beam.
- 1/2/3 fire red, green, or blue planting beams.
- TAB switches the controlled player.
- ESC closes the pygame window.
The notebook exposes faster ripening controls for playability. The environment defaults remain parity-oriented.