Skip to content

Commit 46c894f

Browse files
oyamadhsalberti
andauthored
Removing randomness from lqnash (#752)
* Removing randomness from lqnash * Replace random matrices with matrices with np.inf in lqnash --------- Co-authored-by: Henrique Alberti <[email protected]>
1 parent 8e4b9b9 commit 46c894f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

quantecon/_lqnash.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import numpy as np
22
from scipy.linalg import solve
3-
from .util import check_random_state
43

54

65
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):
87
r"""
98
Compute the limit of a Nash linear quadratic dynamic game. In this
109
problem, player i minimizes
@@ -63,11 +62,6 @@ def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2,
6362
This is the tolerance level for convergence
6463
max_iter : scalar(int), optional(default=1000)
6564
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.
7165
7266
Returns
7367
-------
@@ -105,13 +99,12 @@ def nnash(A, B1, B2, R1, R2, Q1, Q2, S1, S2, W1, W2, M1, M2,
10599
else:
106100
k_2 = B2.shape[1]
107101

108-
random_state = check_random_state(random_state)
109102
v1 = np.eye(k_1)
110103
v2 = np.eye(k_2)
111104
P1 = np.zeros((n, n))
112105
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)
115108

116109
for it in range(max_iter):
117110
# update

0 commit comments

Comments
 (0)