Skip to main content

MaterializedVillainRangeResult

Returned by materializeVillainRangeAfterBlockers and bayesianRangeUpdateFromAction.

FieldTypeMeaning
weights1326Float64ArrayDense combo weights (length 1326) after blockers
liveComboCountnumberCombos with positive weight
weightSumnumberSum of live weights
shannonEntropynumberShannon entropy of normalized live weights

Semantics

Hero hole cards, board, and optional knownDead remove combos from the prior range (dense Float64Array(1326) or SparseRangeSpec). Remaining weights are written into weights1326; blocked combos are zero. Entropy uses normalized probabilities over positive entries only.

bayesianRangeUpdateFromAction applies a strength-based likelihood update (fold / call / raise) before materializing.

Example

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 });

See also

SparseRangeSpec · Range equity (exact)