laya-js in the browser
Laya typed decisions (choice / score / yes-no) running entirely in your browser on WebGPU, with @johnhenry/laya and @johnhenry/backend-webgpu. Nothing is sent to a server: the weights download from Hugging Face and the model runs on your GPU.
Playground →
Pick a checkpoint, write a state, build choice / score / yes-no questions and see the probabilities.
Snake →
The Laya Snake demo: the model picks every move, with live move probabilities and a safety shield.
Flappy Bird →
The model decides flap or no-flap every tick, with a lookahead safety shield and live probabilities.
Checkers →
Laya, a scripted bot, or you -- pick who plays each side. Mandatory capture and chain rules enforced.
Tetris →
Every reachable placement enumerated per piece, guarded by a stack-height safety margin.
Dino Run →
Chrome's offline runner: jump, duck, or run, with a reactive lookahead shield per obstacle type.
Needs WebGPU: Chrome or Edge 113+ (f16 from 120), or Safari 26. The first load downloads the checkpoint (about 650 MB for the multilingual one) into your browser's Cache API; later visits load from the cache, and all demos share it. Checkers is the one exception — it plays fully without WebGPU if you skip the Laya seat.