No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Winnie/bankwars!101
Loading…
Reference in a new issue
No description provided.
Delete branch "100-nondet"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause found and fixed.
The bug:
openLoanOffersis the one phase-scratch global the engine reads before it writes — turn-1 deposit hooks call(market-loans)before the game's own shelf opens. The bench iterates its preset map in random order, so the previous preset's LAST shelf bled into the next preset's first-turn deposit decisions. Identical binaries, same seeds, different run orders → different turn-1 rates → close games flipped. That is the +-1 win in bond-economy/micro-economy (the presets where the deposit decisions most distort the attrition outcome), plus the small equity drift elsewhere.The fix:
run()clearsopenLoanOffersat game start. A fresh game's turn-1 deposit phase sees an honest empty market, every time, in any order.Regression test (stale_shelf_test.go): plants a stale shelf, runs a probe brain whose deposit hook posts the turn-1 shelf length and sticks with it — must post 0 (empty market) and the shelf must still open normally during the game. Fails without the fix, passes with it.
Verification: the two identical 30-game benches that previously differed by 84 lines (adapt 14<->15, super 6<->7, equity drift) are now byte-identical (0 diff lines). go build, full test suite, go vet clean.
Impact for #97: per-preset tables are now exact; the team can compare across agents and runs without the +-1 noise.