From 0d0f1900f4cb6a6dc03c18a2b381bc31105c6ce0 Mon Sep 17 00:00:00 2001 From: Michael Cochez Date: Fri, 31 Jan 2025 10:12:48 +0100 Subject: [PATCH] Flipped rank and suit encoding vectors. Closes #137 --- src/schnapsen/bots/ml_bot.py | 4 ++-- src/schnapsen/deck.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/schnapsen/bots/ml_bot.py b/src/schnapsen/bots/ml_bot.py index 497f81e..baa900b 100644 --- a/src/schnapsen/bots/ml_bot.py +++ b/src/schnapsen/bots/ml_bot.py @@ -303,8 +303,8 @@ def get_move_feature_vector(move: Optional[Move]) -> list[int]: if move is None: move_type_one_hot_encoding_numpy_array = [0, 0, 0] - card_rank_one_hot_encoding_numpy_array = [0, 0, 0, 0] - card_suit_one_hot_encoding_numpy_array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + card_rank_one_hot_encoding_numpy_array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + card_suit_one_hot_encoding_numpy_array = [0, 0, 0, 0] else: move_type_one_hot_encoding: list[int] diff --git a/src/schnapsen/deck.py b/src/schnapsen/deck.py index b5b7276..29bf228 100644 --- a/src/schnapsen/deck.py +++ b/src/schnapsen/deck.py @@ -154,7 +154,7 @@ def get_card(rank: Rank, suit: Suit) -> Card: """ Get a Card for the provided Rank and Suit. - Internally, this uses a cache for effieciency and to prevent duplicate card objects. + Internally, this uses a cache for efficiency and to prevent duplicate card objects. :param rank: (Rank): The rank of the card. :param suit: (Suit): The suit of the card.