poker-flopsolve 0.1.0 → 0.2.0

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/README.md CHANGED
@@ -320,8 +320,10 @@ deterministic at any thread count.
320
320
 
321
321
  ### Algorithm and benchmark
322
322
 
323
- The default update rule is Discounted CFR (`algorithm: 'dcfr'`, α 1.5, β 0, γ 2). CFR+
324
- is still available as `algorithm: 'cfr+'`. `npm run bench` times a fixed river, turn, flop
323
+ The default update rule is Discounted CFR (`algorithm: 'dcfr'`, α 1.5, β 0, γ 3, with
324
+ positive regret counted from the second iteration so the uniform first iteration is
325
+ forgotten). CFR+ is still available as `algorithm: 'cfr+'`. The table below predates the
326
+ 0.2.0 schedule, which needs 10–15% fewer iterations on flop and turn spots. `npm run bench` times a fixed river, turn, flop
325
327
  and two-tone flop. Measured in a 4-core cloud container, seconds of solving to reach each
326
328
  target (exploitability checks excluded):
327
329
 
@@ -336,6 +338,26 @@ The solver is compute-bound rather than memory-bound — a 150 MB flop streams i
336
338
  accumulators at about 0.25 GB/s — so the cost of an iteration tracks the work in it, not
337
339
  its bytes.
338
340
 
341
+ ### Compared with postflop-solver
342
+
343
+ `npm run bench:compare` runs the same spots through this solver and
344
+ [b-inary/postflop-solver](https://github.com/b-inary/postflop-solver) (Rust, built
345
+ natively for the machine) at the same 32-bit precision, thread count and checking
346
+ schedule. It needs a Rust toolchain; postflop-solver is fetched at build time and never
347
+ bundled. Measured in a 4-core cloud container, time to 0.3% of pot:
348
+
349
+ | Spot | Threads | poker-flopsolve | postflop-solver | Ratio |
350
+ |---|---|---|---|---|
351
+ | Turn | 1 | 4.0 s | 0.9 s | 4.2× |
352
+ | Flop | 1 | 81.3 s | 18.5 s | 4.4× |
353
+ | Monotone flop | 1 | 25.1 s | 5.3 s | 4.7× |
354
+ | Flop | 4 | 25.5 s | 5.3 s | 4.8× |
355
+ | Monotone flop | 4 | 8.2 s | 1.4 s | 5.8× |
356
+
357
+ postflop-solver is roughly four to six times faster: native Rust over dense f32 vectors
358
+ against JavaScript. Closing more of the gap means moving the traversal itself into
359
+ WebAssembly, which is the next piece of work.
360
+
339
361
  ### Accuracy targets
340
362
 
341
363
  `solve(spot, { targetPercent })` stops as soon as exploitability reaches that percentage of
@@ -433,10 +455,9 @@ type-checked, tested and built; if the `version` in `package.json` is not on npm
433
455
  is published, with provenance. So a release is: bump `version`, merge to `main`. A push
434
456
  that leaves the version alone publishes nothing.
435
457
 
436
- It needs one repository secret, `NPM_TOKEN`: an npm granular access token with read and
437
- write access to `poker-flopsolve` (for the very first publish, before the package exists,
438
- one with permission to publish new packages). Without it the workflow still tests and
439
- builds, and says it skipped publishing.
458
+ It publishes by npm trusted publishing: npm trusts this repository's `publish.yml`
459
+ (set up under the package's settings on npmjs.com), the job proves who it is with GitHub's
460
+ OpenID Connect token, and no npm token is stored anywhere.
440
461
 
441
462
  ## License
442
463