Skip to content

Commit

Permalink
Add homepage info/links to AEC and Parallel APIs (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottower authored May 19, 2023
1 parent 59fdc0f commit c1e757d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api/aec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ title: AEC

By default, PettingZoo models games as [*Agent Environment Cycle*](https://arxiv.org/abs/2009.13051) (AEC) environments. This allows it to support any type of game multi-agent RL can consider.

[PettingZoo Classic](https://pettingzoo.farama.org/environments/classic/) provides standard examples of AEC environments for turn-based games, many of which implement [Illegal Action Masking](#action-masking).

We provide a [tutorial](https://pettingzoo.farama.org/content/environment_creation/#example-custom-environment) for creating a simple Rock-Paper-Scissors AEC environment, showing how games with simultaneous actions can also be represented with AEC environments.

## Usage

AEC environments can be interacted with as follows:
Expand Down
4 changes: 4 additions & 0 deletions docs/api/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ title: Parallel

In addition to the main API, we have a secondary parallel API for environments where all agents have simultaneous actions and observations. An environment with parallel API support can be created via `<game>.parallel_env()`. This API is based around the paradigm of *Partially Observable Stochastic Games* (POSGs) and the details are similar to [RLLib's MultiAgent environment specification](https://docs.ray.io/en/latest/rllib-env.html#multi-agent-and-hierarchical), except we allow for different observation and action spaces between the agents.

All parallel environments can be converted into AEC environments by splitting a simultaneous turn into sequential turns, with observations only from the previous cycle.

We provide tutorials for creating two custom Parallel environments: [Rock-Paper-Scissors](https://pettingzoo.farama.org/content/environment_creation/#example-custom-parallel-environment), and a simple [gridworld environment](https://pettingzoo.farama.org/tutorials/environmentcreation/2-environment-logic/)

## Usage

Parallel environments can be interacted with as follows:
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ An API standard for multi-agent reinforcement learning.
**PettingZoo is a simple, pythonic interface capable of representing general multi-agent reinforcement learning (MARL) problems.**
PettingZoo includes a wide variety of reference environments, helpful utilities, and tools for creating your own custom environments.

The [AEC API](https://pettingzoo.farama.org/api/aec/) supports sequential turn based environments, while the [Parallel API](https://pettingzoo.farama.org/api/parallel/) supports environments with simultaneous actions.

Environments can be interacted with using a similar interface to [Gymnasium](https://gymnasium.farama.org):

```python
Expand Down

0 comments on commit c1e757d

Please sign in to comment.