Solving poker in custom WebGPU kernels
7 hours ago
- Author needed a tensor library for poker model in WebGPU but found custom kernels were sufficient, achieving over 10x speedup.
- Poker solvers find approximate Nash equilibria; commercial solvers are expensive, motivating an open-source in-browser version.
- Using PyTorch as a correctness oracle, Codex generated WebGPU kernels that passed parity tests and optimized overnight.
- When code generation is cheap and verifiable, custom kernels can outperform general libraries, flipping the traditional tradeoff.
- The project uses counterfactual regret minimization (CFR) with a neural network for re-solving, a modern approach to equilibrium solving.
- LLM capabilities have evolved significantly; they can now implement entire papers from scratch but still lack planning and judgment.
- Conclusion: library and language choice are less binding; rewrites are no longer forbidden; the solver is available at holdem.computer.