How is this calculated?
The calculator picks the simplest engine that gives an exact answer for your scenario, falling back to simulation only when the closed form blows up. Three paths:
1. Exact (no scry sources, no per-turn deadlines): joint multivariate hypergeometric. For groups with deck counts k₁..kᵣ and "other" pool k₀ = N − Σkᵢ, we enumerate every opening composition (h₁..hᵣ, h₀), simulate the mulligan strategy, then sum over replacement+extra-draw combinations whose final hand satisfies every min ≤ hᵢ ≤ max. Mulligan priority: above-max copies (forced) → "other" cards → above-keep duplicates. Per-group Keep target = 0 if Keep is unchecked, min if aggressive, ∞ if conservative.
2. Exact + Scry (single group, min=1, max=∞, ≤1 scry source): for a binary "≥1 hit" question, a scry of "look at L keep K" is mathematically equivalent to seeing L extra cards from the unseen pool — because if any of the L is a hit, you'd choose to keep it. Per opening composition (hg, hd, ho), total cards drawn from unseen = replacements + extra-turn draws + (scries played × L), and these are disjoint. Hit ⟺ kept opening has ≥1 group OR ≥1 group in those T unseen cards. That's a clean hypergeometric inside an outer sum over compositions — fully closed form, no sampling noise.
3. Sequential Monte Carlo (any group has a "By turn" deadline): 50,000 trials per level. Each trial deals an opening hand, runs the mulligan (per-group Keep flags + global strategy), then draws turn cards one at a time. After every draw event we check each group whose deadline equals the current cumulative card count: if its min isn't met yet, that trial fails. This is the right model for curve queries where order matters — a 1-drop drawn on turn 4 cannot be played on turn 1, so "by turn 1" deadlines must be checked at turn 1, not at the end. The Play / Draw selector decides whether T1 includes a turn draw. Scry sources are not yet supported in this mode.
4. Monte Carlo (everything else with scries): 50,000 trials per mulligan level. Each trial: shuffle, deal opening, mulligan per strategy (scry sources are kept), draw replacements, draw extra-turn cards, play up to Scries Played scry sources from hand — each looking at top N cards and keeping the one most useful for unmet group minimums — then check the final hand against all constraints. The 95% CI shown reflects sampling noise.
Why we use Monte Carlo for DYB instead of just adding cards to a hypergeometric. "Look at 2, keep 1" is not the same as "draw 2 more cards" once your query has any of these shapes:
1. Joint queries. If you need ≥1 A AND ≥1 B and the 2 cards DYB reveals are exactly one A and one B, you can keep only one. A "+2 draws" model would credit both. Closed form needs an inclusion-exclusion that depends on which group "wins" the keep slot, multiplied across all DYBs played.
2. min > 1 in a single group. Need ≥2 ramp? Each DYB contributes at most 1 ramp to the kept count, not 2. The capacity of a scry is bounded by keep, not look-at.
3. The DYB has to be in your hand to fire. The scry effect is conditional on opening (or post-mulligan) hand containing the source — which itself competes for deck slots with your targets and gets cycled by the mulligan.
4. Scries chain. A second DYB looks at the cards after the first DYB's bottomed card moves to the bottom — the deck composition seen by scry #2 depends on what scry #1 kept. Independent draws don't model this.
5. Strategy interacts with mulligan and aggressive bottoming. Whether to keep a duplicate ramp piece in opening, vs trust a DYB to find one, depends on counts you haven't drawn yet.
Each of these is solvable in closed form for a single isolated case, but combining all five into one general formula produces a sum over thousands of configurations — in practice longer to derive correctly than to simulate. Monte Carlo with 50k trials per level gives ±0.4% CI on a 50% probability and runs in well under a second. For queries with no scry sources, we still use the exact closed-form.
Bottom line: for a single "≥1 of one group" query you can fake DYB as +(look) Extra Draws and the answer matches. For anything else, the simulator is the honest engine.