(self, boards_1d, lut_holder)
return hand_ranks
for general docs refer to PokerEnv
for general docs refer to PokerEnv
for general docs refer to PokerEnv
def get_hand_rank_all_hands_on_given_boards(self, boards_1d, lut_holder):
        """
        for general docs refer to PokerEnv
        """
        hand_ranks = np.full(shape=(boards_1d.shape[0], LeducRules.RANGE_SIZE), fill_value=-1, dtype=np.int32)
        for board_idx in range(boards_1d.shape[0]):
            for range_idx in range(LeducRules.RANGE_SIZE):
                hand_ranks[board_idx, range_idx] = self.get_hand_rank(
                    hand_2d=lut_holder.get_2d_hole_cards_from_range_idx(range_idx=range_idx),
                    board_2d=lut_holder.get_2d_cards(cards_1d=boards_1d[board_idx]))

        return hand_ranks
def get_hand_rank_all_hands_on_given_boards ( self , boards_1d , lut_holder ) : hand_ranks = np . full ( shape = ( boards_1d . shape [ 0 ] , LeducRules . RANGE_SIZE ) , fill_value = - 1 , dtype = np . int32 ) for board_idx in range ( boards_1d . shape [ 0 ] ) : for range_idx in range ( LeducRules . RANGE_SIZE ) : hand_ranks [ board_idx , range_idx ] = self . get_hand_rank ( hand_2d = lut_holder . get_2d_hole_cards_from_range_idx ( range_idx = range_idx ) , board_2d = lut_holder . get_2d_cards ( cards_1d = boards_1d [ board_idx ] ) ) return hand_ranks