def opponent_human(env, player=1):
    """
    Human opponent. Asks for input via terminal until a valid action is transmitted

    Args:
        env: The environment
        player=1: {0, 1} for which player to decide

    Returns:
        action to take in form (a, b) where:
            a = player
            b = field to place stone by index
    """

    action = [player, None]
    while action == [player, None] or not env.action_space.contains(action):
        print('Pick a move: ', end='')
        user_input = input()
        action[1] = int(user_input)-1 if user_input.isdigit() else None
    return tuple(action)