[RLlib] Issue 8714: QMIX init error w/ tuple obs space. (#8936)

This commit is contained in:
Sven Mika
2020-06-16 08:50:53 +02:00
committed by GitHub
parent 508149b3c3
commit bdf1404a5f
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -194,6 +194,7 @@ class QMixTorchPolicy(Policy):
agent_obs_space = agent_obs_space.spaces["obs"]
else:
self.obs_size = _get_size(agent_obs_space)
self.env_global_state_shape = (self.obs_size, self.n_agents)
self.model = ModelCatalog.get_model_v2(
agent_obs_space,
+2
View File
@@ -78,6 +78,8 @@ class TestAvailActionsQMix(unittest.TestCase):
for _ in range(5):
agent.train() # OK if it doesn't trip the action assertion error
assert agent.train()["episode_reward_mean"] == 21.0
agent.stop()
ray.shutdown()
if __name__ == "__main__":