Skip to content

Commit

Permalink
Update parallel.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WillDudley authored Oct 25, 2022
1 parent b3f537d commit 5ce6dc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api/parallel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ In addition to the main API, we have a secondary parallel API for environments w
Environments can be interacted with as follows:

``` python
parallel_env = pistonball_v1.parallel_env()
parallel_env = pistonball_v6.parallel_env()
observations = parallel_env.reset()
max_cycles = 500
for step in range(max_cycles):
actions = {agent: policy(observations[agent], agent) for agent in parallel_env.agents}
actions = {agent: parallel_env.action_space(agent).sample() for agent in parallel_env.agents} # this is where you would insert your policy
observations, rewards, terminations, truncations, infos = parallel_env.step(actions)
```

Expand Down Expand Up @@ -67,4 +67,4 @@ for step in range(max_cycles):
.. automethod:: observation_space
.. automethod:: action_space
```
```

0 comments on commit 5ce6dc3

Please sign in to comment.