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

QuantEcon / QuantEcon.py / 28772150934
94%

Build:
DEFAULT BRANCH: main
Ran 06 Jul 2026 06:26AM UTC
Jobs 3
Files 162
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

06 Jul 2026 06:23AM UTC coverage: 93.049% (+0.04%) from 93.008%
28772150934

push

github

web-flow
FIX: Fix premature convergence in AS equilibrium_payoffs (#848)

* FIX: Fix premature convergence in AS equilibrium_payoffs

The AS algorithm in RepeatedGame.equilibrium_payoffs could return the
feasible payoff hull instead of the equilibrium payoff set: u_init
defaulted to zeros and _update_u ran only after the convergence check,
so whenever no IC constraint bound against u_init at the first
iteration (e.g., for the Prisoner's Dilemma with payoffs [[9, 1],
[10, 3]], or any game with payoffs sufficiently above zero), _R
reproduced the initial payoff points exactly and the loop exited
before the threat points were ever updated.

Fixes:

- Default u_init to the minimum payoff of each player (the
  initialization in Abreu and Sannikov (2014)), and clip a supplied
  guess from below by the minimum payoffs. This also fixes the
  uninformative "zero-size array" error for games with all-negative
  payoffs under the previous default.
- Update the threat points before the convergence check, and require
  them to be unchanged for convergence, so that a fixed W with still
  moving threat points is not reported as converged.
- Raise an informative ValueError when no incentive-compatible payoff
  vector is found (the game may have no pure-action subgame perfect
  equilibrium for the given discount factor).

Tests: the default and low u_init now reproduce the known equilibrium
payoff sets of the Abreu-Sannikov (2014) example and of the Prisoner's
Dilemma; the no-pure-action-SPE error is tested on a game with no pure
Nash equilibrium at a low discount factor. Results were cross-checked
against GameTheory.jl and, for one case, a 256-bit BigFloat reference
computation.

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

* MAINT: Document the exact threat point comparison

Follow up on review: a tolerance-based comparison of the threat points
in the convergence check was tried and rejected, as stopping while the
threat points are still moving by sub-tol amounts le... (continued)

26 of 26 new or added lines in 2 files covered. (100.0%)

8019 of 8618 relevant lines covered (93.05%)

2.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28772150934.1 06 Jul 2026 06:26AM UTC 162
93.05
GitHub Action Run
2 28772150934.2 06 Jul 2026 06:27AM UTC 162
93.05
GitHub Action Run
3 28772150934.3 06 Jul 2026 06:28AM UTC 162
93.05
GitHub Action Run
Source Files on build 28772150934
  • Tree
  • List 162
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5a0cb644 on github
  • Prev Build on main (#28308015421)
  • Next Build on main (#28772176408)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc