@gills-pro/sharkjs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +42 -0
- package/index.js +120 -0
- package/package.json +18 -3
- package/types.d.ts +365 -0
- package/types.js +1 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type * from "./types.js";
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
BoardInput,
|
|
5
|
+
EquityRequest,
|
|
6
|
+
EquityResult,
|
|
7
|
+
MonteCarloEquityRequest,
|
|
8
|
+
MonteCarloEquityResult,
|
|
9
|
+
RuntimeMemoryExports,
|
|
10
|
+
SharkModuleFactoryOptions,
|
|
11
|
+
Street,
|
|
12
|
+
} from "./types.js";
|
|
13
|
+
|
|
14
|
+
export interface SharkModule extends RuntimeMemoryExports {
|
|
15
|
+
equityExhaustive(hero: string, villain: string, board: string): EquityResult;
|
|
16
|
+
equityMonteCarlo(
|
|
17
|
+
hero: string,
|
|
18
|
+
villain: string,
|
|
19
|
+
board: string,
|
|
20
|
+
sampleCount: number,
|
|
21
|
+
seed: number,
|
|
22
|
+
): MonteCarloEquityResult;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Shark extends SharkModule {
|
|
26
|
+
computeEquity(request: EquityRequest): EquityResult;
|
|
27
|
+
computeMonteCarloEquity(
|
|
28
|
+
request: MonteCarloEquityRequest,
|
|
29
|
+
): MonteCarloEquityResult;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare function normalizeBoard(board: BoardInput | null | undefined): string;
|
|
33
|
+
export declare function countBoardCards(board: BoardInput | null | undefined): 0 | 3 | 4 | 5 | null;
|
|
34
|
+
export declare function getStreet(board: BoardInput | null | undefined): Street | null;
|
|
35
|
+
|
|
36
|
+
export declare function createRawSharkModule(options?: SharkModuleFactoryOptions): Promise<SharkModule>;
|
|
37
|
+
export declare function createShark(options?: SharkModuleFactoryOptions): Promise<Shark>;
|
|
38
|
+
|
|
39
|
+
export declare function computeEquity(shark: SharkModule, request: EquityRequest): EquityResult;
|
|
40
|
+
export declare function computeMonteCarloEquity(shark: SharkModule, request: MonteCarloEquityRequest): MonteCarloEquityResult;
|
|
41
|
+
|
|
42
|
+
export default createShark;
|
package/index.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
let rawFactoryPromise;
|
|
2
|
+
|
|
3
|
+
function normalizeBoard(board) {
|
|
4
|
+
if (board == null) {
|
|
5
|
+
return "";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (typeof board !== "string") {
|
|
9
|
+
throw new TypeError(`board must be a string, got ${typeof board}`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return board.trim();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function countBoardCards(board) {
|
|
16
|
+
const normalized = normalizeBoard(board);
|
|
17
|
+
if (normalized.length === 0) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const compact = normalized.replaceAll(/\s+/g, "");
|
|
22
|
+
if (compact.length % 2 !== 0) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const count = compact.length / 2;
|
|
27
|
+
return count === 3 || count === 4 || count === 5 ? count : null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getStreet(board) {
|
|
31
|
+
switch (countBoardCards(board)) {
|
|
32
|
+
case 0:
|
|
33
|
+
return "preflop";
|
|
34
|
+
case 3:
|
|
35
|
+
return "flop";
|
|
36
|
+
case 4:
|
|
37
|
+
return "turn";
|
|
38
|
+
case 5:
|
|
39
|
+
return "river";
|
|
40
|
+
default:
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function assertRangeInput(label, value) {
|
|
46
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
47
|
+
throw new TypeError(`${label} must be a non-empty range string`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function resolveMonteCarloOptions(options) {
|
|
52
|
+
if (options == null || typeof options !== "object") {
|
|
53
|
+
throw new TypeError("options must be an object");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const sampleCount = Number(options.sampleCount);
|
|
57
|
+
const seed = Number(options.seed);
|
|
58
|
+
|
|
59
|
+
if (!Number.isInteger(sampleCount) || sampleCount <= 0) {
|
|
60
|
+
throw new TypeError(`options.sampleCount must be a positive integer, got ${String(options.sampleCount)}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (!Number.isInteger(seed) || seed < 0) {
|
|
64
|
+
throw new TypeError(`options.seed must be a non-negative integer, got ${String(options.seed)}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return { sampleCount, seed };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function loadRawFactory() {
|
|
71
|
+
if (!rawFactoryPromise) {
|
|
72
|
+
rawFactoryPromise = import("./shark_wasm.js").then((module) => module.default);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return rawFactoryPromise;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export async function createRawSharkModule(options) {
|
|
79
|
+
const factory = await loadRawFactory();
|
|
80
|
+
|
|
81
|
+
return factory(options);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function computeEquity(shark, request) {
|
|
85
|
+
assertRangeInput("request.hero", request?.hero);
|
|
86
|
+
assertRangeInput("request.villain", request?.villain);
|
|
87
|
+
|
|
88
|
+
return shark.equityExhaustive(
|
|
89
|
+
request.hero,
|
|
90
|
+
request.villain,
|
|
91
|
+
normalizeBoard(request.board),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function computeMonteCarloEquity(shark, request) {
|
|
96
|
+
assertRangeInput("request.hero", request?.hero);
|
|
97
|
+
assertRangeInput("request.villain", request?.villain);
|
|
98
|
+
|
|
99
|
+
const options = resolveMonteCarloOptions(request?.options);
|
|
100
|
+
return shark.equityMonteCarlo(
|
|
101
|
+
request.hero,
|
|
102
|
+
request.villain,
|
|
103
|
+
normalizeBoard(request.board),
|
|
104
|
+
options.sampleCount,
|
|
105
|
+
options.seed,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export async function createShark(options) {
|
|
110
|
+
const shark = await createRawSharkModule(options);
|
|
111
|
+
|
|
112
|
+
shark.computeEquity = (request) => computeEquity(shark, request);
|
|
113
|
+
shark.computeMonteCarloEquity = (request) => computeMonteCarloEquity(shark, request);
|
|
114
|
+
|
|
115
|
+
return shark;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export { countBoardCards, getStreet, normalizeBoard };
|
|
119
|
+
|
|
120
|
+
export default createShark;
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gills-pro/sharkjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Texas Hold'em poker equity calculator (WebAssembly)",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"types": "./
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"default": "./index.js"
|
|
12
|
+
},
|
|
13
|
+
"./types": {
|
|
14
|
+
"types": "./types.d.ts",
|
|
15
|
+
"default": "./types.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
8
19
|
"files": [
|
|
20
|
+
"index.js",
|
|
21
|
+
"index.d.ts",
|
|
22
|
+
"types.js",
|
|
23
|
+
"types.d.ts",
|
|
9
24
|
"shark_wasm.js",
|
|
10
25
|
"shark_wasm.wasm",
|
|
11
26
|
"shark_wasm.d.ts"
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
export type CardCode = string;
|
|
2
|
+
export type ComboCode = string;
|
|
3
|
+
export type RangeInput = string;
|
|
4
|
+
export type BoardInput = string;
|
|
5
|
+
|
|
6
|
+
export type Street = "preflop" | "flop" | "turn" | "river";
|
|
7
|
+
export type ReviewPlayer = "hero" | "villain";
|
|
8
|
+
export type SolverPlayer = "out_of_position" | "in_position" | "none";
|
|
9
|
+
export type NodeType = "action" | "terminal_fold" | "terminal_showdown";
|
|
10
|
+
export type ActionKind = "check" | "bet" | "call" | "raise" | "fold";
|
|
11
|
+
export type EquityMethod = "exhaustive" | "monte_carlo";
|
|
12
|
+
export type RangeGuessSource = "user" | "model" | "preset" | "revealed";
|
|
13
|
+
export type HandClass =
|
|
14
|
+
| "high_card"
|
|
15
|
+
| "pair"
|
|
16
|
+
| "two_pair"
|
|
17
|
+
| "three_of_a_kind"
|
|
18
|
+
| "straight"
|
|
19
|
+
| "flush"
|
|
20
|
+
| "full_house"
|
|
21
|
+
| "four_of_a_kind"
|
|
22
|
+
| "straight_flush";
|
|
23
|
+
export type DrawCategory =
|
|
24
|
+
| "flush_draw"
|
|
25
|
+
| "open_ended_straight_draw"
|
|
26
|
+
| "gutshot"
|
|
27
|
+
| "overcards"
|
|
28
|
+
| "pair_plus_draw"
|
|
29
|
+
| "backdoor_flush_draw"
|
|
30
|
+
| "backdoor_straight_draw"
|
|
31
|
+
| "made_hand"
|
|
32
|
+
| "air";
|
|
33
|
+
|
|
34
|
+
export interface RuntimeMemoryExports {
|
|
35
|
+
HEAPF32?: Float32Array;
|
|
36
|
+
HEAPF64?: Float64Array;
|
|
37
|
+
HEAP_DATA_VIEW?: DataView;
|
|
38
|
+
HEAP8?: Int8Array;
|
|
39
|
+
HEAPU8?: Uint8Array;
|
|
40
|
+
HEAP16?: Int16Array;
|
|
41
|
+
HEAPU16?: Uint16Array;
|
|
42
|
+
HEAP32?: Int32Array;
|
|
43
|
+
HEAPU32?: Uint32Array;
|
|
44
|
+
HEAP64?: BigInt64Array;
|
|
45
|
+
HEAPU64?: BigUint64Array;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SharkModuleFactoryOptions {
|
|
49
|
+
locateFile?: (path: string, prefix: string) => string;
|
|
50
|
+
onRuntimeInitialized?: () => void;
|
|
51
|
+
onAbort?: (reason: unknown) => void;
|
|
52
|
+
wasmBinary?: ArrayBuffer | Uint8Array;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface EquityResult {
|
|
57
|
+
equity: number;
|
|
58
|
+
winWeight: number;
|
|
59
|
+
tieWeight: number;
|
|
60
|
+
lossWeight: number;
|
|
61
|
+
matchupCount: bigint;
|
|
62
|
+
runoutCount: bigint;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface MonteCarloEquityResult extends EquityResult {
|
|
66
|
+
confidenceLo: number;
|
|
67
|
+
confidenceHi: number;
|
|
68
|
+
variance: number;
|
|
69
|
+
sampleCount: bigint;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface MonteCarloOptions {
|
|
73
|
+
sampleCount: number;
|
|
74
|
+
seed: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface EquityRequest {
|
|
78
|
+
hero: RangeInput;
|
|
79
|
+
villain: RangeInput;
|
|
80
|
+
board?: BoardInput;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface MonteCarloEquityRequest extends EquityRequest {
|
|
84
|
+
options: MonteCarloOptions;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface ExhaustiveEquitySnapshot extends EquityResult {
|
|
88
|
+
method: "exhaustive";
|
|
89
|
+
hero: RangeInput;
|
|
90
|
+
villain: RangeInput;
|
|
91
|
+
board: BoardInput;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface MonteCarloEquitySnapshot extends MonteCarloEquityResult {
|
|
95
|
+
method: "monte_carlo";
|
|
96
|
+
hero: RangeInput;
|
|
97
|
+
villain: RangeInput;
|
|
98
|
+
board: BoardInput;
|
|
99
|
+
options: MonteCarloOptions;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type EquitySnapshot =
|
|
103
|
+
| ExhaustiveEquitySnapshot
|
|
104
|
+
| MonteCarloEquitySnapshot;
|
|
105
|
+
|
|
106
|
+
export interface RiverSolveRequest {
|
|
107
|
+
board: BoardInput;
|
|
108
|
+
outOfPositionRange: RangeInput;
|
|
109
|
+
inPositionRange: RangeInput;
|
|
110
|
+
pot: number;
|
|
111
|
+
effectiveStack: number;
|
|
112
|
+
betSizes: number[];
|
|
113
|
+
maxRaises: number;
|
|
114
|
+
bigBlind: number;
|
|
115
|
+
iterations: number;
|
|
116
|
+
convergenceSampleInterval?: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface SolverResult {
|
|
120
|
+
iterationsCompleted: number;
|
|
121
|
+
exploitabilityMbbPerHand: number;
|
|
122
|
+
outOfPositionStrategy: number[];
|
|
123
|
+
inPositionStrategy: number[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface ExploitabilityResult {
|
|
127
|
+
exploitabilityChips: number;
|
|
128
|
+
exploitabilityMbbPerHand: number;
|
|
129
|
+
bestResponseEvP0: number;
|
|
130
|
+
bestResponseEvP1: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface ConvergenceTrace {
|
|
134
|
+
exploitabilityPerIteration: number[];
|
|
135
|
+
strategyDriftPerIteration: number[];
|
|
136
|
+
sampleInterval: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ActionDefinition {
|
|
140
|
+
index: number;
|
|
141
|
+
kind: ActionKind;
|
|
142
|
+
label: string;
|
|
143
|
+
sizeFraction?: number;
|
|
144
|
+
amountChips?: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface StrategyRow {
|
|
148
|
+
combo: ComboCode;
|
|
149
|
+
frequencies: number[];
|
|
150
|
+
weight?: number;
|
|
151
|
+
handClass?: HandClass;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface SolvedNodeStrategy {
|
|
155
|
+
nodeIndex: number;
|
|
156
|
+
actingPlayer: SolverPlayer;
|
|
157
|
+
nodeType: NodeType;
|
|
158
|
+
potSize: number;
|
|
159
|
+
actions: ActionDefinition[];
|
|
160
|
+
rows: StrategyRow[];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface TreeNode {
|
|
164
|
+
nodeType: NodeType;
|
|
165
|
+
actingPlayer: SolverPlayer;
|
|
166
|
+
numActions: number;
|
|
167
|
+
firstChildIndex: number;
|
|
168
|
+
potSize: number;
|
|
169
|
+
outOfPositionStreetContribution: number;
|
|
170
|
+
inPositionStreetContribution: number;
|
|
171
|
+
foldWinner: SolverPlayer;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface GameTree {
|
|
175
|
+
nodes: TreeNode[];
|
|
176
|
+
root: number;
|
|
177
|
+
numActionNodes: number;
|
|
178
|
+
numTerminalNodes: number;
|
|
179
|
+
maxDepth: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface DetailedSolverResult extends SolverResult {
|
|
183
|
+
exploitability?: ExploitabilityResult;
|
|
184
|
+
convergenceTrace?: ConvergenceTrace;
|
|
185
|
+
tree?: GameTree;
|
|
186
|
+
nodes: SolvedNodeStrategy[];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface WeightedCombo {
|
|
190
|
+
combo: ComboCode;
|
|
191
|
+
weight: number;
|
|
192
|
+
live: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface RangeSummary {
|
|
196
|
+
input: RangeInput;
|
|
197
|
+
liveComboCount: number;
|
|
198
|
+
totalMixFrequency: number;
|
|
199
|
+
weightedComboCount?: number;
|
|
200
|
+
percentOfComboSpace?: number;
|
|
201
|
+
topCombos?: WeightedCombo[];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface ComboBreakdown {
|
|
205
|
+
combo: ComboCode;
|
|
206
|
+
weight: number;
|
|
207
|
+
equity?: number;
|
|
208
|
+
handClass?: HandClass;
|
|
209
|
+
isBlocked?: boolean;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface HandClassDistributionEntry {
|
|
213
|
+
handClass: HandClass;
|
|
214
|
+
weight: number;
|
|
215
|
+
comboCount: number;
|
|
216
|
+
frequency: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface HandClassDistribution {
|
|
220
|
+
entries: HandClassDistributionEntry[];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface DrawDistributionEntry {
|
|
224
|
+
draw: DrawCategory;
|
|
225
|
+
weight: number;
|
|
226
|
+
comboCount: number;
|
|
227
|
+
frequency: number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface DrawDistribution {
|
|
231
|
+
entries: DrawDistributionEntry[];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface BlockerEffect {
|
|
235
|
+
combo: ComboCode;
|
|
236
|
+
blockedCombos: ComboCode[];
|
|
237
|
+
blockedCards: CardCode[];
|
|
238
|
+
removedWeight: number;
|
|
239
|
+
deltaEquity: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface BlockerSummary {
|
|
243
|
+
hero: RangeInput;
|
|
244
|
+
villain: RangeInput;
|
|
245
|
+
board: BoardInput;
|
|
246
|
+
effects: BlockerEffect[];
|
|
247
|
+
totalBlockedWeight: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface ActionEvent {
|
|
251
|
+
street: Street;
|
|
252
|
+
actor: ReviewPlayer;
|
|
253
|
+
action: ActionKind;
|
|
254
|
+
amountChips?: number;
|
|
255
|
+
potBefore?: number;
|
|
256
|
+
potAfter?: number;
|
|
257
|
+
board?: BoardInput;
|
|
258
|
+
note?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface RangeBucketBreakdown {
|
|
262
|
+
label: string;
|
|
263
|
+
weight: number;
|
|
264
|
+
comboCount: number;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface StreetRangeGuess {
|
|
268
|
+
player: ReviewPlayer;
|
|
269
|
+
street: Street;
|
|
270
|
+
range: RangeInput;
|
|
271
|
+
source: RangeGuessSource;
|
|
272
|
+
note?: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface RangeEstimate extends StreetRangeGuess {
|
|
276
|
+
confidence?: number;
|
|
277
|
+
topCombos?: WeightedCombo[];
|
|
278
|
+
buckets?: RangeBucketBreakdown[];
|
|
279
|
+
explanation?: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface RangeGuessScore {
|
|
283
|
+
player: ReviewPlayer;
|
|
284
|
+
street: Street;
|
|
285
|
+
massOnActualCombo?: number;
|
|
286
|
+
percentileOfActualCombo?: number;
|
|
287
|
+
topKHit?: boolean;
|
|
288
|
+
topK?: number;
|
|
289
|
+
distanceToPosterior?: number;
|
|
290
|
+
distanceToRevealedCombo?: number;
|
|
291
|
+
bucketAccuracy?: number;
|
|
292
|
+
notes?: string[];
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface StreetReview {
|
|
296
|
+
street: Street;
|
|
297
|
+
board: BoardInput;
|
|
298
|
+
actions: ActionEvent[];
|
|
299
|
+
heroGuess?: RangeEstimate;
|
|
300
|
+
villainGuess?: RangeEstimate;
|
|
301
|
+
heroModelEstimate?: RangeEstimate;
|
|
302
|
+
villainModelEstimate?: RangeEstimate;
|
|
303
|
+
equity?: EquitySnapshot;
|
|
304
|
+
guessScores?: RangeGuessScore[];
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface HandReviewResult {
|
|
308
|
+
streets: StreetReview[];
|
|
309
|
+
revealedHeroCombo?: ComboCode;
|
|
310
|
+
revealedVillainCombo?: ComboCode;
|
|
311
|
+
finalGuessScores: RangeGuessScore[];
|
|
312
|
+
summary?: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface ScenarioPreset {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
description?: string;
|
|
319
|
+
tags?: string[];
|
|
320
|
+
board?: BoardInput;
|
|
321
|
+
heroRange?: RangeInput;
|
|
322
|
+
villainRange?: RangeInput;
|
|
323
|
+
outOfPositionRange?: RangeInput;
|
|
324
|
+
inPositionRange?: RangeInput;
|
|
325
|
+
pot?: number;
|
|
326
|
+
effectiveStack?: number;
|
|
327
|
+
betSizes?: number[];
|
|
328
|
+
maxRaises?: number;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface ComparisonCase {
|
|
332
|
+
label: string;
|
|
333
|
+
hero: RangeInput;
|
|
334
|
+
villain: RangeInput;
|
|
335
|
+
board?: BoardInput;
|
|
336
|
+
note?: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface ComparisonEntry<Result> {
|
|
340
|
+
label: string;
|
|
341
|
+
result: Result;
|
|
342
|
+
deltaEquity?: number;
|
|
343
|
+
deltaWinWeight?: number;
|
|
344
|
+
deltaTieWeight?: number;
|
|
345
|
+
deltaLossWeight?: number;
|
|
346
|
+
note?: string;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface ComparisonResult<Result> {
|
|
350
|
+
baselineLabel?: string;
|
|
351
|
+
entries: ComparisonEntry<Result>[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface QuizPrompt {
|
|
355
|
+
id: string;
|
|
356
|
+
street: Street;
|
|
357
|
+
kind: "equity" | "pot_odds" | "range_estimation";
|
|
358
|
+
prompt: string;
|
|
359
|
+
acceptableRange?: {
|
|
360
|
+
min: number;
|
|
361
|
+
max: number;
|
|
362
|
+
};
|
|
363
|
+
answer?: string;
|
|
364
|
+
explanation?: string;
|
|
365
|
+
}
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|