Repository navigation
Releases
v0.5.4
Closes the last gap 0.5.2 and 0.5.3 both recorded rather than fixed: pressing was reported from the press declarations alone.
Fixed
A strategy that pressed from its rules was called flat.
The language changes a stake two ways and draws the line itself — a press <system> declaration, applied per bet stream where the bet resolves, and a press or regress inside a rule, applied at a decision point. Only the first was read, so a ladder built out of rules reported "Flat (no press declared)" wherever it was described.
"Press twice, then collect" — a shipped example whose name says what it does — described itself that way.
Program::pressing now reads both. The declarations come from the stream table; the rules come from the compiled op stream, where rules are laid out in order and each begins with exactly one Op::Rule, so a single linear walk attributes every Press and Regress to the trigger it sits under. bet does not count — it is idempotent on a bet already up — and topping odds is not pressing the flat behind them.
A rule-driven chase rang as nothing at all. Reading the trigger settles the one classification worth settling without deeper analysis: raising a stake because that bet just lost is the Martingale shape, whatever the strategy is called. The Explorer's dot ring shows that now. A press under any other trigger is reported as a positive progression rather than guessed at.
"Flat (no press)" is a claim again rather than a hedge. Both sources are counted, so the "declared" qualifier 0.5.2 added for honesty is no longer needed and is gone.
What gets reported
| the strategy | label | class |
|---|---|---|
| nothing | Flat (no press) |
flat |
press martingale |
Martingale |
chase |
press half-press for hard 6 |
Half press on some bets |
positive |
| two systems | 2 pressing systems, by bet |
chase |
| ladder after a win | Pressed by its rules |
positive |
| press after a loss, nothing declared | Pressed by its rules |
chase |
| regress only | Regressed by its rules |
flat |
| declared + rules | Martingale on some bets, and pressed by its rules |
chase |
Changed
PressingreplacesProgram::declared_pressingas the reported form. It is data rather than prose, so the Explorer's glyph and a chart's caption cannot disagree about the same strategy, andPressClass::ofgives the chase set one definition instead of two copies.Pressing::labelis the full phrase;Pressing::shortfits the Explorer leaderboard's twenty characters, saying less but never anything different — the combined case names its two sources rather than being cut off inside "Reverse D'Alembert".- Lowering a stake is a movement but it is not pressing, so a regress-only strategy keeps a flat glyph while its label says what it does. Three ring classes cannot express a negative progression, and the words carry the rest.
Known gaps
- A press guarded by a condition rather than a trigger —
on roll when streak(pass) < 0: press ...— is a chase the trigger cannot reveal, and reports as a positive progression. Reading fused guards is an analysis pass rather than a walk.
v0.5.3
Closes the audit 0.5.2 left open. Its notes listed Explorer and Duel as unchecked against a strategy run; this is that check.
Duel — audited, no change needed
It was already right, and in the ways that matter:
- the authored side gets an explicitly empty selection plus the compiled program, so nothing can read a bet rail by accident
- the combo name omits the progression rather than printing a placeholder
- it reports no per-dollar edge for a rule set, because one has no closed form — the spec's own rule about not drawing a fabricated analytic line
Fixed
The Explorer called a written strategy flat, in four places.
A written strategy enters the Explorer as four rows pinned to Progression::Flat — deliberately, because the Explorer does not cross a strategy with the twelve progressions, and the engine has a test holding it to that. The pin is a placeholder, not a reading.
Four sites rendered it anyway: the dot tooltip, the results table, the copied text, and the dot's ring, which encodes pressing class and drew nothing at all — the legend's word for flat. A strategy that Martingales its don't pass was described, four ways, as pressing nothing. The same sentence the Findings histogram carried until 0.5.2, in a screen the 0.5.2 notes had listed as unaudited.
The three text sites now ask the strategy, and say "as written" when the compiled program in hand cannot be proved to be the one that produced the rows on screen. The ring is classified from what the strategy declares, ringing for the heaviest system it declares — three classes cannot say more than that, and "flat" was the one answer that was wrong.
The Explorer was correct everywhere someone had already thought about the sentinel: it never indexes the curated list with it, the authored lane is placed rather than computed, and the edge column reads a dash.
Added
Program::declared_pressing— the structured form behindProgram::pressing_label, for callers that classify rather than print.
Also confirmed
Neither screen reads the bet rail's selection at all. That was the defect behind all six of the 0.5.2 fixes, and it is not present in either.
v0.5.2
Six readouts on the Findings screen described the bet rail while a strategy held the dice.
None of them failed, which is why each had to be noticed by eye. The rail is a real player with real numbers, so every one of them answered confidently about somebody who was not playing.
Fixed
The wealth fan drew one flat line at the buy-in. It traced the bet rail, and a strategy run leaves the rail with no live bets, so what it drew was a player who never bets — 200 of 200 traced sessions dead flat. The engine had no strategy-aware trace at all; trace_program_wealth is now the compiled-player twin of trace_wealth, seeded and constructed exactly as run_program_session so a traced session is the session the sweep ran.
The house edge went missing, then reported the pass line's. A strategy has no closed form — its stakes are conditional, so there is no flat-rate blend to solve. The first fix asked whether the rail had bets ticked, which is the wrong question: the rail keeps its selection while a strategy plays, because switching to Rules must not discard what was on Checkboxes. So with the default pass line still on, Findings reported −1.41% per resolved dollar — the pass line's edge — for a run the pass line took no part in. The edge is now measured where no closed form exists: drift over handle, labelled as measured and over how many sessions, because a counted edge carries sampling error and a solved one does not.
The House Line asserted a strategy broke even. It was guarded on flat stakes and no quit target, but not on there being a rail at all. With none, the drift solves to zero and the line was drawn at exactly the buy-in and called an expectation; with the rail left as Checkboxes had it, it was drawn at the rail's expectation, which is worse for looking like a real number.
The Anchor offered thirteen pressing systems to a strategy that declares its own. Choosing one re-simulated the empty rail under a progression nobody had picked, and drew it as this strategy pressed differently.
The histogram was captioned "Flat (no press)" over every strategy. That was the rail's progression. It now reports what the strategy declares, and tells apart the cases worth distinguishing: none, one system (and whether it covers every stream or only some bets), or several. It reports declarations only — a strategy can also press from its rules, and no phrase over a histogram summarizes a conditional ladder honestly — so the flat case reads "no press declared" rather than "no press", which would be false of exactly that strategy.
The status bar said "no bets selected" when a strategy was playing. That strategy has an edge; it simply is not solvable from the rail.
Changed
The bankroll, the table minimums and the house rules are on the Rules tab too. Picking Rules chose the strategy and hid all fifteen run-scope settings, because they hung off the bet rail's branch of the same conditional. None of them belongs to the rail, and place_the_point is a table rule deciding what a strategy may legally bet that was reachable only while the strategy was not playing. The cost was not a missing control but a forced trip across the player switch to reach it, which leaves you on the tab where Run means the rail plays.
The compiled-strategy performance tripwires are set from a distribution rather than from the last reading. They fired on a commit that added a PDF and changed no engine code — the second time the gate went red on a machine rather than on a change. Six CI runs over one unchanged engine read 3.72× to 4.76× on the loaded configurations against a 4.5× tripwire. Both tripwires now sit about four standard deviations above the mean, leaving a catastrophe detector — an interpreter three times slower still trips it — and giving up detecting drift of a few percent, which nothing measured on a shared runner can do honestly. The table is published to the run summary on every run so the trend stays readable.
Known gaps
- Only Findings and Replay were audited for this. Explorer and Duel read the same configuration and have not been checked against a strategy run.
- The pressing caption reports
pressdeclarations, not presses driven by rules.
v0.5.1
Craps Sim 0.5.1 fixes three defects in the strategy examples that ship with the app. An example is where most people meet this language, so these are worth naming plainly.
Fixed:
-
A pressed place bet climbed without limit. "Press twice, then collect" is supposed to press a number on its first two hits and regress after that; instead the stake ratcheted upward without stopping — past $384 within forty simulated sessions. Letting a rule's press survive the next roll had been done by writing the rule's figure into that bet's pressing system, and the pressed level then outlived the bet it belonged to: a seven-out took the bet, the next roll put a fresh one up at the base stake, and the table quietly topped it back to the old level, from which the rule pressed again. A flat pressing system now leaves a winner alone, which is what "flat" always meant. Only strategies that press from a rule were affected — the checkbox player and all twelve progressions are unchanged, and the pinned outcome checksums confirm it.
-
"The field is due" bet after one field number instead of two. A strategy is consulted before every roll including the very first, where the last total reads zero — and zero is under four, so a condition written as
last-total <= 4counted a field number that had not happened. The example was modelling the superstition one roll more eagerly than the superstition itself, which is the one thing that example exists not to do. -
A condition shown as text named memory by its slot number. On the Rules tab, a condition too complex for the typed rows is displayed as its own text so you can edit it there — and that display was writing
var0 >= 2where the strategy saysstreak >= 2, naming something that appears nowhere in your strategy. The rows immediately below it had the names all along. -
A refused
regressdescribed itself in the Replay ledger as a refused bet.
Both example defects are now pinned by tests that assert what the prose promises rather than only that the strategy runs: the 6 never passes its second press, and the streak never counts a roll that has not happened. Section 7 of the design specification is generated from those same examples, so the document cannot describe a strategy the tests do not run.
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Craps Sim 0.5.0 adds a strategy language. A betting strategy no longer has to be one of the eleven built in — you can write the one you actually argue about.
Added:
-
Write your own strategy. A strategy is a header and an ordered list of rules —
on <trigger> when <condition>: <actions>— with pressing declared per bet stream. What the checkbox player could never say is now sayable: press the 6 on its own second hit, call the place bets off until the shooter makes a point, Martingale the don't pass while the place bets stay flat, stop at −$200 or +$150, bet the field only after two field numbers in a row. Design's new Rules tab builds one from typed slots where a syntax error is not representable, or you can type it as text; both edit the same thing, so neither can say something the other cannot hold. Four worked examples ship under Examples. Most of them are bad bets and one is deliberately superstitious — the app exists to show you that, and it cannot refute a belief it cannot express. -
The Bench, on Replay: a strategy's night stepped roll by roll, with every rule that fired marked, every cent attributed to the rule that asked for it or to the table, every refusal explained in words, and a fire count per rule — so a rule that never fires says so, instead of quietly doing nothing while the distribution looks confident.
-
Strategies are saved and travel. Plain-text
.crapsfiles beside your preferences, and the shareable scenario sentence carries the strategy that played by name and content hash —playing "44 Inside, regressed" #9f3c1a2b. Paste someone's sentence and if your copy of that strategy has changed, it says so rather than running the wrong player. -
The Explorer ranks your strategy too, as its own rows beside the curated eleven, and the Duel runs it against any of them on identical dice.
-
The table answers for itself. Strategies can read the buy-in, the table minimum and maximum, and the house rules in play, so a stop-loss can be half the buy-in rather than a dollar figure that is right at one table and quietly wrong at every other, and a strategy whose arithmetic assumes a particular field payout can decline a table that does not have it.
-
Working on the come-out, and a table setting for whether the point may be placed as well as covered by the line — off by default, because turning it on changes what every strategy that places numbers does.
Fixed:
The language was reviewed hard before release, and the review is in the repository at docs/STRATEGY_DSL_REVIEW.md alongside the design specification. Its worst findings were all the same shape — a strategy that compiled and then quietly played something other than what was written — and all of them are closed:
- A stake below the table minimum was accepted, so a strategy asking for twelve dollars could ride for twelve cents through three hundred rolls without one refusal. Sub-minimum stakes are refused now, oversized ones are clipped where you can see it, and money is written back as money.
- Presses could not climb. Pressing a bet to twice what it currently holds recomputed the same figure forever, which made every press-and-ride ladder in craps unreachable — including the one the shipped example's own description promised.
- Rules written on the start of a session never fired, and declared starting values for memory were discarded. Both work.
- Out-of-range numbers wrapped into valid ones:
place 260became a place 4, andtotal(263)fired on every seven. They are refused, and the message names the number. - Two ways to crash the app from pasted strategy text.
- Refusals now name which action was refused and how much it asked for, and "not allowed right now" has been split into the actual rules of craps it was standing in for.
Full Changelog: v0.4.3...v0.5.0
v0.4.3
Craps Sim 0.4.3 fixes the dim-text bug on light-mode systems and gives the app its icon.
Fixed:
- Dim widget text on systems whose OS runs in light mode. egui keeps separate dark/light style slots and resolves the active one from the OS theme, which arrives one frame after startup — the app's colors landed in the slot that was about to go inactive, leaving egui's factory defaults on screen until you toggled themes by hand. The theme now writes both slots, and a first launch with no saved preference follows the real OS theme. (Thanks to the two reports that pinned this down.)
Added:
- An application icon — the "Seven-Out Curve": the ending-bankroll histogram with its ruin-red bust bar and a thrown 4-and-3 landing at its foot, in the app's own palette. In the macOS Dock and Finder, embedded in the Windows executable for Explorer/taskbar/Alt-Tab, and set as the runtime window icon everywhere.
Full Changelog: v0.4.2...v0.4.3
v0.4.2
Craps Sim 0.4.2 makes every chart label legible and fixes the Duel's blank first impression.
Fixed:
- A fresh Duel opened its replayed night at roll zero — an empty trajectory panel until a session pick was clicked. It now opens fully revealed.
- The trajectory chart's "population envelope · sampled n" provenance line was drawn on the bottom paint layer, where every wealth track painted over it; it now sits above the data, legibly.
- Hexbin edge cells overhung the axis gutters onto the tick numbers; cells are now culled by their full extent.
Changed:
- Every label that can sit on data marks now draws on a near-opaque ground pill, following an audit of all text-over-chart sites: the Explorer strip's hover readout; survival line-end, censor, and probe labels; the histogram's log-scale note, house-gap caption, pinned edge, brush mass, and tie-verdict banner; trajectory drift, mean, end-tick, and series labels ("night #N" and "bust" also no longer stack); hexbin quadrant counts; ladder percentile, 1×, and mean labels (with crowding avoidance); the Stake budget and confidence readouts; the ghost panel's copy; and Design's blended-edge label.
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Craps Sim 0.4.1 fixes the rough edges of the 0.4.0 interface.
Fixed:
- Replay's play button plays. The theater still opens with the full night revealed; play now rewinds to the top when pressed at the end, resumes in place mid-night, animates without needing mouse movement, and defaults to 60× (1× — literal casino time, one roll every ~36 seconds — is one keypress away).
- The Duel plays by the Explorer's rules. Odds are always available to strategies that take them; previously the main Design's odds toggle could silently strip odds from a duel of odds-taking combos.
- The Duel screen scrolls — the A-vs-B scatter, paired-difference histogram, and decile ladder were unreachable below the fold.
Changed:
- Custom table minimums (e.g. $250) join the Design chip row as real chips in their reserve color, clickable off like any canonical chip.
- The Explorer gains an always-visible Duel bar explaining click/shift-click selection, naming both armed sides, and offering an "Open the Duel ▶" button (D still works).
- The Duel's session picks highlight the active choice beside a "showing night #N" readout.
- In Explorer mode the left rail reports the sweep instead of the Findings run's per-minimum lanes.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Craps Sim 0.4.0 rebuilds the interface as a four-mode instrument: Design (bet rail with per-bet edge ticks, progression cards, chip toggles, house rules), Findings (Endurance, Horizon, and Stake over one streaming run), Explorer (the strip of 528 combos with an honest leaderboard), and Replay (roll-by-roll session theater). Runs stream into the charts as they simulate, with instant cancellation and fully interactive partial results.
Highlights:
- The Anchor — swap any of the twelve progressions on the Horizon histogram and watch the distribution morph, re-simulated on identical dice; the per-dollar edge marker stays pinned while the expected-loss pin drifts.
- The Duel — paired comparison of two strategies under common random numbers: identical dice, a same-dice replayed session, a y = x scatter, a paired-difference histogram with a tie band, and a paired decile ladder.
- Session Replay — any percentile, bar, or dot opens the exact re-simulated session inside the population's percentile envelope, above a roll-by-roll dice strip with bet resolutions to the cent.
- The Scenario Sentence — the whole configuration as one line of prose; copying it is the save format, pasting one reconstructs the setup.
- Chart interaction — brush to zoom, ⌘-scroll zoom, ⇧-scroll pan (clamped to the data), and up to three pinned references that print their values, the Δ between the last two, and survive into 2× PNG exports with provenance baked in.
- Closed-form house edge everywhere — per-bet ticks and a blended edge strip in Design, a fixed EDGE column in the Explorer, and the edge in the status baseline.
- Dark and light themes, an explicit user-visible seed, and a deterministic engine with pinned outcome checksums.
The macOS build is a signed, notarized DMG. See CHANGELOG.md for the complete list.
Full Changelog: v0.3.0...v0.4.0