Browse Source

set agent to deadlock when no shield action

refactoring
sp 5 months ago
parent
commit
f891eea7b8
  1. 2
      examples/shields/rl/sb3utils.py

2
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)

Loading…
Cancel
Save