def beta_pruning_terminal_state(state, depth_remaining, time_remaining):
    """ Terminal state returns True when we reach a terminal state,
    or when we run out of time or depth we're allowed to search

    :param state: The state to evaluate if it is in a terminal state
    :param depth_remaining: The remaining depth
    :param time_remaining: The time remaining
    :return: True if we hit a terminal or cut-off state, False otherwise
    """
    if depth_remaining <= 0 or time_remaining <= 0:
        return True
    end_state_nodes = []
    for alpha in list(map(chr, range(104, 112))):  # iterate from h-o
        end_state_nodes.append(str(alpha))
    if state in end_state_nodes:
        return True
    return False