Repository navigation
Complete Blackjack simulation milestone - #13203
Open
AlexRasevych wants to merge 10 commits into
Open
AlexRasevych wants to merge 10 commits into
AlexRasevych wants to merge 10 commits into
Conversation
* blackjack brief: simulate stops the line on an engine refusal
play_round was specified as -> SimulatedRound, a type that can only hold a
completed round, while every engine call it drives returns RoundStep and may
be RoundRefused. A learner had to fabricate a round or drop it silently.
Inside a simulation every RoundRefusal cause is a driver defect (fresh
52-card shoe per round, the driver orders the calls), so a refusal is not a
statistic: play_round returns RoundPlay = RoundPlayed | RoundPlayRefused, and
simulate returns BlackjackSimulation = SimulationCompleted { rounds } |
SimulationRefused { round_index, seed, cause }, stopping at the first
refusal with what replays it. The summary loses the requested/completed
pair (a run completes every round or refuses) and summarizes only a
completed run. play_round_from_shoe is split out so the refusal route can
execute in a test (short shoe -> ShoeExhausted). Acceptance bar and the
simulation.dag marker updated; projection regenerated from expected_plan_md
through gunbc.plan plan_generation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kAKvQXHWK1YxuJaKnhQg2
* blackjack brief: run the SimulationRefused arm through simulate itself
The short-shoe test drove play_round_from_shoe directly, so the conversion
from RoundPlayRefused to SimulationRefused inside simulate never executed:
from a plan every shoe is a full deck and no round can refuse, so a
simulate that fabricated a round, carried on, or attached the wrong
index/seed passed every specified test.
simulate is now simulate_shoes(seeded_shoes(plan), rules, strategy), with
SeededShoe { seed, shoe } supplied as values. The prescribed test hands
simulate_shoes three shoes whose second is short and asserts the whole
SimulationRefused { round_index: 1, seed, cause: ShoeExhausted }; the
real-route claim is that simulate(plan) completes exactly plan.rounds
rounds. Projection regenerated through gunbc.plan plan_generation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kAKvQXHWK1YxuJaKnhQg2
---------
Co-authored-by: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RoundPlayandBlackjackSimulationrefusal outcomes.completed plans, summary reconciliation, and paired seeded strategies.
Validation
gunbc compileforsimulation.dag: 0 blocking errors.witnesses fail when their guarded behavior is deliberately broken.
Urandom.ReadBytesbut the local runner reportsunknown service operation: Urandom.ReadBytes.cargo checkcurrently fails ingenerated
std_bytes.rs/std_encoding.rs; generated Rust was not edited.