input: Write a python function to determine the next move for a tic-tac-toe AI player.
  assert game_ai(np.array([[1, 2, 0], [0, 1, 0], [2, 0, 0]]))==(2, 2)
  assert game_ai(np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]]))==(0, 0)
  assert game_ai(np.array([[1, 2, 1], [2, 1, 0], [0, 2, 2]]))==(2, 0)
output: import numpy as np
  
  def game_ai(board):
      def check_win(board, player):
          for i in range(3):
              if all([board[i][j] == player for j in range(3)]) or all([board[j][i] == player for j in range(3)]):
                  return True
          if all([board[i][i] == player for i in range(3)]) or all([board[i][2 - i] == player for i in range(3)]):
              return True
          return False
  
      def get_empty_positions(board):
          return [(i, j) for i in range(3) for j in range(3) if board[i][j] == 0]
  
      def minimax(board, depth, is_maximizing):
          if check_win(board, 1):
              return -1
          if check_win(board, 2):
              return 1
          if not get_empty_positions(board):
              return 0
  
          if is_maximizing:
              best_score = -float('inf')
              for (i, j) in get_empty_positions(board):
                  board[i][j] = 2
                  score = minimax(board, depth + 1, False)
                  board[i][j] = 0
                  best_score = max(best_score, score)
              return best_score
          else:
              best_score = float('inf')
              for (i, j) in get_empty_positions(board):
                  board[i][j] = 1
                  score = minimax(board, depth + 1, True)
                  board[i][j] = 0
                  best_score = min(best_score, score)
              return best_score
  
      best_score = -float('inf')
      best_move = None
      for (i, j) in get_empty_positions(board):
          board[i][j] = 2
          score = minimax(board, 0, False)
          board[i][j] = 0
          if score > best_score:
              best_score = score
              best_move = (i, j)
  
      return best_move