{
 "version": 1,
 "generated": "2026-10-06T04:45:25.609Z",
 "commit": "79a1f35",
 "engineFilesChanged": [],
 "runtime": {
  "node": "v25.9.0",
  "swift": "swift-driver version: 1.148.6 Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)",
  "deckLock": 1
 },
 "passBar": 0.0001,
 "seconds": 242,
 "sizes": {
  "jsHands": 1000000,
  "jsDecks": 2000000,
  "swiftHands": 1000000,
  "swiftDecks": 1000000,
  "turnSpots": 200000,
  "flopSpots": 30000,
  "variantHands": 3000,
  "seatCheat": 10000,
  "showdowns": 100000,
  "allins": 10000,
  "resume": 600,
  "dataset": 100000
 },
 "headline": {
  "hands": 2000000,
  "decks": 3000000,
  "jsHands": 1000000,
  "swiftHands": 1000000,
  "locksChecked": 5072000,
  "lockFailures": 0,
  "tests": 111,
  "passed": 111,
  "allPassed": true
 },
 "pValues": {
  "tests": 92,
  "below05": 3,
  "expected05": 4.6,
  "below01": 1,
  "expected01": 0.92,
  "smallest": 0.008145,
  "evenSpread": 0.3051
 },
 "expected": {
  "pair": 0.0588235,
  "suited": 0.235294,
  "premium": 0.025641,
  "aces": 0.00452489,
  "flopPaired": 0.171765,
  "flopOneSuit": 0.0517647,
  "boardHitsHero": 0.487432
 },
 "sources": {
  "js": {
   "label": "Web and Android engine (JavaScript), real hands",
   "hands": 1000000,
   "seconds": 81.919,
   "display": {
    "hands": 1000000,
    "pairs": 0.058922,
    "suited": 0.23537,
    "premium": 0.02575,
    "aces": 0.004601,
    "flopPaired": 0.1715,
    "flopOneSuit": 0.051619,
    "boardHitsHero": 0.48693,
    "strengthBySeat": [
     0.45339,
     0.4526,
     0.45289,
     0.45304,
     0.45311,
     0.45321
    ],
    "longestWithoutPair": 171,
    "heroCardMost": 38849,
    "heroCardLeast": 38186,
    "heroCardExpected": 38461.5
   },
   "runouts": {
    "turn": {
     "spots": 200000,
     "expectedWins": 131.841,
     "z": 0.9476,
     "p": 0.34332292960233085,
     "buckets": [
      {
       "from": 0,
       "to": 0.2,
       "spots": 74538,
       "expected": 0.086546,
       "won": 0.08707
      },
      {
       "from": 0.2,
       "to": 0.4,
       "spots": 22323,
       "expected": 0.26771,
       "won": 0.26694
      },
      {
       "from": 0.4,
       "to": 0.6,
       "spots": 6016,
       "expected": 0.50005,
       "won": 0.50499
      },
      {
       "from": 0.6,
       "to": 0.8,
       "spots": 22295,
       "expected": 0.73223,
       "won": 0.73346
      },
      {
       "from": 0.8,
       "to": 1,
       "spots": 74828,
       "expected": 0.91376,
       "won": 0.91447
      }
     ],
     "favourite": {
      "spots": 149366,
      "expected": 0.91361,
      "held": 0.9137
     }
    },
    "flop": {
     "spots": 30000,
     "expectedWins": -117.607,
     "z": -1.789,
     "p": 0.07366559437963525,
     "buckets": [
      {
       "from": 0,
       "to": 0.2,
       "spots": 6514,
       "expected": 0.10895,
       "won": 0.10263
      },
      {
       "from": 0.2,
       "to": 0.4,
       "spots": 7061,
       "expected": 0.27036,
       "won": 0.25988
      },
      {
       "from": 0.4,
       "to": 0.6,
       "spots": 2618,
       "expected": 0.49884,
       "won": 0.47765
      },
      {
       "from": 0.6,
       "to": 0.8,
       "spots": 6916,
       "expected": 0.72913,
       "won": 0.7325
      },
      {
       "from": 0.8,
       "to": 1,
       "spots": 6891,
       "expected": 0.88916,
       "won": 0.89348
      }
     ],
     "favourite": {
      "spots": 13489,
      "expected": 0.88952,
      "held": 0.89421
     }
    }
   },
   "tests": [
    {
     "id": "js.hero.hands",
     "name": "The hero's starting hand, all 169 kinds",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 151.44,
     "df": 168,
     "p": 0.8154,
     "pass": true
    },
    {
     "id": "js.hero.cards",
     "name": "Each of the 52 cards in the hero's hand",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 27.574,
     "df": 51,
     "p": 0.997,
     "pass": true
    },
    {
     "id": "js.hero.suits",
     "name": "Suits in the hero's hand",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 1.1919,
     "df": 3,
     "p": 0.755,
     "pass": true
    },
    {
     "id": "js.board.1",
     "name": "Each of the 52 cards as the first flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 38.826,
     "df": 51,
     "p": 0.8943,
     "pass": true
    },
    {
     "id": "js.board.2",
     "name": "Each of the 52 cards as the second flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 48.246,
     "df": 51,
     "p": 0.5837,
     "pass": true
    },
    {
     "id": "js.board.3",
     "name": "Each of the 52 cards as the third flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 47.053,
     "df": 51,
     "p": 0.6311,
     "pass": true
    },
    {
     "id": "js.board.4",
     "name": "Each of the 52 cards as the turn",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 38.456,
     "df": 51,
     "p": 0.9022,
     "pass": true
    },
    {
     "id": "js.board.5",
     "name": "Each of the 52 cards as the river",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 42.321,
     "df": 51,
     "p": 0.8014,
     "pass": true
    },
    {
     "id": "js.hero.pairs",
     "name": "The hero is dealt a pair",
     "kind": "rate",
     "n": 1000000,
     "count": 58922,
     "observed": 0.058922,
     "expected": 0.0588235,
     "z": 0.4185,
     "p": 0.6756,
     "pass": true
    },
    {
     "id": "js.hero.suited",
     "name": "The hero is dealt two of a suit",
     "kind": "rate",
     "n": 1000000,
     "count": 235370,
     "observed": 0.23537,
     "expected": 0.235294,
     "z": 0.1789,
     "p": 0.858,
     "pass": true
    },
    {
     "id": "js.hero.premium",
     "name": "The hero is dealt aces, kings, queens or ace-king",
     "kind": "rate",
     "n": 1000000,
     "count": 25750,
     "observed": 0.02575,
     "expected": 0.025641,
     "z": 0.6894,
     "p": 0.4905,
     "pass": true
    },
    {
     "id": "js.hero.aces",
     "name": "The hero is dealt pocket aces",
     "kind": "rate",
     "n": 1000000,
     "count": 4601,
     "observed": 0.004601,
     "expected": 0.00452489,
     "z": 1.134,
     "p": 0.2568,
     "pass": true
    },
    {
     "id": "js.board.paired",
     "name": "The flop has a pair on it",
     "kind": "rate",
     "n": 1000000,
     "count": 171503,
     "observed": 0.171503,
     "expected": 0.171765,
     "z": -0.6939,
     "p": 0.4878,
     "pass": true
    },
    {
     "id": "js.board.suited",
     "name": "The flop is all one suit",
     "kind": "rate",
     "n": 1000000,
     "count": 51619,
     "observed": 0.051619,
     "expected": 0.0517647,
     "z": -0.6577,
     "p": 0.5108,
     "pass": true
    },
    {
     "id": "js.board.hits",
     "name": "The board pairs one of the hero's cards (hero holding no pair)",
     "kind": "rate",
     "n": 941078,
     "count": 458235,
     "observed": 0.486926,
     "expected": 0.487432,
     "z": -0.9833,
     "p": 0.3255,
     "pass": true
    },
    {
     "id": "js.seat1.hands",
     "name": "Seat 2's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 152.44,
     "df": 168,
     "p": 0.7995,
     "pass": true
    },
    {
     "id": "js.seat2.hands",
     "name": "Seat 3's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 169.19,
     "df": 168,
     "p": 0.4596,
     "pass": true
    },
    {
     "id": "js.seat3.hands",
     "name": "Seat 4's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 167.16,
     "df": 168,
     "p": 0.5038,
     "pass": true
    },
    {
     "id": "js.seat4.hands",
     "name": "Seat 5's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 163.03,
     "df": 168,
     "p": 0.5938,
     "pass": true
    },
    {
     "id": "js.seat5.hands",
     "name": "Seat 6's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 167.11,
     "df": 168,
     "p": 0.5049,
     "pass": true
    },
    {
     "id": "js.hero.strength",
     "name": "How strong the hero's starting hands are on average (0 is the worst, 1 the best)",
     "kind": "mean",
     "n": 1000000,
     "observed": 0.453394,
     "expected": 0.453036,
     "z": 1.221,
     "p": 0.222,
     "pass": true
    },
    {
     "id": "js.streak.sameKind",
     "name": "The hero gets the same kind of hand as the hand before",
     "kind": "rate",
     "n": 999999,
     "count": 7328,
     "observed": 0.00732801,
     "expected": 0.00736403,
     "z": -0.4213,
     "p": 0.6735,
     "pass": true
    },
    {
     "id": "js.streak.sameCards",
     "name": "The hero gets the very same two cards as the hand before",
     "kind": "rate",
     "n": 999999,
     "count": 750,
     "observed": 0.000750001,
     "expected": 0.000754148,
     "z": -0.1511,
     "p": 0.8799,
     "pass": true
    },
    {
     "id": "js.streak.followOn",
     "name": "A good hand followed by another good hand (or a bad by a bad) more than chance",
     "kind": "correlation",
     "n": 999999,
     "observed": 0.000454533,
     "expected": 0,
     "z": 0.4545,
     "p": 0.6494,
     "pass": true
    },
    {
     "id": "js.streak.noPair",
     "name": "The longest run of hands without a pair",
     "kind": "longest run",
     "n": 1000000,
     "observed": 171,
     "expected": 181.2,
     "p": 0.3504,
     "pass": true
    },
    {
     "id": "js.repeats",
     "name": "The same deal twice (all twelve hole cards and the board)",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "a repeat would be a one in billions event",
     "p": 1,
     "pass": true
    },
    {
     "id": "js.runout.turn",
     "name": "All in on the turn: wins against what the 44 rivers say",
     "kind": "run-out",
     "n": 200000,
     "z": 0.9476,
     "p": 0.3433,
     "pass": true
    },
    {
     "id": "js.runout.flop",
     "name": "All in on the flop: wins against what the 990 turns and rivers say",
     "kind": "run-out",
     "n": 30000,
     "z": -1.789,
     "p": 0.07367,
     "pass": true
    },
    {
     "id": "js.keys.bytes",
     "name": "Every byte value in the secret keys",
     "kind": "chi-square",
     "n": 32000000,
     "statistic": 236.9,
     "df": 255,
     "p": 0.7857,
     "pass": true
    },
    {
     "id": "js.keys.bits",
     "name": "Ones and zeros in the secret keys",
     "kind": "rate",
     "n": 256000000,
     "count": 127986946,
     "observed": 0.499949,
     "expected": 0.5,
     "z": -1.632,
     "p": 0.1027,
     "pass": true
    },
    {
     "id": "js.keys.repeats",
     "name": "The same secret key twice",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "two equal keys would be a one in 10^19 event",
     "p": 1,
     "pass": true
    },
    {
     "id": "js.locks",
     "name": "Hands whose key did not match its fingerprint or rebuild the deck dealt",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "every hand checked",
     "p": 1,
     "pass": true
    }
   ]
  },
  "swift": {
   "label": "iPhone engine (Swift), real hands",
   "hands": 1000000,
   "seconds": 144.19912803173065,
   "display": {
    "hands": 1000000,
    "pairs": 0.05874,
    "suited": 0.23537,
    "premium": 0.025578,
    "aces": 0.00455,
    "flopPaired": 0.1717,
    "flopOneSuit": 0.051645,
    "boardHitsHero": 0.48808,
    "strengthBySeat": [
     0.45358,
     0.45318,
     0.45311,
     0.45279,
     0.45328,
     0.4528
    ],
    "longestWithoutPair": 205,
    "heroCardMost": 38951,
    "heroCardLeast": 38127,
    "heroCardExpected": 38461.5
   },
   "runouts": {
    "turn": {
     "spots": 200000,
     "expectedWins": -248.295,
     "z": -1.784,
     "p": 0.07448616396815753,
     "buckets": [
      {
       "from": 0,
       "to": 0.2,
       "spots": 74575,
       "expected": 0.086496,
       "won": 0.086899
      },
      {
       "from": 0.2,
       "to": 0.4,
       "spots": 22479,
       "expected": 0.26816,
       "won": 0.26358
      },
      {
       "from": 0.4,
       "to": 0.6,
       "spots": 6213,
       "expected": 0.50101,
       "won": 0.49396
      },
      {
       "from": 0.6,
       "to": 0.8,
       "spots": 22229,
       "expected": 0.73194,
       "won": 0.72826
      },
      {
       "from": 0.8,
       "to": 1,
       "spots": 74504,
       "expected": 0.91358,
       "won": 0.91291
      }
     ],
     "favourite": {
      "spots": 149079,
      "expected": 0.91354,
      "held": 0.91301
     }
    },
    "flop": {
     "spots": 30000,
     "expectedWins": -67.1197,
     "z": -1.02,
     "p": 0.30783974693531474,
     "buckets": [
      {
       "from": 0,
       "to": 0.2,
       "spots": 6570,
       "expected": 0.10955,
       "won": 0.11065
      },
      {
       "from": 0.2,
       "to": 0.4,
       "spots": 7181,
       "expected": 0.26959,
       "won": 0.26939
      },
      {
       "from": 0.4,
       "to": 0.6,
       "spots": 2633,
       "expected": 0.49873,
       "won": 0.48899
      },
      {
       "from": 0.6,
       "to": 0.8,
       "spots": 6833,
       "expected": 0.72947,
       "won": 0.7305
      },
      {
       "from": 0.8,
       "to": 1,
       "spots": 6783,
       "expected": 0.8894,
       "won": 0.88139
      }
     ],
     "favourite": {
      "spots": 13452,
      "expected": 0.88926,
      "held": 0.88426
     }
    }
   },
   "tests": [
    {
     "id": "swift.hero.hands",
     "name": "The hero's starting hand, all 169 kinds",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 131.91,
     "df": 168,
     "p": 0.9819,
     "pass": true
    },
    {
     "id": "swift.hero.cards",
     "name": "Each of the 52 cards in the hero's hand",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 42.889,
     "df": 51,
     "p": 0.7832,
     "pass": true
    },
    {
     "id": "swift.hero.suits",
     "name": "Suits in the hero's hand",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 4.3003,
     "df": 3,
     "p": 0.2308,
     "pass": true
    },
    {
     "id": "swift.board.1",
     "name": "Each of the 52 cards as the first flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 55.939,
     "df": 51,
     "p": 0.2947,
     "pass": true
    },
    {
     "id": "swift.board.2",
     "name": "Each of the 52 cards as the second flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 36.297,
     "df": 51,
     "p": 0.9403,
     "pass": true
    },
    {
     "id": "swift.board.3",
     "name": "Each of the 52 cards as the third flop card",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 54.484,
     "df": 51,
     "p": 0.3434,
     "pass": true
    },
    {
     "id": "swift.board.4",
     "name": "Each of the 52 cards as the turn",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 50.038,
     "df": 51,
     "p": 0.5118,
     "pass": true
    },
    {
     "id": "swift.board.5",
     "name": "Each of the 52 cards as the river",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 38.825,
     "df": 51,
     "p": 0.8943,
     "pass": true
    },
    {
     "id": "swift.hero.pairs",
     "name": "The hero is dealt a pair",
     "kind": "rate",
     "n": 1000000,
     "count": 58740,
     "observed": 0.05874,
     "expected": 0.0588235,
     "z": -0.355,
     "p": 0.7226,
     "pass": true
    },
    {
     "id": "swift.hero.suited",
     "name": "The hero is dealt two of a suit",
     "kind": "rate",
     "n": 1000000,
     "count": 235371,
     "observed": 0.235371,
     "expected": 0.235294,
     "z": 0.1812,
     "p": 0.8562,
     "pass": true
    },
    {
     "id": "swift.hero.premium",
     "name": "The hero is dealt aces, kings, queens or ace-king",
     "kind": "rate",
     "n": 1000000,
     "count": 25578,
     "observed": 0.025578,
     "expected": 0.025641,
     "z": -0.3987,
     "p": 0.6901,
     "pass": true
    },
    {
     "id": "swift.hero.aces",
     "name": "The hero is dealt pocket aces",
     "kind": "rate",
     "n": 1000000,
     "count": 4550,
     "observed": 0.00455,
     "expected": 0.00452489,
     "z": 0.3742,
     "p": 0.7083,
     "pass": true
    },
    {
     "id": "swift.board.paired",
     "name": "The flop has a pair on it",
     "kind": "rate",
     "n": 1000000,
     "count": 171697,
     "observed": 0.171697,
     "expected": 0.171765,
     "z": -0.1795,
     "p": 0.8575,
     "pass": true
    },
    {
     "id": "swift.board.suited",
     "name": "The flop is all one suit",
     "kind": "rate",
     "n": 1000000,
     "count": 51645,
     "observed": 0.051645,
     "expected": 0.0517647,
     "z": -0.5403,
     "p": 0.589,
     "pass": true
    },
    {
     "id": "swift.board.hits",
     "name": "The board pairs one of the hero's cards (hero holding no pair)",
     "kind": "rate",
     "n": 941260,
     "count": 459412,
     "observed": 0.488082,
     "expected": 0.487432,
     "z": 1.261,
     "p": 0.2073,
     "pass": true
    },
    {
     "id": "swift.seat1.hands",
     "name": "Seat 2's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 150.55,
     "df": 168,
     "p": 0.8291,
     "pass": true
    },
    {
     "id": "swift.seat2.hands",
     "name": "Seat 3's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 186.41,
     "df": 168,
     "p": 0.1572,
     "pass": true
    },
    {
     "id": "swift.seat3.hands",
     "name": "Seat 4's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 171.72,
     "df": 168,
     "p": 0.406,
     "pass": true
    },
    {
     "id": "swift.seat4.hands",
     "name": "Seat 5's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 164.92,
     "df": 168,
     "p": 0.5527,
     "pass": true
    },
    {
     "id": "swift.seat5.hands",
     "name": "Seat 6's starting hand, all 169 kinds (the hero is seat 1)",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 184.32,
     "df": 168,
     "p": 0.1842,
     "pass": true
    },
    {
     "id": "swift.hero.strength",
     "name": "How strong the hero's starting hands are on average (0 is the worst, 1 the best)",
     "kind": "mean",
     "n": 1000000,
     "observed": 0.453578,
     "expected": 0.453036,
     "z": 1.852,
     "p": 0.06399,
     "pass": true
    },
    {
     "id": "swift.streak.sameKind",
     "name": "The hero gets the same kind of hand as the hand before",
     "kind": "rate",
     "n": 999999,
     "count": 7457,
     "observed": 0.00745701,
     "expected": 0.00736403,
     "z": 1.087,
     "p": 0.2768,
     "pass": true
    },
    {
     "id": "swift.streak.sameCards",
     "name": "The hero gets the very same two cards as the hand before",
     "kind": "rate",
     "n": 999999,
     "count": 750,
     "observed": 0.000750001,
     "expected": 0.000754148,
     "z": -0.1511,
     "p": 0.8799,
     "pass": true
    },
    {
     "id": "swift.streak.followOn",
     "name": "A good hand followed by another good hand (or a bad by a bad) more than chance",
     "kind": "correlation",
     "n": 999999,
     "observed": 0.000853416,
     "expected": 0,
     "z": 0.8534,
     "p": 0.3934,
     "pass": true
    },
    {
     "id": "swift.streak.noPair",
     "name": "The longest run of hands without a pair",
     "kind": "longest run",
     "n": 1000000,
     "observed": 205,
     "expected": 181.2,
     "p": 0.4198,
     "pass": true
    },
    {
     "id": "swift.repeats",
     "name": "The same deal twice (all twelve hole cards and the board)",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "a repeat would be a one in billions event",
     "p": 1,
     "pass": true
    },
    {
     "id": "swift.runout.turn",
     "name": "All in on the turn: wins against what the 44 rivers say",
     "kind": "run-out",
     "n": 200000,
     "z": -1.784,
     "p": 0.07449,
     "pass": true
    },
    {
     "id": "swift.runout.flop",
     "name": "All in on the flop: wins against what the 990 turns and rivers say",
     "kind": "run-out",
     "n": 30000,
     "z": -1.02,
     "p": 0.3078,
     "pass": true
    },
    {
     "id": "swift.locks",
     "name": "Hands whose key did not match its fingerprint or rebuild the deck dealt",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "every hand checked",
     "p": 1,
     "pass": true
    }
   ]
  },
  "jsDecks": {
   "label": "Whole decks off fresh locks (JavaScript)",
   "decks": 2000000,
   "seconds": 49.43,
   "tests": [
    {
     "id": "jsDecks.positions",
     "name": "Every card in every one of the 52 places in the deck",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 2547.79,
     "df": 2601,
     "p": 0.7684,
     "pass": true
    },
    {
     "id": "jsDecks.first",
     "name": "Each of the 52 cards as the first card dealt",
     "kind": "chi-square",
     "n": 2000000,
     "statistic": 42.176,
     "df": 51,
     "p": 0.8059,
     "pass": true
    },
    {
     "id": "jsDecks.together.rank",
     "name": "Cards of the same rank landing next to each other (a fair deck: 3 a deck)",
     "kind": "mean",
     "n": 2000000,
     "observed": 2.99757,
     "expected": 3,
     "z": -2.049,
     "p": 0.0405,
     "pass": true
    },
    {
     "id": "jsDecks.together.suit",
     "name": "Cards of the same suit landing next to each other (a fair deck: 12 a deck)",
     "kind": "mean",
     "n": 2000000,
     "observed": 12.0012,
     "expected": 12,
     "z": 0.5834,
     "p": 0.5596,
     "pass": true
    },
    {
     "id": "jsDecks.keys.bytes",
     "name": "Every byte value in the secret keys",
     "kind": "chi-square",
     "n": 64000000,
     "statistic": 236.16,
     "df": 255,
     "p": 0.7956,
     "pass": true
    },
    {
     "id": "jsDecks.keys.bits",
     "name": "Ones and zeros in the secret keys",
     "kind": "rate",
     "n": 512000000,
     "count": 256003621,
     "observed": 0.500007,
     "expected": 0.5,
     "z": 0.3201,
     "p": 0.7489,
     "pass": true
    },
    {
     "id": "jsDecks.keys.repeats",
     "name": "The same secret key twice",
     "kind": "exact",
     "n": 2000000,
     "count": 0,
     "what": "two equal keys would be a one in 10^19 event",
     "p": 1,
     "pass": true
    },
    {
     "id": "jsDecks.locks",
     "name": "Keys that did not match their fingerprint",
     "kind": "exact",
     "n": 2000000,
     "count": 0,
     "what": "every deck checked",
     "p": 1,
     "pass": true
    }
   ]
  },
  "swiftDecks": {
   "label": "Whole decks off fresh locks (Swift)",
   "decks": 1000000,
   "seconds": 16.50554597377777,
   "tests": [
    {
     "id": "swiftDecks.positions",
     "name": "Every card in every one of the 52 places in the deck",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 2614.69,
     "df": 2601,
     "p": 0.4212,
     "pass": true
    },
    {
     "id": "swiftDecks.first",
     "name": "Each of the 52 cards as the first card dealt",
     "kind": "chi-square",
     "n": 1000000,
     "statistic": 41.699,
     "df": 51,
     "p": 0.8203,
     "pass": true
    },
    {
     "id": "swiftDecks.together.rank",
     "name": "Cards of the same rank landing next to each other (a fair deck: 3 a deck)",
     "kind": "mean",
     "n": 1000000,
     "observed": 3.00002,
     "expected": 3,
     "z": 0.009514,
     "p": 0.9924,
     "pass": true
    },
    {
     "id": "swiftDecks.together.suit",
     "name": "Cards of the same suit landing next to each other (a fair deck: 12 a deck)",
     "kind": "mean",
     "n": 1000000,
     "observed": 11.9928,
     "expected": 12,
     "z": -2.384,
     "p": 0.01713,
     "pass": true
    },
    {
     "id": "swiftDecks.keys.bytes",
     "name": "Every byte value in the secret keys",
     "kind": "chi-square",
     "n": 32000000,
     "statistic": 244.83,
     "df": 255,
     "p": 0.6652,
     "pass": true
    },
    {
     "id": "swiftDecks.keys.bits",
     "name": "Ones and zeros in the secret keys",
     "kind": "rate",
     "n": 256000000,
     "count": 127999829,
     "observed": 0.499999,
     "expected": 0.5,
     "z": -0.02138,
     "p": 0.9829,
     "pass": true
    },
    {
     "id": "swiftDecks.keys.repeats",
     "name": "The same secret key twice",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "two equal keys would be a one in 10^19 event",
     "p": 1,
     "pass": true
    },
    {
     "id": "swiftDecks.sameInJs",
     "name": "Swift decks the JavaScript code rebuilt differently from the same key",
     "kind": "exact",
     "n": 1000000,
     "count": 0,
     "what": "every deck rebuilt",
     "p": 1,
     "pass": true
    },
    {
     "id": "swiftDecks.fingerprints",
     "name": "Swift fingerprints the JavaScript code worked out differently",
     "kind": "exact",
     "n": 10000,
     "count": 0,
     "what": "every hundredth deck",
     "p": 1,
     "pass": true
    }
   ]
  }
 },
 "games": {
  "js": [
   {
    "id": "js.variant.holdem",
    "name": "holdem: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 58.397,
    "df": 51,
    "p": 0.2221,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.omaha",
    "name": "omaha: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 59.403,
    "df": 51,
    "p": 0.1962,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.omaha5",
    "name": "omaha5: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 55.312,
    "df": 51,
    "p": 0.3152,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.omaha8",
    "name": "omaha8: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 63.909,
    "df": 51,
    "p": 0.1059,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.pineapple",
    "name": "pineapple: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 40.856,
    "df": 51,
    "p": 0.8444,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.short",
    "name": "short: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 46.368,
    "df": 35,
    "p": 0.09471,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 36
   },
   {
    "id": "js.variant.stud7",
    "name": "stud7: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 78.4,
    "df": 51,
    "p": 0.008145,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.stud5",
    "name": "stud5: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 56.317,
    "df": 51,
    "p": 0.2827,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.stud8",
    "name": "stud8: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 63.389,
    "df": 51,
    "p": 0.1142,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.deuce27",
    "name": "deuce27: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 41.168,
    "df": 51,
    "p": 0.8357,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.razz",
    "name": "razz: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 38.048,
    "df": 51,
    "p": 0.9104,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "js.variant.horse",
    "name": "horse: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 57.912,
    "df": 51,
    "p": 0.2354,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   }
  ],
  "swift": [
   {
    "id": "swift.variant.holdem",
    "name": "holdem: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 30.04,
    "df": 51,
    "p": 0.9915,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.omaha",
    "name": "omaha: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 51.499,
    "df": 51,
    "p": 0.4541,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.omaha5",
    "name": "omaha5: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 40.405,
    "df": 51,
    "p": 0.8565,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.omaha8",
    "name": "omaha8: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 46.749,
    "df": 51,
    "p": 0.6431,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.pineapple",
    "name": "pineapple: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 41.48,
    "df": 51,
    "p": 0.8268,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.short",
    "name": "short: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 45.192,
    "df": 35,
    "p": 0.1161,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 36
   },
   {
    "id": "swift.variant.stud7",
    "name": "stud7: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 44.253,
    "df": 51,
    "p": 0.7367,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.stud5",
    "name": "stud5: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 46.472,
    "df": 51,
    "p": 0.6539,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.stud8",
    "name": "stud8: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 62.453,
    "df": 51,
    "p": 0.1306,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.deuce27",
    "name": "deuce27: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 52.539,
    "df": 51,
    "p": 0.4142,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.razz",
    "name": "razz: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 41.515,
    "df": 51,
    "p": 0.8258,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   },
   {
    "id": "swift.variant.horse",
    "name": "horse: each card as the first card dealt, every lock checked",
    "kind": "chi-square",
    "n": 3000,
    "statistic": 53.475,
    "df": 51,
    "p": 0.3794,
    "pass": true,
    "hands": 3000,
    "lockFails": 0,
    "unlocked": 0,
    "deckSize": 52
   }
  ]
 },
 "exact": [
  {
   "id": "parity",
   "name": "Both engines against the fixed examples (SHA-256, HMAC, decks, checks)",
   "n": 266,
   "count": 0,
   "pass": true
  },
  {
   "id": "js.seatcheat",
   "name": "Bot decisions made twice, the second time with the hero's cards swapped (JavaScript)",
   "n": 10000,
   "count": 0,
   "pass": true
  },
  {
   "id": "swift.seatcheat",
   "name": "Bot decisions made twice, the second time with the hero's cards swapped (Swift)",
   "n": 10000,
   "count": 0,
   "pass": true
  },
  {
   "id": "js.showdowns",
   "name": "Showdowns against a slow evaluator written from the rules (JavaScript)",
   "n": 100000,
   "count": 0,
   "pass": true
  },
  {
   "id": "swift.showdowns",
   "name": "Showdowns against a slow evaluator written from the rules (Swift)",
   "n": 100000,
   "count": 0,
   "pass": true
  },
  {
   "id": "js.allins",
   "name": "All-ins with uneven stacks: every chip and every side pot paid right (JavaScript)",
   "n": 10000,
   "count": 0,
   "pass": true
  },
  {
   "id": "swift.allins",
   "name": "All-ins with uneven stacks: every chip and every side pot paid right (Swift)",
   "n": 10000,
   "count": 0,
   "pass": true
  },
  {
   "id": "js.resume",
   "name": "Hands stopped half way and picked back up keep their lock (JavaScript)",
   "n": 600,
   "count": 0,
   "pass": true
  },
  {
   "id": "swift.resume",
   "name": "Hands stopped half way and picked back up keep their lock (Swift)",
   "n": 600,
   "count": 0,
   "pass": true
  }
 ],
 "method": {
  "derivation": [
   "key: 32 bytes from the device's secure random source, written as 64 hex characters",
   "fingerprint: SHA-256 of the key's 32 bytes, recorded before the first card",
   "block b: HMAC-SHA256(key, \"suitedfours deck v1|<seed>|<hand number>|<b>\"), read as eight big-endian 32-bit numbers",
   "deck: the fresh deck shuffled Fisher-Yates from the last card down; for each place i a number below floor(2^32 / (i+1)) * (i+1) picks card (number mod (i+1)), larger numbers are thrown away",
   "the engine deals from the end of the deck, so the last card is the first one out"
  ],
  "js": "/** The endless supply of 32-bit numbers a key, seed and number give. */\nfunction lockStream(key, seed, number) {\n  const kb = keyBytes(key) || enc.encode(String(key));\n  const prefix = `${LABEL}|${seed}|${number}|`;\n  let block = 0, words = null, at = 8;\n  return () => {\n    if (at >= 8) {\n      const d = hmacSha256(kb, enc.encode(prefix + block));\n      const v = new DataView(d.buffer);\n      words = [0, 1, 2, 3, 4, 5, 6, 7].map((i) => v.getUint32(i * 4));\n      block++;\n      at = 0;\n    }\n    return words[at++];\n  };\n}\n\n/**\n * The deck a key, seed and number make, in engine order: the engine deals\n * from the end, so the last card is the first one out.\n */\nexport function lockedDeck(key, seed, number, short = false) {\n  const cards = makeDeck(short);\n  const next = lockStream(key, String(seed ?? \"\"), number);\n  for (let i = cards.length - 1; i > 0; i--) {\n    const n = i + 1;\n    const limit = Math.floor(0x100000000 / n) * n;\n    let x = next();\n    while (x >= limit) x = next();\n    const j = x % n;\n    [cards[i], cards[j]] = [cards[j], cards[i]];\n  }\n  return cards;\n}\n",
  "swift": "/// The endless supply of 32-bit numbers a key, seed and number give.\nstruct LockStream {\n    let key: [UInt8]\n    let prefix: String\n    var block = 0\n    var words: [UInt32] = []\n    var at = 0\n\n    init(key: [UInt8], seed: String, number: Int) {\n        self.key = key\n        self.prefix = \"\\(deckLockLabel)|\\(seed)|\\(number)|\"\n    }\n\n    mutating func next() -> UInt32 {\n        if at >= words.count {\n            let text: String = prefix + String(block)\n            let message: [UInt8] = Array(text.utf8)\n            let d: [UInt8] = hmacSHA256(key: key, message: message)\n            words.removeAll(keepingCapacity: true)\n            var i: Int = 0\n            while i < 32 {\n                let b0: UInt32 = UInt32(d[i])\n                let b1: UInt32 = UInt32(d[i + 1])\n                let b2: UInt32 = UInt32(d[i + 2])\n                let b3: UInt32 = UInt32(d[i + 3])\n                let w: UInt32 = (b0 << 24) | (b1 << 16) | (b2 << 8) | b3\n                words.append(w)\n                i += 4\n            }\n            block += 1\n            at = 0\n        }\n        let w = words[at]\n        at += 1\n        return w\n    }\n}\n\n/// The deck a key, seed and number make, in engine order: the engine deals\n/// from the end, so the last card is the first one out.\npublic func lockedDeck(key: String, seed: String, number: Int, short: Bool = false) -> [Card] {\n    var cards = makeDeck(short: short)\n    var stream = LockStream(key: keyBytes(key) ?? Array(key.utf8), seed: seed, number: number)\n    var i = cards.count - 1\n    while i > 0 {\n        let n: UInt64 = UInt64(i + 1)\n        let span: UInt64 = 1 << 32\n        let limit: UInt64 = (span / n) * n\n        var x: UInt64 = UInt64(stream.next())\n        while x >= limit { x = UInt64(stream.next()) }\n        let j: Int = Int(x % n)\n        cards.swapAt(i, j)\n        i -= 1\n    }\n    return cards\n}\n"
 },
 "dataset": {
  "file": "/fair/deals-100k.csv.gz",
  "rows": 100000,
  "bytes": 14419437,
  "sha256": "4c67a32d856469b7ec5ef8b7d021bc3510221ca1a3b2297c563a52e99c9f4c8c",
  "columns": "number,seed,key,fingerprint,deck (card ids in the order they were dealt, first card first)"
 },
 "summary": {
  "date": "2026-10-06",
  "lines": [
   "2,000,000 hands dealt by the app's two engines and 3,000,000 more whole decks, each one checked against its lock: every one matched.",
   "Every card, and every one of the 169 starting hands, came up as often as a fair deck gives, in every seat. Pocket pairs came 5.88% of the time; a fair deck gives 5.88%.",
   "When one hand was a big favourite all in on the turn, it held 91.3% of the time. The cards said 91.4%.",
   "20,000 bot decisions were made twice, the second time with your cards swapped for others. Every one came out the same.",
   "111 of 111 tests passed."
  ]
 }
}
