From c47ca7ccc526f9b955def277a0b2f892118acc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 8 May 2023 23:25:09 +0200 Subject: [PATCH] sat.py: correctly export model after game ended --- sat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sat.py b/sat.py index c15530b..2dd1dd1 100644 --- a/sat.py +++ b/sat.py @@ -315,7 +315,7 @@ def print_model(model, cur_game_state, ls: Literals): # evaluates the model to produce a full game history def evaluate_model(model, cur_game_state: GameState, ls: Literals) -> GameState: for m in range(len(cur_game_state.actions), cur_game_state.instance.max_winning_moves): - if model.get_py_value(ls.dummyturn[m]): + if model.get_py_value(ls.dummyturn[m]) or cur_game_state.is_over(): break if model.get_py_value(ls.discard_any[m]): card_idx = next(i for i in range(0, cur_game_state.instance.deck_size) if model.get_py_value(ls.discard[m][i]))