Skip to content

Commit 46ccbae

Browse files
[BugFix] Multiagent PPO tutorial (#2940)
1 parent 795e362 commit 46ccbae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tutorials/sphinx-tutorials/multiagent_ppo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@
404404
n_agent_inputs=env.observation_spec["agents", "observation"].shape[
405405
-1
406406
], # n_obs_per_agent
407-
n_agent_outputs=2 * env.action_spec.shape[-1], # 2 * n_actions_per_agents
407+
n_agent_outputs=2
408+
* env.full_action_spec[env.action_key].shape[-1], # 2 * n_actions_per_agents
408409
n_agents=env.n_agents,
409410
centralised=False, # the policies are decentralised (ie each agent will act from its observation)
410411
share_params=share_parameters_policy,

0 commit comments

Comments
 (0)