Skip to content

MeltingPot-PettingZoo

MeltingPot-PettingZoo ports Melting Pot substrates into native PettingZoo environments. The goal is behavioral parity with Melting Pot while keeping the runtime implementation easy to inspect, modify, and extend.

The reference Melting Pot checkout lives in refs/. Runtime code in this project should not depend on meltingpot, dmlab2d, dm_env, or ml_collections.

Install and run

Use uv for local commands:

uv sync
uv run pytest

Create an implemented substrate as a PettingZoo parallel environment:

from mp.coins.coins import parallel_env

env = parallel_env(render_mode="rgb_array")
observations, infos = env.reset(seed=0)
actions = {agent: env.action_space(agent).sample() for agent in env.agents}
observations, rewards, terminations, truncations, infos = env.step(actions)

Implemented native families:

  • mp.coins.coins
  • mp.allelopathic_harvest.open
  • mp.chemistry
  • mp.commons_harvest
  • mp.clean_up.clean_up
  • mp.collaborative_cooking
  • mp.coop_mining.coop_mining
  • mp.daycare.daycare
  • mp.externality_mushrooms.dense
  • mp.factory_commons.either_or
  • mp.fruit_market.concentric_rivers
  • mp.gift_refinements.gift_refinements
  • mp.hidden_agenda.hidden_agenda
  • mp.paintball
  • mp.predator_prey
  • mp.real_matrix
  • mp.territory
  • mp.the_matrix

Documentation

Build this site locally with:

uv run zensical build

Preview it while editing with:

uv run zensical serve