Repository navigation
Conversation
Adds an adaptive state-machine strategy with dynamic epochs, a stochastic
retaliation buffer (5 + U{1..10}), and a permanent red-line ban after
systemic defections. Includes unit tests (initial C, buffer queue, red line,
reset), strategy registration, classifier entry, and docs index update.
Adds tests for match-length edge cases, end-game harvest, anti-raider, hostile live ban, and epoch/red-line close paths. Updates stochastic and makes_use_of length filter counts after registering ZeroResp.
NumPy 2.x changes scalar repr (np.int64/np.float64) which breaks doctests, match.scores output, and fingerprint probe string equality under CI. Tox already pins numpy==1.26.4 for install_deps; package deps were upgrading to 2.x via numpy>=1.26.4. Constrain the dependency and harden Point creation.
pytest already green (5252 passed, 100% coverage). CI failed on black --check for test_zeroresp and a few pre-existing modules under black 26.x. Format those files so tox commands[1] passes.
Ports ZeroRespV2Core: early-sharp retaliation, echo-shield contrition, one-shot noise forgiveness, deadlock break, plus ZeroResp backbone (epochs, systemic red line, anti-raider, end-game harvest). Includes full TestPlayer suite, registration, classifier YAML, and docs.
Update for maintainers (2026-08-04)Pushed revision 2.2 of ZeroResp v2 (short adaptive buffer, dual noise-aware forgiveness, smart harvest / grim probe). CI was already green on the previous commit; this push should re-run the matrix. Evidence package (algorithm + unit tests + Higher League / deep-validation tables): Why this is ready for the strategy list
Request: please review when you have bandwidth. If two strategies are too many, I can collapse to a single Thank you for maintaining Axelrod — happy to address any requested API/doc changes promptly. |
CI fix for revision 2.2 (just pushed)Addressed the two failures from the previous matrix run:
What is in this PR (for clarity):
Happy to rename the display string to |
|
Can you fix the merge conflicts (#1497 fixed a problem with numpy). |
Take numpy>=2.1 from Axelrod-Python#1497 (Fix numpy version). Keep float() cast in fingerprint point generation for stable probe names across NumPy.
|
Thanks @drvinceknight — merge conflicts with Took |
Replace the v5.3 strategy with production ZeroResp v5.4.4 (noise ladder plus responsiveness-gated apology and cycler contour). Strip Russian and research-diary comments for the Axelrod tree; keep short English docstrings. Update tests for the new name and v5.4.x branches (100% coverage locally). Rebuild classifier table for the renamed player. ZeroRespV2 (rev 2.2) is unchanged.
What
Adds two related adaptive long-memory strategies for the iterated Prisoner's Dilemma:
This PR supersedes #1495 (ZeroResp alone). Prefer reviewing this PR.
Use of AI tools
Strategy logic and tests for ZeroResp v5.4.4 were developed with AI assistance (primarily GLM / Z.ai) on top of the pre-existing ZeroResp v5.3 basis. I set the research questions, accepted or rejected each change, and verified behaviour against paired benchmarks. Grok Bot helped with repository/site publishing and CI monitoring, not with core strategy design. I understand and can explain the submitted code. The change is strategy class(es) plus tests (isolated).
Why
ZeroResp v5.4.4 is the current production build from the project package. At 5% channel noise on the full Axelrod library it is the best of our family (seed 42: full-library #2). Classifiers are honest:
manipulates_state: Truebecause of optional class-level opponent profiles (switchable off viause_profiles/Features).External benchmarks (reproducible package)
Full report and site: https://github.com/Evreu1pro/ZeroResp · https://evreu1pro.github.io/ZeroResp/
How to test
Smoke:
Coverage
Changes
axelrod/strategies/zeroresp.pyaxelrod/strategies/zeroresp_v2.pyaxelrod/tests/strategies/test_zeroresp*.py_strategies.py/ classifiers / docsBreaking
No — additive only. Display name is
ZeroResp v5.4.4(was v5.3 on this branch earlier).Review notes for maintainers
manipulates_stateis True (class-level profiles); setuse_profiles=Falsefor a match-local player.