code: def minimax_decision(state, game):
      
  
      player = game.to_move(state)
  
      def max_value(state):
          if game.terminal_test(state):
              return game.utility(state, player)
          v = -infinity
          for a in game.actions(state):
              v = max(v, min_value(game.result(state, a)))
          return v
  
      def min_value(state):
          if game.terminal_test(state):
              return game.utility(state, player)
          v = infinity
          for a in game.actions(state):
              v = min(v, max_value(game.result(state, a)))
          return v
  
      # Body of minimax_decision:
      return argmax(game.actions(state),
                    lambda a: min_value(game.result(state, a)))
docs: Given a state in a game, calculate the best move by searching
      forward all the way to the terminal states. [Fig. 5.3]