Commit Graph

5 Commits

Author SHA1 Message Date
Perplexity 3f60fa554e Fix V2 canonical item names + rewrite README
Synced engine tables.rs to Immolate display strings so UI<->engine FNV
hashes match. Previously the UI sent 'Riff-raff', 'Mr. Bones',
'Oops! All 6s', 'Mail-In Rebate', "Driver's License", 'Top-up Tag',
"Director's Cut" while the engine pools held stripped-punctuation
versions, so Op::HasJoker never matched and the V2 filter rejected
every seed (5M/s, 0 hits).

Also fixes Stuntman (now Uncommon) / Vampire (now Rare) rarities to
match Immolate items.cl J_U_BEGIN..J_R_END blocks.

Regenerated both WASM bundles (scalar + SIMD) and vendored to web/public.
Full README rewrite covering current state, filter DSL, and honest gaps.
2026-06-28 23:06:29 +00:00
Julie b779e905ee Add AnyOf clause: fixes 'no matches found' regression
Previously, a single joker constraint with maxAnte=8 emitted 8 separate
'ante N shop has joker X' clauses and ran in strict AND mode. That
silently required the joker to appear in EVERY ante 1..8 — astronomically
unlikely, hence zero matches.

The new AnyOf clause wraps N sub-clauses and passes iff any one passes.
Adapters now emit one AnyOf per user constraint (joker/voucher/tag),
each containing the per-ante sub-clauses.

Confirmed via smoke_anyof: Blueprint in any ante 1..8 now hits ~2% of
seeds (vs ~0.27% for ante 1 alone, ~0% before the fix).

- filter.rs: new Clause::AnyOf and Op::AnyOf variants
- search.rs: extracted eval_op so AnyOf can recurse; sub-ops share
  Instance state (safe because rand_choice_common is keyed by
  (kind, source, ante) and node-cached, so call order is irrelevant)
- bin/smoke_anyof: regression test
- All 21 existing tests still pass
2026-06-28 22:39:30 +00:00
Julie 864829388c Expand bench_throughput across filter shapes
Adds 8 filter shapes (joker, voucher, tag, boss, pack, mixed, 16-clause)
to give an honest ceiling per query type. Typical joker query is
~570k seeds/sec native single-thread; voucher-only is ~1M/s because
it short-circuits earlier on misses.
2026-06-28 22:30:28 +00:00
Julie cbaa5501a0 Close 4/6 honest gaps + 100k regression sweep
- Add bin/verify.rs: 100k-seed sweep validating determinism, pool, locks,
  stickers, and distribution. All hard checks zero. Rarities 70.22/24.78/5.00,
  pack weights match Immolate PACKS table within 0.05%.
- Update docs/comparison.md and README to reflect closed gaps (4/6) and the
  two remaining: Standard pack card-level modelling, bit-for-bit Immolate
  parity sweep.
- Rebuild WASM bundles (scalar + SIMD) into web/public/engine and
  web/public/engine-simd.
2026-06-28 22:12:59 +00:00
Julie 3aeb69a8ef Initial scaffold: Rust engine + WASM + web/server skeleton
Engine (Rust → WASM):
- pseudohash + LuaJIT-compatible PRNG (LCG with tausworthe step)
- Per-run instance cache (get_node_child ported from Immolate)
- Item tables for all 12 categories (60 common jokers, 5 legendaries, etc.)
- Source derivations: next_joker, next_tag, next_voucher, next_boss
- Filter DSL with bytecode compiler and 5 clause kinds
- WASM bundles: scalar (135KB) and SIMD-enabled (147KB)
- 14/14 tests passing; native throughput 552k seeds/sec with real derivations

Web:
- Vite + React + TypeScript scaffold
- COOP/COEP headers for SharedArrayBuffer
- Engine loader + worker stubs ready for milestone 2

Server:
- Optional Node.js WebSocket worker (off by default per user request)
- Dockerfile + README with honest cloud-speedup math

Built from scratch in one session — no Balatro source code reused.
2026-06-28 21:24:57 +00:00