Actions

Multiplex Network Pseudocode

From Santa Fe Institute Events Wiki

Generating Network

Node Creation

Basic Node

This code takes graph G and populates it with N nodes with generic state and payoff. def initNodes(G,N):

   for n in range(N):
       G.add_node(n,state=rng.randrange(2),payoff=0)    
   return G

Edge Creation

Basic Edge With Complex Attributes

This code take digraph object G with N nodes and L links and generate links with 2x2 matrix representing the payoffs.

def initEdge(G,N,L):

   for l in range(L):
       i=rng.randrange(N)
       j=rng.randrange(N)
       payoff = np.matrix([[rng.random() for e in range(2)] for e in range(2)])
       G.add_edge(i,j,w=payoff)
       G.add_edge(j,i,w=payoff.transpose())
   return G

Process on Network

Network Update

Asynchronous Update

Node Update

Fermi Rule