Skip to main content

materializeVillainRangeAfterBlockers

Dense 1326 combo weights after removing hero, board, and optional dead cards — plus combo count, weight sum, and Shannon entropy.

materializeVillainRangeAfterBlockers(range: Float64Array | SparseRangeSpec, heroHoleCards: CardInput, boardCards: CardInput, knownDead?: CardInput): MaterializedVillainRangeResult

See Packed card input and SparseRangeSpec.

Import

const poker = require('poker-calculations');

ESM (Node):

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const poker = require('poker-calculations');

When to use

Before exact equity or regret calls, you need a blocked dense range with summary stats — for logging, UI, or passing weights1326 into downstream tools.

How to use

const poker = require('poker-calculations');

const range = new Float64Array(1326);
range.fill(1 / 1326);

const { weights1326, liveComboCount, weightSum, shannonEntropy } =
poker.materializeVillainRangeAfterBlockers(
range,
['Ah', 'Kh'],
['Qh', 'Jh', '2c'],
);

console.log({ liveComboCount, weightSum, shannonEntropy });
console.log('First live weight:', weights1326.find((w) => w > 0));

Blocked combos are zero in weights1326; entropy uses normalized probabilities over positive entries only.

Return type

MaterializedVillainRangeResult.

See also

bayesianRangeUpdateFromAction · exactHuEquityVsRange · Range equity (exact)