pkg:clod/com.clodhub/poker-odds 0.12.0 Winning and improvement chances for teaching and display: what a hand can still become with the exact chance, the chance of holding the best hand against opponents, and Chen's starting score. Answers three questions about a player's two hole cards and the board. `rows`: what the hand is now and every better hand it can still become, each with the exact chance that the cards it needs arrive by the river, in the order a learner reads them (a straight low to high, pairs grouped, kickers last); counted exactly from the flop on and from a fixed sample of boards before it, and cached. `winChance`: the chance of holding the best hand at the river against some opponents, by simulation, where each opponent can be assumed to hold at least a given starting score (a raiser is not on a random hand). `startingScore`: Chen's pre-flop score. `shownCards`: a shown hand's combination in reading order with the kickers asked for. Examples A learner taps 'my chances' on the flop and sees a flush at 35 percent and a pair at 100. A coach shows the chance of winning against three opponents before the flop. A computer player prices a call. Package URL: pkg:clod/com.clodhub/poker-odds@0.12.0 Class: Poker odds (pkg:clod/com.clodhub/poker-odds-class@1.1.0): Winning chances of each hand from the cards that are known. Any component of this class can fill a recipe slot that asks for it. Category games/cards/poker; https://clodhub.com/classes/poker-odds-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fpoker-odds-class Provides (1) - poker-odds (com.clodhub/poker-odds 1.0.0): What a player's hand can still become, and the chance of holding the best hand. `rows`: the hand already made with the known cards first at 100%, then every way of making a better hand with the exact chance that its needed cards turn up by the river; which ways exist is read from every board that can follow from the flop on, and from a fixed sample of boards before it. `winChance`: the chance of the best hand against opponents, by sampling. TypeScript, `implementation/server/index.ts` (odds.ts, types.ts). Build with createOdds(ranking, settings); methods named `Odds.` are members of the object it returns. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fpoker-odds Requires (2) - hand-ranking (com.clodhub/hand-ranking 1.0.0): The best five-card poker hand out of five to seven cards. A higher score wins; equal scores tie. TypeScript, `implementation/server/index.ts` (ranking.ts, codes.ts). Build a ranking with createHandRanking(codes) over card-deck's cardCodes, or use the ready-made handRanking; methods named `HandRanking.` are members of that object. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fhand-ranking - card-deck (com.clodhub/card-deck 1.0.0): Playing cards: create, shuffle, deal and burn, plus card codes, colours and names. Server and rules code: TypeScript `implementation/server/deck.ts`. Client card facts: TypeScript `implementation/web/cards.ts` (cardFacts, rankLabel), Swift `CardCode` (`implementation/apple/Sources/CardCodes.swift`) and Kotlin `com.clodhub.deck.CardCode` (`implementation/android/.../CardCode.kt`). Every deck operation returns a new deck and leaves its arguments unchanged. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Fcard-deck Settings (2) The installer collects two optional settings. `sampleBoards` is how many possible boards are tried before the flop, when more than two cards are still to come (whole number of at least 1; default 2000): more gives steadier percentages and takes longer; after the flop every possible board is counted, so it does not apply. `cacheSize` is how many results are kept so that a player looking at the same cards again gets the answer at once (whole number of at least 1; default 500). - sampleBoards: integer; optional, default 2000 - cacheSize: integer; optional, default 500 Depends on components: none How to use in a recipe A recipe uses it through a slot of class Poker odds (pkg:clod/com.clodhub/poker-odds-class 1.1.0), naming pkg:clod/com.clodhub/poker-odds as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (poker-odds) to the slots that use it. It fills what the component needs (hand-ranking and card-deck) from slots whose components provide them. The recipe sets sampleBoards and cacheSize; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"poker-odds","class":{"name":"pkg:clod/com.clodhub/poker-odds-class","version":"1.1.0","digest":"603e654d3ea71caef3a772eb8892d89a3de7989b526a40cd47bdd25753fe44f7"},"preferred":{"name":"pkg:clod/com.clodhub/poker-odds","version":"0.12.0"}} - in place of another component of the class: clod fetch poker-odds@0.12.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=poker-odds@0.12.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot poker-odds) For developers: how an application uses it Create it with `createOdds(ranking, settings)`, passing the hand-ranking interface (poker-hand-ranking) which carries the card codes and deck of the connected card-deck. A table shows `rows` to a player who asked for odds; poker-strategy calls `winChance` and `startingScore`; a replay screen calls `shownCards`. TypeScript only: the Swift and Kotlin apps display rows the server sends, they do not compute them. Accounts and services No deployed service, account or key. CPU only: exact counting for river and turn is a few milliseconds; the pre-flop sample of 2000 boards takes a few tens of milliseconds on this machine, then is served from the cache. How it is checked `node --test tests/server.test.ts` checks river, flop and pre-flop rows, the exact flush-draw probability against the closed form, `chance` against enumeration of every board that can follow, straight-flush and flush cases, the cache and its size setting, Chen's scores, known matchups within sampling error (aces against a random hand about 85 percent) and the effect of opponent ranges. The extraction was compared with the recipe's odds.ts and bot.ts equity on 60 random spots: rows, scores and win chances identical. - `node --test tests/server.test.ts` (web, required-local; tools: node 26.5) Updates The seeded pre-flop sample determines the pre-flop rows. Removing the component removes the files; nothing is stored. Tags: cards, games, odds, poker Targets: client none; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/poker-odds release v0.12.0; digest sha256:4f22d6261119f84211c6d58b2a6a1882ead335f6e3291a3a74a5fbc6275cb6b5 Release: features Line 0.12: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/poker-odds/0.12.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/poker-odds/0.12.0 Bundle download: GET https://clodhub.com/api/components/poker-odds/0.12.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/poker-odds-class@1.1.0 603e654d3ea71caef3a772eb8892d89a3de7989b526a40cd47bdd25753fe44f7 com.clodhub/poker-odds 1.0.0 entry modules: server server/index.ts shared behaviour suites: shared Platforms: server Toolchains: node >=26.5.0 <27.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 0 exact dependencies, 27 files (listed on the details page) Suitable for jobs: poker-odds profile any: cost none; load none; regions any; compliance none Notes: Pure library, CPU only. No hosted service, account or provider limit applies; the cost per call is milliseconds (exact turn and river) to tens of milliseconds (pre-flop sample), measured informally on the build machine only. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/poker-odds/issues; updates https://github.com/clodhub/poker-odds/releases (manual) What you download poker-odds-0.12.0.tar, from release v0.12.0 of clodhub/poker-odds: 27 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (3): server/ (3) - Tests (4): server.test.ts, support/ (3) - Interface documents (3): poker-odds.json, required-card-deck.json, required-hand-ranking.json - Class files: the class's interfaces and shared checks (3): poker-odds-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 3 of them into the application under components/poker-odds/: server 3 Not included: the components that provide what it requires (com.clodhub/hand-ranking, com.clodhub/card-deck), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.12.0 features (2026-11-26T11:29:10.499Z) sha256:4f22d6261119f84211c6d58b2a6a1882ead335f6e3291a3a74a5fbc6275cb6b5 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/poker-odds/details.txt?version=0.12.0 Page: https://clodhub.com/components/poker-odds; JSON: https://clodhub.com/api/components/poker-odds/0.12.0; connections diagram: https://clodhub.com/api/components/poker-odds/0.12.0/connections.svg Copyright Level N Ltd 2026