I have a custom multi-agent environment class. It supports different types of observation_space for study. For example:
class MyEnvCls(MultiAgentEnv):
# etc
config = {
"env": MyEnvCls,
"env_config": {
"obs_type" : tune.grid_search(["type1", "type2"]),
},
}
config["multiagent"] = {
"policies" : { # (policy_cls, obs_space, act_space, config)
"agent_{}".format(x): (None, some_observation_space, MyEnvCls.action_space, {}) for x in range(3)
},
"policy_mapping_fn": lambda x: "{}".format(x),
}
tune.run(
"A3C",
name="study",
config=config,
stop=stop,
)
How do I implement some_observation_space
so that when tune runs “type1”, it is a different gym.space from when tune runs “type2”?