Skip to main content

bayesianRangeUpdateFromAction

Heuristic Bayesian update of villain combo weights after fold, call, or raise — then materialize dense 1326 weights with entropy.

bayesianRangeUpdateFromAction(range: Float64Array | SparseRangeSpec, heroHoleCards: CardInput, boardCards: CardInput, action: 'fold' | 'call' | 'raise', alpha: number): MaterializedVillainRangeResult

Same return shape as materializeVillainRangeAfterBlockers. See 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

You have a prior range and villain took an action — tilt weights by a strength-based likelihood (alpha scales the update) before exact equity or regret calls.

How to use

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

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

const baseline = poker.materializeVillainRangeAfterBlockers(
range,
['Ah', 'Kh'],
['Qh', 'Jh', '2c'],
);

const afterRaise = poker.bayesianRangeUpdateFromAction(
range,
['Ah', 'Kh'],
['Qh', 'Jh', '2c'],
'raise',
1.5,
);

console.log('Baseline entropy:', baseline.shannonEntropy);
console.log('After raise:', afterRaise.liveComboCount, afterRaise.shannonEntropy);

Return type

MaterializedVillainRangeResult.

See also

materializeVillainRangeAfterBlockers · exactInformationRegretVsClairvoyant · Range equity (exact)