• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

QuantEcon / QuantEcon.py / 40816254160
94%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 04:14AM UTC
Jobs 1
Files 94
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2026 04:10AM UTC coverage: 94.134% (-0.002%) from 94.136%
40816254160

push

github

web-flow
RFC: Imitation game method via Lemke paths (#997)

* RFC: Factor the pivoting loop of lcp_lemke out into _lcp_lemke_tbl

Move the complementary pivoting loop of `lcp_lemke` into a jitted driver
`_lcp_lemke_tbl` that runs on an initialized tableau and basis, given the
entering variable, the artificial variable, a pivot budget, the `argmins`
workspace and the tolerances, and returns the exit status and the number
of pivots. `lcp_lemke` keeps the trivial case, the tableau initialization
and the special first pivot of the artificial variable, and then calls the
driver. Behavior-preserving: same pivots, statuses and iteration counts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* ENH: Let _lcp_lemke_tbl stop on a set of variables (Lemke paths)

Replace the artificial-variable argument of `_lcp_lemke_tbl` by
`stop_vars`, the indices of the variables whose leaving the basis ends the
pivoting, and allow tableaux of any width of at least 2n+1. With
`stop_vars = [2n]` the driver runs Lemke's algorithm as before (Scheme I);
with a tableau without the artificial column, a feasible complementary
initial basis, `pivcol = n + s` and `stop_vars = [s, n + s]` it follows
the Lemke path from the pure strategy s (Scheme II, the Lemke-Howson
algorithm on a single polytope), as needed for symmetric and imitation
games. The docstring describes both uses.

Tests: the Lemke path of symmetric games reaches the uniform equilibrium of
rock-paper-scissors, ends in one pivot at a strict pure equilibrium,
coincides with the imitator's strategy computed by `lemke_howson` on the
imitation game for random games and every initial pivot, and gives the
same result on a non-contiguous view of a larger buffer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* PERF: Drive the imitation game in compute_fixed_point by _lcp_lemke_tbl

In the imitation game method, replace the two Lemke-Howson tableaux by the
single tableau of the imitator's polytope, [I | shifted payof... (continued)

151 of 151 new or added lines in 3 files covered. (100.0%)

6 existing lines in 2 files now uncovered.

5681 of 6035 relevant lines covered (94.13%)

0.94 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
96.57
-0.08% quantecon/_compute_fp.py
3
97.14
-2.86% quantecon/optimize/lcp_lemke.py
Jobs
ID Job ID Ran Files Coverage
1 40816254160.1 29 Oct 2026 04:14AM UTC 94
94.13
GitHub Action Run
Source Files on build 40816254160
  • Tree
  • List 94
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40816254160
  • 687df208 on github
  • Prev Build on main (#40447362529)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc