Skip to content

Coins API Reference

Family dispatcher

Coins substrate entrypoints.

parallel_env(sub_substrate: str = 'coins', **kwargs: Any)

Create a native PettingZoo ParallelEnv for a Coins sub-substrate.

env(sub_substrate: str = 'coins', **kwargs: Any)

Create a PettingZoo AEC environment for a Coins sub-substrate.

Coins substrate

Native PettingZoo implementation of Melting Pot's Coins substrate.

CoinsConfig dataclass

Configuration for the native Coins substrate.

CoinsParallelEnv

Bases: ParallelEnv[Agent, dict[str, ndarray], int]

PettingZoo ParallelEnv for the Coins substrate.

ascii_map: str property

The upstream-shaped ASCII map generated for the current episode.

parallel_env(render_mode: RenderMode = None, config: CoinsConfig | None = None, **config_overrides: Any) -> CoinsParallelEnv

Create the native Coins ParallelEnv.

env(render_mode: RenderMode = None, **kwargs: Any)

Create the native Coins AEC env.

generate_ascii_map(min_width: int, max_width: int, min_height: int, max_height: int, rng: random.Random | None = None) -> str

Procedurally generate the upstream-shaped Coins ASCII map.