TechNewsReel
Live

Developer uses LLM-generated WebGPU kernels to accelerate browser-based poker solver

Patrick Hulin bypassed general tensor libraries to achieve a 10x speedup using an AI-driven optimization loop.

TechNewsReel Newsroom · August 6, 2026

Developer Patrick Hulin has released an open-source poker solver that runs directly in the browser via WebGPU. By using a large language model (LLM) to generate custom low-level kernels rather than relying on general-purpose tensor libraries, Hulin achieved significant performance gains for the complex computations required to solve the game.

The solver utilizes Counterfactual Regret Minimization (CFR) and neural networks to approximate Nash equilibrium strategies, which are non-exploitable patterns of play. To implement this, Hulin used Codex to write custom WebGPU kernels. He established an optimization loop that used PyTorch as a correctness oracle to verify the AI's output; through an overnight process of iterative refinement, the custom kernels achieved a speedup of more than 10x over the LLM's initial naive implementation. The resulting tool is available at holdem.computer, with the source code hosted on GitHub at phulin/poker2.

The shift toward neural solvers

Poker solvers aim to identify strategies that cannot be beaten regardless of the opponent's play. While commercial tools like Piosolver use tabular methods and GTOWizard employs neural networks, these options are often expensive for the average user. Modern neural solvers, drawing on academic research from projects like DeepStack and ReBeL, use search-style algorithms like CFR and neural networks to approximate values at a specific search depth cutoff. This approach allows for the handling of the massive state spaces inherent in Texas Hold'em without requiring the exhaustive memory of tabular solvers.

Redefining performance optimization

This project highlights a potential shift in how high-performance software is developed. Traditionally, developers rely on general-purpose libraries to handle tensor operations because writing custom GPU kernels is time-consuming and error-prone. However, Hulin argues that when code generation is cheap and the results are easily verifiable, the tradeoff flips. "In this case, a custom kernel that does exactly my computation can beat a general library," Hulin stated.

This suggests that in the era of LLMs, the value of a developer's role may shift away from writing specifications and toward creating robust reference implementations and test suites. By providing a "ground truth" (such as the PyTorch oracle used here), developers can leverage AI to iterate through low-level optimizations that would be too tedious to write by hand.

The limits of AI agency

Despite the success of the kernel generation, Hulin noted that the AI's capabilities remain uneven. While the agents were able to handle the bulk of the coding and optimization, they struggled with the higher-level planning and judgment required to architect the system. "I’m delegating more and more to the agents, but they still struggle to decide what to build," Hulin observed.

As WebGPU continues to mature, the ability to deploy highly optimized, domain-specific kernels in the browser could open the door for more complex simulations and AI tools to run client-side without the need for expensive server-side GPU clusters.

Sources

Get a notification when a big story breaks. A few a day at most — no spam.