@jit(nopython=nopython, cache=True)
def _indiff_mixed_action(payoff_matrix, own_supp, opp_supp, A, b, out):
 m = payoff_matrix.shape[0]
 k = len(own_supp)
 A[:(-1), :(-1)] = payoff_matrix[own_supp, :][:, opp_supp]
 if is_singular(A):
  return False
 sol = np.linalg.solve(A, b)
 if (sol[:(-1)] <= 0).any():
  return False
 out[:] = sol[:(-1)]
 val = sol[(-1)]
 if (k == m):
  return True
 own_supp_flags = np.zeros(m, np.bool_)
 own_supp_flags[own_supp] = True
 for i in range(m):
  if (not own_supp_flags[i]):
   payoff = 0
   for j in range(k):
    payoff += (payoff_matrix[(i, opp_supp[j])] * out[j])
   if (payoff > val):
    return False
 return True

@ jit ( nopython = nopython , cache = True ) def _indiff_mixed_action ( payoff_matrix , own_supp , opp_supp , A , b , out ) : m = payoff_matrix . shape [ 0 ] k = len ( own_supp ) A [ : ( - 1 ) , : ( - 1 ) ] = payoff_matrix [ own_supp , : ] [ : , opp_supp ] if is_singular ( A ) : return False sol = np . linalg . solve ( A , b ) if ( sol [ : ( - 1 ) ] <= 0 ) . any ( ) : return False out [ : ] = sol [ : ( - 1 ) ] val = sol [ ( - 1 ) ] if ( k == m ) : return True own_supp_flags = np . zeros ( m , np . bool_ ) own_supp_flags [ own_supp ] = True for i in range ( m ) : if ( not own_supp_flags [ i ] ) : payoff = 0 for j in range ( k ) : payoff += ( payoff_matrix [ ( i , opp_supp [ j ] ) ] * out [ j ] ) if ( payoff > val ) : return False return True
given a players payoff matrix payoff_matrix .