Skip to content

Commit

Permalink
[RLlib; docs] Fix RLlib main index page (code in multi-agent tab wron…
Browse files Browse the repository at this point in the history
…g). (#49037)
  • Loading branch information
sven1977 authored Dec 4, 2024
1 parent 1b13782 commit 19f9d88
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/source/rllib/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,14 @@ click the dropdowns below:
| |
| .. code-block:: python |
| |
| config.environment("CartPole-v1") # Classic Control |
| config.environment("ale_py:ALE/Pong-v5") # Atari |
| from ray.rllib.examples.envs.classes.multi_agent import MultiAgentCartPole |
| from ray import tune |
| tune.register_env("env", lambda cfg: MultiAgentCartPole(cfg)) |
| config.environment("env", env_config={"num_agents": 2}) |
| config.multi_agent( |
| policies={"p0", "p1"}, |
| policy_mapping_fn=lambda aid, *a, **kw: f"p{aid}", |
| ) |
+-------------------------------------------------------------------------------------------+


Expand Down

0 comments on commit 19f9d88

Please sign in to comment.