Skip to content

How to set a separate action space for an agent in individual mode? #254

@coco970

Description

@coco970

Hello:
When I set the action space as:
def get_env_info(self):
return {
"space_obs": self.observation_space,
"space_act": [
gym.spaces.MultiDiscrete([2]*6), # agent_0
gym.spaces.MultiDiscrete([2]*6), # agent_1
gym.spaces.MultiDiscrete([2]*59), # agent_2
],
"num_agents": 3,
"policy_mapping_info": policy_mapping_dict,

}

_ The faults are below:_
self[policy_id] = class_(observation_space, action_space,
File "D:\Anaconda3\envs\try\lib\site-packages\ray\rllib\policy\policy_template.py", line 241, in init
dist_class, logit_dim = ModelCatalog.get_action_dist(
File "D:\Anaconda3\envs\try\lib\site-packages\ray\rllib\models\catalog.py", line 287, in get_action_dist
raise NotImplementedError("Unsupported args: {} {}".format(
NotImplementedError: Unsupported args: [MultiDiscrete([2 2 2 2 2 2]), MultiDiscrete([2 2 2 2 2 2]), MultiDiscrete([2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2])] None
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions