sketch_thompson_vs_ucb1_bench.nx
buildroot/runtime/sketch_thompson_vs_ucb1_bench.nx
about
sketch_thompson_vs_ucb1_bench.nx -- paired measurement, Thompson vs UCB1.
CLAIM TO VALIDATE:
Thompson Sampling (sketch_thompson) achieves LOWER regret than
UCB1 (sketch_ucb1) on a 2-armed Bernoulli bandit with arms at
80% and 20% over 1000 steps. Modern Bayesian-bandit literature
(Chapelle-Li 2011, Russo-Van Roy 2018) reports Thompson winning
by ~10-15% empirical regret on this setting. We measure the
same on our substrate.
SHARED WORKLOAD:
- Same simulator LCG state seed (999) for both
- 1000 steps each
- Arm 0 = 80% (true mean 0.8), Arm 1 = 20% (true mean 0.2)
- Optimal cumulative reward = 800 (always pick arm 0)
MEASUREMENT:
ACCURACY axis: cumulative successes (closer to 800 wins).
MEMORY axis: nx_thompson_memory_bytes vs nx_ucb_memory_bytes.
TIME axis: INCONCLUSIVE.
HARD-WIN GATE:
ACCURACY axis must BEAT by at least 1% (10000 ppm).
dependencies 5 imports · 0 importers
imports: syscalls.nxsketch_thompson.nxsketch_ucb1.nxsketch_comparator.nxsketch_types.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 31 | const NX_SIM_LCG_A: i64 = 1103515245 |
| 32 | const NX_SIM_LCG_C: i64 = 12345 |
| 33 | const NX_SIM_LCG_MOD: i64 = 0x7FFFFFFF |
functions
| 35 | func main() -> i64 |