(self, reach_probs, board_2d)
return equity * self._eq_const
Returns:
            equity: negative=lose. positive=win. 0=50%/50%
Returns:
            equity: negative=lose. positive=win. 0=50%/50%
Returns : equity : negative = lose . positive = win . 0 = 50% / 50%
def _get_call_eq_final_street(self, reach_probs, board_2d):
        """
        Returns:
            equity: negative=lose. positive=win. 0=50%/50%

        """
        c = self._env_bldr.lut_holder.get_1d_cards(board_2d)[0]

        assert c != Poker.CARD_NOT_DEALT_TOKEN_1D

        equity = np.zeros(shape=(self._tree.n_seats, self._env_bldr.rules.RANGE_SIZE), dtype=np.float32)
        handranks = np.empty(shape=self._env_bldr.rules.RANGE_SIZE, dtype=np.int32)

        for h in range(self._env_bldr.rules.RANGE_SIZE):
            handranks[h] = self._env.get_hand_rank(
                board_2d=board_2d,
                hand_2d=self._env_bldr.lut_holder.get_2d_hole_cards_from_range_idx(range_idx=h))

        for p in range(self._tree.n_seats):
            opp = 1 - p
            for h in range(self._env_bldr.rules.RANGE_SIZE):
                if h != c:
                    for h_opp in range(self._env_bldr.rules.RANGE_SIZE):
                        if h_opp != h and h_opp != c:
                            # when same handrank, would be += 0
                            if handranks[h] > handranks[h_opp]:
                                equity[p, h] += reach_probs[opp, h_opp]
                            elif handranks[h] < handranks[h_opp]:
                                equity[p, h] -= reach_probs[opp, h_opp]

        assert np.allclose(equity[:, c], 0)
        return equity * self._eq_const
def _get_call_eq_final_street ( self , reach_probs , board_2d ) : c = self . _env_bldr . lut_holder . get_1d_cards ( board_2d ) [ 0 ] assert c != Poker . CARD_NOT_DEALT_TOKEN_1D equity = np . zeros ( shape = ( self . _tree . n_seats , self . _env_bldr . rules . RANGE_SIZE ) , dtype = np . float32 ) handranks = np . empty ( shape = self . _env_bldr . rules . RANGE_SIZE , dtype = np . int32 ) for h in range ( self . _env_bldr . rules . RANGE_SIZE ) : handranks [ h ] = self . _env . get_hand_rank ( board_2d = board_2d , hand_2d = self . _env_bldr . lut_holder . get_2d_hole_cards_from_range_idx ( range_idx = h ) ) for p in range ( self . _tree . n_seats ) : opp = 1 - p for h in range ( self . _env_bldr . rules . RANGE_SIZE ) : if h != c : for h_opp in range ( self . _env_bldr . rules . RANGE_SIZE ) : if h_opp != h and h_opp != c : # when same handrank, would be += 0 if handranks [ h ] > handranks [ h_opp ] : equity [ p , h ] += reach_probs [ opp , h_opp ] elif handranks [ h ] < handranks [ h_opp ] : equity [ p , h ] -= reach_probs [ opp , h_opp ] assert np . allclose ( equity [ : , c ] , 0 ) return equity * self . _eq_const