@@ -31,7 +31,7 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
3131 Maximum number of pivoting steps.
3232
3333 capping : scalar(int), optional(default=None)
34- If supplied, the routine is executed with the heuristics
34+ If supplied, the routine is executed with the heuristic
3535 proposed by Codenotti et al. [1]_; see Notes below for details.
3636
3737 full_output : bool, optional(default=False)
@@ -81,7 +81,7 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
8181 thus is subject to numerical instability.
8282
8383 * If `capping` is set to a positive integer, the routine is executed
84- with the heuristics proposed by [1]_:
84+ with the heuristic proposed by [1]_:
8585
8686 * For k = `init_pivot`, `init_pivot` + 1, ..., `init_pivot` +
8787 (m+n-2), (modulo m+n), the Lemke-Howson algorithm is executed
@@ -93,8 +93,8 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
9393 `init_pivot` + (m+n-1) (modulo m+n) as the initial pivot, with a
9494 limit `max_iter` on the total number of pivoting steps.
9595
96- Accoding to the simulation results for *uniformly random games*,
97- for medium- to large-size games this heuristics outperforms the
96+ According to the simulation results for *uniformly random games*,
97+ for medium- to large-size games this heuristic outperforms the
9898 basic Lemke-Howson algorithm with a fixed initial pivot, where
9999 [1]_ suggests that `capping` be set to 10.
100100
@@ -124,8 +124,7 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
124124 nums_actions = g .nums_actions
125125 total_num = sum (nums_actions )
126126
127- msg = '`init_pivot` must be an integer k' + \
128- 'such that 0 <= k < {0}' .format (total_num )
127+ msg = f'`init_pivot` must be an integer k such that 0 <= k < { total_num } '
129128
130129 if not isinstance (init_pivot , numbers .Integral ):
131130 raise TypeError (msg )
@@ -162,7 +161,7 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
162161def _lemke_howson_capping (payoff_matrices , tableaux , bases , init_pivot ,
163162 max_iter , capping ):
164163 """
165- Execute the Lemke-Howson algorithm with the heuristics proposed by
164+ Execute the Lemke-Howson algorithm with the heuristic proposed by
166165 Codenotti et al.
167166
168167 Parameters
@@ -320,7 +319,7 @@ def _lemke_howson_tbl(tableaux, bases, init_pivot, max_iter):
320319 """
321320 Main body of the Lemke-Howson algorithm implementation.
322321
323- Perform the complementary pivoting. Modify `tablaux ` and `bases` in
322+ Perform the complementary pivoting. Modify `tableaux ` and `bases` in
324323 place.
325324
326325 Parameters
0 commit comments