def actionIndexTuple2Int(actionIdxTuple, numActionList):
  """Transforms tuple of action indices to an action index.

  Args:
      actionIdxTuple (tuple of int): indices of the Q-matrix.
      numActionList (list): consists of the number of actions in evader and
          pursuer's action sets.

  Returns:
      int: action index of the discrete action set.
  """
  rowIdx, colIdx = actionIdxTuple
  assert (
      rowIdx < numActionList[0]
  ), "The size of evader's action set is {:d} but get index {:d}".format(
      numActionList[0], rowIdx
  )
  assert (
      colIdx < numActionList[1]
  ), "The size of pursuer's action set is {:d} but get index {:d}".format(
      numActionList[1], colIdx
  )

  actionIdx = numActionList[1] * rowIdx + colIdx
  return actionIdx