Games played by Laya
Games are the most popular way to show what a fast decision model can do. Each frame becomes a state, the model answers a typed question, and the game acts on the answer. The best demos also show where Laya needs help from ordinary code.
0 projects
Nothing matches yet. Submit a project
Run one locally
Snake on a Mac from laya-mlx:
pip install 'laya-mlx[demo]'
hf download aac6fef/laya-multilingual-mlx
laya-snake
The README reports 75.40 moves/s over 2,400 moves on an M3 Max with --optimize --max-speed, with zero deaths and two visible safety interventions. laya-coreml has a Neural Engine version at 49.1 to 50.0 decisions/s.
Flappy Bird on an Intel CPU from flappy-laya-openvino-cpu, with one noul question per frame:
pip install -r requirements.txt
python flappy_bird.py
Its README reports a mean 28 ms per decision with the INT8 OpenVINO model.
More games
- laya-pong: browser Pong with a native Laya paddle at 18.7 ms p50 on Metal.
- laya-vs-jev: Laya (MLX) and Jev (API) play Chrome's T-Rex side by side.
- laya-vs-jev-arena: a snake race and a fighting game, Laya vs Jev or vs a human.
- open-jev-laya: Gomoku, Big Two and a 3D maze entirely in the browser.
- laya-playground: Flappy, a lane runner and Tetris, plus an editor.
- kevala: Tetris in the browser on WebAssembly and WebGPU.
- Laya4j: Snake and a Spring Boot Tetris in Java.
What the demos teach
- Describe the state in words. In laya-pong, the model matched the reference controller when the state was a sentence and never moved when it was three numbers. The Flappy Bird author saw the same effect: with a JSON dict the model answered about 0.9 on every frame.
- Make options phrases. "move the paddle up" beat "up" in laya-pong: 5/5 correct against 3/5.
- Keep a planner and a safety layer. The Snake and T-Rex demos use planner features and a safety layer that can override unsafe moves. Their scores measure the whole system, not the model alone, and the READMEs say so.
More ways to use Laya
Run Laya on your MacLaya on MLXLaya on Core MLUse Laya from Node.jsLaya for PythonLaya on ONNX RuntimeLaya on OpenVINOLaya for RustLaya in C++ and GGUFRun Laya in the browserLaya for Go, Java, Elixir, Ruby and ZigContent moderation with LayaText classification with LayaRouting with LayaLaya for agentsLaya in coding toolsLaya for search and RAGLaya benchmarksSelf-host a Laya API server