|
1 | 1 | import numpy as np |
2 | 2 | from scipy.linalg import solve |
3 | | -from .util import check_random_state |
4 | 3 |
|
5 | 4 |
|
6 | 5 | def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2, |
7 | | - beta=1.0, tol=1e-8, max_iter=1000, random_state=None): |
| 6 | + beta=1.0, tol=1e-8, max_iter=1000): |
8 | 7 | r""" |
9 | 8 | Compute the limit of a Nash linear quadratic dynamic game. In this |
10 | 9 | problem, player i minimizes |
@@ -63,11 +62,6 @@ def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2, |
63 | 62 | This is the tolerance level for convergence |
64 | 63 | max_iter : scalar(int), optional(default=1000) |
65 | 64 | This is the maximum number of iteratiosn allowed |
66 | | - random_state : int or np.random.RandomState/Generator, optional |
67 | | - Random seed (integer) or np.random.RandomState or Generator |
68 | | - instance to set the initial state of the random number generator |
69 | | - for reproducibility. If None, a randomly initialized RandomState |
70 | | - is used. |
71 | 65 |
|
72 | 66 | Returns |
73 | 67 | ------- |
@@ -105,13 +99,12 @@ def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2, |
105 | 99 | else: |
106 | 100 | k_2 = B2.shape[1] |
107 | 101 |
|
108 | | - random_state = check_random_state(random_state) |
109 | 102 | v1 = np.eye(k_1) |
110 | 103 | v2 = np.eye(k_2) |
111 | 104 | P1 = np.zeros((n, n)) |
112 | 105 | P2 = np.zeros((n, n)) |
113 | | - F1 = random_state.standard_normal((k_1, n)) |
114 | | - F2 = random_state.standard_normal((k_2, n)) |
| 106 | + F1 = np.full((k_1, n), np.inf) |
| 107 | + F2 = np.full((k_2, n), np.inf) |
115 | 108 |
|
116 | 109 | for it in range(max_iter): |
117 | 110 | # update |
|
0 commit comments