Skip to main content

layeredPotChipEvFromEquities

Chip EV from per-layer pot sizes and per-player per-layer equities (columns sum to 1).

layeredPotChipEvFromEquities(layerPotChips: F64VectorInput, equityPlayerByLayer: number[][] | Float64Array, colsOrReturnFormat?: number | F64ReturnFormat, returnFormat?: F64ReturnFormat): number[] | Float64Array

For a flat equity matrix, pass Float64Array and cols (column count). See Float64 ICM input.

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

Each side-pot layer may have different winners (short stack eligible only for main, etc.). Supply pot size per layer and a matrix equityPlayerByLayer[player][layer] where each layer column sums to 1.

How to use

const layerPots = [150, 400]; // main + side
// 3 players; each column sums to 1
const equities = [
[0.55, 0.10], // player 0
[0.30, 0.60], // player 1
[0.15, 0.30], // player 2
];

const chipEv = poker.layeredPotChipEvFromEquities(layerPots, equities);
console.log(chipEv); // expected chips per player

Flat Float64Array (row-major, players × layers):

// 3 players × 2 layers — same numbers as the nested array above
const flat = new Float64Array([0.55, 0.10, 0.30, 0.60, 0.15, 0.30]);
const chipEvFlat = poker.layeredPotChipEvFromEquities(layerPots, flat, 2);

See Float64 ICM input for returnFormat: 'float64' on the result.

See also

sidePotLadderFromCommitments · simulateHandOutcome