From f891eea7b8a80ad0a6159d7002772cd1d15b3598 Mon Sep 17 00:00:00 2001 From: sp Date: Tue, 2 Jul 2024 08:55:31 +0200 Subject: [PATCH] set agent to deadlock when no shield action --- examples/shields/rl/sb3utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shields/rl/sb3utils.py b/examples/shields/rl/sb3utils.py index 14ae322..9ed75b8 100644 --- a/examples/shields/rl/sb3utils.py +++ b/examples/shields/rl/sb3utils.py @@ -24,7 +24,7 @@ class MiniGridSbShieldingWrapper(gym.core.Wrapper): try: return self.shield[self.env.get_symbolic_state()] except: - return [0.0] * 3 + [1.0] * 4 + return [0.0] * 3 + [0.0] * 4 def reset(self, *, seed=None, options=None): obs, infos = self.env.reset(seed=seed, options=options)