Research Article
Potential Consequence of Interconnected Intervention against Systemic Risk (COVID-19) via a Model-Driven Network-Agent Dynamic
Table 4
Code example of the strategy dynamics (exploration).
| for i in range (n): | # loop for every individual within the t loop | #------------------------------------------------------- | | # exploration | | #============ | | temp = B [:,1:3] | # a temporary variable to save strategies | R3 = np.random.random(size = [n, 2]) <= (0.5 pe) | # randomly choose a certain(%) with conditional | temp [R3] += np.random.normal (mu, sigma, size = [n,2])[R3] | # normally distributed increment | B [:,1:3 ] = temp | # update strategy values |
|
|