Exercise short-stack calibration paths
This commit is contained in:
@@ -30,13 +30,13 @@ data class DecisionOffer(
|
||||
val canCheck: Boolean,
|
||||
val canRaise: Boolean,
|
||||
/** Public table state needed by deterministic post-action analysis. */
|
||||
val activeOpponents: Int = 1,
|
||||
val seatsActingAfter: Int = 0,
|
||||
val bigBlind: Int = 2,
|
||||
val activeOpponents: Int,
|
||||
val seatsActingAfter: Int,
|
||||
val bigBlind: Int,
|
||||
/** Current pot this seat can contest if it calls; excludes the call and higher side pots. */
|
||||
val eligiblePot: Int = pot,
|
||||
val eligiblePot: Int,
|
||||
/** Highest amount committed by any seat in the current betting round. */
|
||||
val currentBet: Int = if (street == Street.PREFLOP) bigBlind else 0,
|
||||
val currentBet: Int,
|
||||
) {
|
||||
/**
|
||||
* What calling actually costs.
|
||||
|
||||
@@ -82,9 +82,9 @@ class DecisionContext(
|
||||
* call. The call itself is not included. Excludes unmatched excess and side
|
||||
* pots above this seat's final level.
|
||||
*/
|
||||
val eligiblePot: Int = pot,
|
||||
val eligiblePot: Int,
|
||||
/** Highest amount committed by any seat in the current betting round. */
|
||||
val currentBet: Int = if (street == Street.PREFLOP) bigBlind else 0,
|
||||
val currentBet: Int,
|
||||
) {
|
||||
val hole: IntArray get() = seat.hole
|
||||
val stack: Int get() = seat.stack
|
||||
|
||||
@@ -33,6 +33,8 @@ class DecisionTraceTest {
|
||||
handNumber = 1,
|
||||
decisionToken = 1,
|
||||
bettingReopened = true,
|
||||
eligiblePot = 80,
|
||||
currentBet = if (street == Street.PREFLOP) 2 else 20,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -145,6 +147,7 @@ class DecisionTraceTest {
|
||||
decisionToken = 1,
|
||||
bettingReopened = false,
|
||||
eligiblePot = 40,
|
||||
currentBet = 100,
|
||||
)
|
||||
|
||||
bot.act(ctx)
|
||||
|
||||
@@ -51,6 +51,8 @@ class ProfileBehaviourTest {
|
||||
handNumber = it + 1,
|
||||
decisionToken = (it + 1).toLong(),
|
||||
bettingReopened = true,
|
||||
eligiblePot = 3,
|
||||
currentBet = 2,
|
||||
)
|
||||
val action = bot.act(ctx)
|
||||
if (action.type != ActionType.FOLD) entered++
|
||||
|
||||
@@ -47,6 +47,8 @@ class FoldAndTokenTest {
|
||||
handNumber = 1,
|
||||
decisionToken = token,
|
||||
bettingReopened = true,
|
||||
eligiblePot = 20,
|
||||
currentBet = if (canCheck) 0 else 10,
|
||||
)
|
||||
|
||||
// ---------- fold is honoured, never silently substituted ----------
|
||||
|
||||
@@ -50,6 +50,8 @@ class SnapshotAndHumanAgentTest {
|
||||
handNumber = 1,
|
||||
decisionToken = token,
|
||||
bettingReopened = true,
|
||||
eligiblePot = 15,
|
||||
currentBet = 10,
|
||||
)
|
||||
|
||||
// ---------- snapshots ----------
|
||||
@@ -216,6 +218,8 @@ class HumanOfferAndStreetStateTest {
|
||||
handNumber = 1,
|
||||
decisionToken = token,
|
||||
bettingReopened = true,
|
||||
eligiblePot = 15,
|
||||
currentBet = 10,
|
||||
)
|
||||
|
||||
/** Codex note: the earlier test cancelled the coroutine, never cancel() itself. */
|
||||
@@ -251,6 +255,11 @@ class HumanOfferAndStreetStateTest {
|
||||
seat.committedThisRound = 999
|
||||
assertEquals(500, offer.stack, "offer must not alias live seat state")
|
||||
assertEquals(listOf(0, 5), offer.hole)
|
||||
assertEquals(1, offer.activeOpponents)
|
||||
assertEquals(0, offer.seatsActingAfter)
|
||||
assertEquals(10, offer.bigBlind)
|
||||
assertEquals(15, offer.eligiblePot)
|
||||
assertEquals(10, offer.currentBet)
|
||||
|
||||
human.submit(human.offer.value!!.token, Action(ActionType.FOLD))
|
||||
decision.await()
|
||||
|
||||
Reference in New Issue
Block a user