From 4ae274047f4766ee025a2cdbff76c5fa7c89eb66 Mon Sep 17 00:00:00 2001 From: sp Date: Thu, 14 Mar 2024 21:58:53 +0100 Subject: [PATCH] more debugging --- examples/shields/rl/utils.py | 3 +++ 1 file changed, 3 insertions(+) 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}