From e22897f58846bf107c9a23e0da6b76ec78e6dd3c Mon Sep 17 00:00:00 2001 From: devhoodit <72541438+devhoodit@users.noreply.github.com> Date: Wed, 8 Mar 2023 20:42:07 +0900 Subject: [PATCH] Fix Blackjack observation from boolean to int as expected (#366) --- gymnasium/envs/toy_text/blackjack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gymnasium/envs/toy_text/blackjack.py b/gymnasium/envs/toy_text/blackjack.py index 0ade543b9..f0ba2c25f 100644 --- a/gymnasium/envs/toy_text/blackjack.py +++ b/gymnasium/envs/toy_text/blackjack.py @@ -25,7 +25,7 @@ def draw_hand(np_random): def usable_ace(hand): # Does this hand have a usable ace? - return 1 in hand and sum(hand) + 10 <= 21 + return int(1 in hand and sum(hand) + 10 <= 21) def sum_hand(hand): # Return current hand total