Skip to content

Add Spider game variant - #48

Merged
austin-smith merged 1 commit into
mainfrom
spider-variant
Jul 12, 2026
Merged

austin-smith merged 1 commit into
mainfrom
spider-variant

Conversation

@austin-smith

@austin-smith austin-smith commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Closes #21

What Changed

Add Spider game variant: two decks (104 cards) across ten tableau piles, with 1/2/4-suit difficulty selectable in Settings. Single cards land on any card one rank higher; groups move only as same-suit descending runs; the stock deals ten cards at once and is blocked over empty piles; completed King-to-Ace runs bank automatically to eight foundation piles, and one undo restores a full deal or banked run atomically. Scoring is classic Spider (start 500, −1 per move, +100 per run) plus the standard time bonus, with per-suit-count high scores.

Hints come from a new SpiderPlanner (cached-line best-first search, Yukon-style) that can plan through stock deals and falls back to a fill-then-deal preparation line when the tableau is stuck.

Shared-model extensions: variant capability properties on GameVariant, variant-parameterized persistence validation with deck-composition multiset checks, a destination-effects hook in AutoMoveAdvisor so simulation banks runs identically to real play, and a dealTableauRow undo action. The hint probe gains a Spider mode with recorded baselines.

Why

Spider is the most-requested classic variant (#21). Implementing it required genuinely extending shared invariants (single 52-card deck, four foundations, Klondike-shaped stock) rather than just adding switch arms, so those seams are now variant-driven and validated per variant.

Validation

  • Full unit suite passes (six new Spider suites: rules, stock deals, run completion, scoring, persistence, planner — including a probe-verified end-to-end win through the real hint stack).
  • tools/hint-probe/run.sh spider 500: 95.4% / 49.2% / 2.8% hint-following win rates (1/2/4 suits), random controls 0.0%, zero stalemate-loops; Klondike and FreeCell baselines reproduce exactly. Baselines and tuning dead-ends recorded in the probe README.
  • macOS Debug build clean; verified on iPhone simulator and macOS (deal shape, run banking, blocked-deal feedback, hints incl. stock-tap, undo, settings picker, statistics).

UI Changes

New Spider board: stock pile plus eight banked-run piles in the top row over ten columns; suit-count picker in Settings; Spider sections in Statistics and Rules & Scoring; new App Store screenshot fixture.

two decks across ten piles with 1/2/4-suit difficulty, ten-card stock
deals, automatic run banking, classic scoring plus the time bonus,
per-suit-count high scores, and a cached-line planner measured at
95/49/3 percent win rates by the hint probe
@austin-smith austin-smith changed the title Add Spider game variant with solver-backed hints Add Spider game variant Jul 12, 2026
@austin-smith
austin-smith merged commit bb6103b into main Jul 12, 2026
2 checks passed
@austin-smith
austin-smith deleted the spider-variant branch July 12, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Spider Solitaire game variant

1 participant