turn phases not functioning simultnaneously. #84
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
in #80 you say
if this is true then this is a bug, ALL players technically act simultaneously, there is no pre-existing info available for the turn.
Confirmed — it's a bug. You're right: all players act simultaneously in each phase, and the current engine leaks current-turn info by seat order.
Verified in the source. Three leaks:
deposit-ratehooks run in seat order and each bank's rate is written immediately after its hook returns. A later seat callingmarket-deposit-rates/market-avg-ratereads THIS turn's rates from earlier seats (plus last turn's for later ones) — exactly the quote you caught from my #80 comment.bond-offershooks: each seat'soffer-bondhits the market immediately, so a later seat'smarket-bondssees earlier seats' fresh offers and can undercut the price exactly.bond-takehooks: fills mutate the market immediately, so a later seat sees a market already thinned by earlier seats' takes.Fix: each decision phase gets a phase-start snapshot, and the phase's reads serve the snapshot — every bank sees the same market regardless of seat:
market-deposit-ratesandmarket-avg-rateread the snapshot.market-bondsreads it.Regression tests will pin this: a two-seat game where seat 1's hook must NOT see seat 0's current-turn rate/offers/takes.
Implementing now on branch
84-simult, PRs only, progress comments per step. The v2 super-AI agent is being steered off the seat-order exploit simultaneously — its deposit model will use last-turn rival rates (opponent modeling), not current-turn reads.Fixed and up for review: PR #85 — #85 (branch
84-simult, commit4900d47).The leak is closed with per-phase snapshots: every seat in a phase reads the same phase-start view.
market-deposit-rates/market-avg-rateserve last turn's posted rates during the deposit phase;market-bondsserves the standing market at the phase's start during the bond phases (cleared at phase end, so reads in other phases stay live). The human now offers and takes first, against exactly the market their screen shows, and AI take wants clamp to the phase-start market cash.Three regression tests pin it: seat 0 posts a rate / places an offer / takes from the market, and seat 1's hooks must see exactly the phase-start view — all three pass, full suite green, vet clean, both spectate rosters 0
[ai/ 0 DIVERGENCE, bench smoke 0 FATALs.Side effect you should know: brains now genuinely see last-turn rates during the deposit phase, so bench win distributions may shift a bit vs the old leaky baseline — that's the intended behavior. The v2 super-AI agent has been re-briefed to model rival rates instead of reading them, so nothing under development depends on the leak.
Merged via PR #85 (
b1f9698on master). Issue closed — ship note:Simultaneous phases are the law now: during a decision phase every seat reads the same phase-start snapshot (last-turn deposit rates, phase-start bond market), the human acts first against the market their screen shows, and AI bond-take wants clamp to the phase-start market cash. Three regression tests (simult_test.go) pin all three leaks; docs/ai-api.md documents the contract.
The v2 super-AI agent on #80 has been re-briefed to predict rival rates from last-turn behavior instead of reading them, so nothing under development depends on the old leak.