Asexual_Discrete_Replicator.py
def Matrix(a2,b2,theta):  
    """
   Defining patoff matrixes
   A1: payoff matrix for fruiting body formation
   A2: payoff matrix for macrocyst formation
   A: patoff matrix generated by the mixture of A1 and A2.
      see Eq [2] in the main text for more detail.
   Parameters
   a2: benefit of cmutual ooperation in macrocyst formation
   b2: benefit of exploitation for defectors in macrocyst formation
   theta: prob. of macrocyst fromation
      
   """
    A1=np.array([[a1,h*a1,0],\
                 [e0,e0,e0],\
                 [b1,h*e1,e1]])
    
    A2=np.array([[a2,0,a2],\
                 [b2,e2,b2],\
                 [a2,0,a2]])
    A=(1-theta)*A1+(theta)*A2
    return A

   Defining patoff matrixes
   A1: payoff matrix for fruiting body formation
   A2: payoff matrix for macrocyst formation
   A: patoff matrix generated by the mixture of A1 and A2.
      see Eq [2] in the main text for more detail.
   Parameters
   a2: benefit of cmutual ooperation in macrocyst formation
   b2: benefit of exploitation for defectors in macrocyst formation
   theta: prob. of macrocyst fromation
      
   
Defining patoff matrixes
A1: payoff matrix for fruiting body formation
A2: payoff matrix for macrocyst formation
A: patoff matrix generated by the mixture of A1 and A2.
see Eq [2] in the main text for more detail.
Parameters
a2: benefit of cmutual ooperation in macrocyst formation
b2: benefit of exploitation for defectors in macrocyst formation
theta: prob. of macrocyst fromation
Defining patoff matrixes A1 : payoff matrix for fruiting body formation A2 : payoff matrix for macrocyst formation A : patoff matrix generated by the mixture of A1 and A2 . see Eq [ 2 ] in the main text for more detail . Parameters a2 : benefit of cmutual ooperation in macrocyst formation b2 : benefit of exploitation for defectors in macrocyst formation theta : prob . of macrocyst fromation
def Matrix(a2,b2,theta):  
    A1=np.array([[a1,h*a1,0],\
                 [e0,e0,e0],\
                 [b1,h*e1,e1]])
    A2=np.array([[a2,0,a2],\
                 [b2,e2,b2],\
                 [a2,0,a2]])
    A=(1-theta)*A1+(theta)*A2
    return A
def Matrix ( a2 , b2 , theta ) : A1 = np . array ( [ [ a1 , h * a1 , 0 ] , [ e0 , e0 , e0 ] , [ b1 , h * e1 , e1 ] ] ) A2 = np . array ( [ [ a2 , 0 , a2 ] , [ b2 , e2 , b2 ] , [ a2 , 0 , a2 ] ] ) A = ( 1 - theta ) * A1 + ( theta ) * A2 return A
Defining patoff matrixes
A1: payoff matrix for fruiting body formation
A2: payoff matrix for macrocyst formation
A: patoff matrix generated by the mixture of A1 and A2.
Defining patoff matrixes A1 : payoff matrix for fruiting body formation A2 : payoff matrix for macrocyst formation A : patoff matrix generated by the mixture of A1 and A2 .
"""
   Defining patoff matrixes
   A1: payoff matrix for fruiting body formation
   A2: payoff matrix for macrocyst formation
   A: patoff matrix generated by the mixture of A1 and A2.
      see Eq [2] in the main text for more detail.
   Parameters
   a2: benefit of cmutual ooperation in macrocyst formation
   b2: benefit of exploitation for defectors in macrocyst formation
   theta: prob. of macrocyst fromation
      
   """
a2
b2
theta