You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an inconsistency in the API regarding the usage of action_space and observation_space across different environments that inherent from MultiAgentEnv. This inconsistency result in difficulties when initializing networks, as some environments, like Hanabi, follow the MultiAgentEnv API, while others partially follow it or do not follow it at all.
defobservation_space(self, agent: str):
"""Observation space for a given agent."""returnself.observation_spaces[agent]
defaction_space(self, agent: str):
"""Action space for a given agent."""returnself.action_spaces[agent]
defaction_space(self, agent_id=None) ->spaces.Discrete:
"""Action space of the environment."""returnspaces.Discrete(5)
defobservation_space(self) ->spaces.Box:
"""Observation space of the environment."""_shape= (3, 3, 4) ifself.cnnelse (36,)
returnspaces.Box(low=0, high=1, shape=_shape, dtype=jnp.uint8)
defaction_space(self, agent_id="") ->spaces.Discrete:
"""Action space of the environment. Agent_id not used since action_space is uniform for all agents"""returnspaces.Discrete(
len(self.action_set),
dtype=jnp.uint32
)
defobservation_space(self) ->spaces.Box:
"""Observation space of the environment."""returnspaces.Box(0, 255, self.obs_shape)
There is an inconsistency in the API regarding the usage of
action_space
andobservation_space
across different environments that inherent fromMultiAgentEnv
. This inconsistency result in difficulties when initializing networks, as some environments, like Hanabi, follow theMultiAgentEnv
API, while others partially follow it or do not follow it at all.Standard API Implementation (
MultiAgentEnv
):multi_agent_env.py
Affected files:
coin_game.py
overcooked.py
storm_2p.py
storm.py
The text was updated successfully, but these errors were encountered: