Add Opening (RFI) range viewer alongside push/fold - #3
Merged
Conversation
Standard-stack (20-100bb) raise-first-in ranges by position, as a second mode on the existing Preflop Ranges grid. Mirrors PushFoldRange.swift's shape and honesty posture — hand-tuned study aid, not solver output — and reuses ChenScore + PushFoldRange.scoreThreshold rather than introducing a second hand-ranking system. The 100bb column is sourced (PokerCoaching's implementable GTO charts, cross-verified); 40bb/20bb are disclosed extrapolations from a single anchor point, and SB is deliberately tightened below its cited source after two references disagreed by a wide margin. Full basis and uncertainty notes in ai-docs/RANGES.md. Also fixes the stale "opening/3-bet/4-bet" over-promise in StudyTool's home-screen summary and README now that opening ranges exist (3-bet/4-bet still doesn't). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
testtest126
marked this pull request as ready for review
July 19, 2026 09:26
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
Adds standard-stack (20–100bb) opening / raise-first-in ranges, as a second mode on the existing "Preflop Ranges" grid — the biggest gap identified in a read-only assessment of the app for a beginner MTT/PKO player: the only existing preflop model was short-stack push/fold (1–20bb), covering a minority of an MTT's actual preflop decisions.
PokerKit/Sources/PokerKit/OpeningRange.swift— new model, mirrorsPushFoldRange.swift's shape exactly (same breakpoint/interpolation pattern, sameChenScore-based hand ranking, reusesPushFoldRange.scoreThreshold(forPercentage:)directly rather than a second hand-ranking system).PreflopGrid.swift— one new function,openingDecisions(position:effectiveStackBB:), alongside the existingdecisions(...). No duplication of the 169-hand grid enumeration.PreflopRangeView.swift— a "Push/Fold" / "Opening" segmented control that swaps the model and the stack-slider range (1–20bb vs 20–100bb).StudyTool.swift+README.md— fixed a pre-existing honesty gap: the home-screen summary text promised "opening/3-bet/4-bet ranges" that didn't exist; now accurately describes what's built (opening + push/fold; still no 3-bet/4-bet).OpeningRangeTests.swift(9 tests) + 2 new tests inPreflopGridTests.swift— AA always opens, ranges widen monotonically by position and as the stack shortens, button > UTG, SB > BTN, the load-bearing "grid matches direct decision" invariant, interpolation/clamping. 94/94 PokerKit tests pass (83 existing + 11 new).Correctness — please review
Per this repo's own rule (bad poker math is worse than none), the full source basis and every extrapolation is disclosed in
ai-docs/RANGES.md, not just asserted. Short version:PushFoldRangepicks up. Flagged in the doc as the least trustworthy column.Please specifically sanity-check the SB override and the 40bb/20bb extrapolations — those are the parts I'm least confident in and where your own judgment/experience is worth more than a second web search.
Test plan
swift test --package-path PokerKit— 94/94 passingxcodebuild build -scheme Poker(iPhone 16 Pro simulator) — BUILD SUCCEEDED🤖 Generated with Claude Code