Auditing 6.76M Solitaire Deals Offline and Packing 3.56M Wins into 825 KB
Originally published on the Solitaire: Klondike & Spider engineering log . If you shuffle a standard 52-card deck completely at random in Klondike or 4-suit Spider, a large fraction of deals are mathematically unwinnable before the player touches a single card. Shipping pure random shuffles frustrates players who play cleanly and still hit a brick wall. On the other hand, running a search solver…
An engineering log post discusses methods to audit and verify a large number of Solitaire deals while keeping the original deterministic deal generators. A primary goal is to pack verified winning deals into a compact read-only bitset for fast selection. The audit involves shuffling a standard 52-card deck and categorizing the results into seven different rule sets, with a total of 6,759,994 candidate deals.
The verification process includes two-tier offline .NET pipeline with fast solvers and exact legal state-graph traversal. Key factors impacting the win rates include the number of passes allowed in the game, as well as the game's state graph width. All winning records store a fingerprint and move-by-move witness, which is rechecked during catalog export to ensure accuracy.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to