(self)
return self._get_fixed_action(self._get_env_adjusted_action_formulation(action_int=action_idx))
Returns action in Tuple form.
Returns action in Tuple form.
Returns action in Tuple form .
def human_api_ask_action(self):
        """ Returns action in Tuple form. """
        while True:
            try:
                action_idx = int(
                    input("What action do you want to take as player " + str(self.current_player.seat_id) + "?"))
            except ValueError:
                print("You need to enter one of the allowed actions. Refer to the tutorial please.")
                continue
            if action_idx < Poker.FOLD or action_idx >= self.N_ACTIONS:
                print("Invalid action_idx! Please enter one of the allowed actions as described in the tutorial above.")
                continue
            break
        time.sleep(0.01)

        return self._get_fixed_action(self._get_env_adjusted_action_formulation(action_int=action_idx))
def human_api_ask_action ( self ) : while True : try : action_idx = int ( input ( "What action do you want to take as player " + str ( self . current_player . seat_id ) + "?" ) ) except ValueError : print ( "You need to enter one of the allowed actions. Refer to the tutorial please." ) continue if action_idx < Poker . FOLD or action_idx >= self . N_ACTIONS : print ( "Invalid action_idx! Please enter one of the allowed actions as described in the tutorial above." ) continue break time . sleep ( 0.01 ) return self . _get_fixed_action ( self . _get_env_adjusted_action_formulation ( action_int = action_idx ) )