Poker Calculations
poker-calculations is a Node.js library for no-limit Hold’em: hand evaluation, Monte Carlo and exact equity, rule-based decideAction, pot odds and chip EV, ICM, side pots, draw math, and more—all implemented in C++20 and exposed through N-API with prebuilt binaries.
npm install poker-calculations
What you can build
- Training apps and equity calculators
- Simulators and bots (with your own
decideActiontuning) - Tournament ICM and bubble-factor tools
- Backend analysis services (wrap the library yourself—there are no built-in HTTP endpoints)
Documentation map
| Section | Contents |
|---|---|
| Getting started | Install, quick start, CJS/ESM, bundlers |
| Concepts | Cards, packed CardInput, PKST state, numerical semantics, Float64 vectors, errors |
| Guides | decideAction, Monte Carlo (incl. AbortSignal on *Async), batch equity, range equity (exact), preflop matrix, ICM, tournament runouts |
| API reference | All 300 native exports + /encode subpath |
| TypeScript types | NativePokerState, AsyncOptions, batch specs, and result shapes |