code: def utility(self, state, player):
          "Return the value to player; 1 for win, -1 for loss, 0 otherwise."
          return if_(player == 'X', state.utility, -state.utilityf utility(self, state, player):
          "Return the value to player; 1 for win, -1 for loss, 0 otherwise."
          return if_(player == 'X', state.utility, -state.utility)
docs: Return the value to player; 1 for win, -1 for loss, 0 otherwise.