Skip to main content

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 decideAction tuning)
  • Tournament ICM and bubble-factor tools
  • Backend analysis services (wrap the library yourself—there are no built-in HTTP endpoints)

Documentation map

SectionContents
Getting startedInstall, quick start, CJS/ESM, bundlers
ConceptsCards, packed CardInput, PKST state, numerical semantics, Float64 vectors, errors
GuidesdecideAction, Monte Carlo (incl. AbortSignal on *Async), batch equity, range equity (exact), preflop matrix, ICM, tournament runouts
API referenceAll 300 native exports + /encode subpath
TypeScript typesNativePokerState, AsyncOptions, batch specs, and result shapes

npmGitHub