diff --git a/examples/shields/rl/utils.py b/examples/shields/rl/utils.py index 39992db..8123ceb 100644 --- a/examples/shields/rl/utils.py +++ b/examples/shields/rl/utils.py @@ -123,7 +123,10 @@ class MiniGridShieldHandler(ShieldHandler): for stateID in model.states: choice = shield_scheduler.get_choice(stateID) choices = choice.choice_map + state_valuation = state_valuations.get_string(stateID) + print(state_valuation) + print(choices) ints = dict(re.findall(r'([a-zA-Z][_a-zA-Z0-9]+)=(-?[a-zA-Z0-9]+)', state_valuation)) booleans = re.findall(r'(\!?)([a-zA-Z][_a-zA-Z0-9]+)[\s\t]+', state_valuation) booleans = {b[1]: False if b[0] == "!" else True for b in booleans}