From b3c8091a35d5d02c032b4a6ba5eaeac83299018f Mon Sep 17 00:00:00 2001 From: Jaroslaw Rzepecki <31652222+flying-mojo@users.noreply.github.com> Date: Wed, 31 Jul 2019 19:38:49 +0100 Subject: [PATCH] Fix Tuple spaces in rollout.py (#5332) Make sure that the initial action is also properly flattened. --- python/ray/rllib/rollout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/rllib/rollout.py b/python/ray/rllib/rollout.py index e1a231093..f7ea31e96 100755 --- a/python/ray/rllib/rollout.py +++ b/python/ray/rllib/rollout.py @@ -132,7 +132,7 @@ def rollout(agent, env_name, num_steps, out=None, no_render=True): state_init = {p: m.get_initial_state() for p, m in policy_map.items()} use_lstm = {p: len(s) > 0 for p, s in state_init.items()} action_init = { - p: m.action_space.sample() + p: _flatten_action(m.action_space.sample()) for p, m in policy_map.items() } else: