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.
138 projects
laya-quiz
Aryamanironman
Uses Laya to adapt trivia categories and difficulty to each player's performance
laya-snake
D9-cell
Runs Laya in Rust to play Snake in a terminal or browser dashboard
laya-tetris
kuchris
Runs Laya as a Tetris placement decision-maker with a heuristic safety guard
Laya_Demo
zhangfanxp
Uses the local Laya model to choose maze branches and trace a route to the exit
Laya_Playground
jonas050210
Runs local Laya decision demos, games, and a raw playground through a browser interface
laya-gomoku
ttianeo
A tkinter Gomoku game uses Laya decisions and heuristics to choose moves
laya-breakout
Eng-Ahmd
Runs a locally hosted Laya decision model to control a Windows Breakout game
sway-laya
CallSohail
A Gradio word game where players try to elicit specific decisions from Laya
snake-AI
jhao
A browser Snake game with switchable local Laya and hosted Jev decision engines
laya-snake-ai
ArjunSonara
Integrates Laya decisions into a Snake game that navigates hazards and hunts apples
SnakeGame-laya
Cong-Quang
Serves a Laya-powered decision API for a self-playing Snake game
laya-doom-agent
Jaiswal-Siddhant
Uses Laya-MLX to choose actions for an autonomous DOOM agent
exp-laya-router
zheyar-ltd
Demonstrates a CUDA-based Laya policy router in real-time Snake and Tetris games
laya-snake-ai
IrMaho
Runs a tactical Snake arena powered by the local Laya decision model
keemsisi-tetris-laya
keemsisi
Lets players control Tetris with decisions from the Laya model
laya-snake-cuda
inhabitants
Ports the laya-mlx Snake demo to PyTorch for CUDA or CPU and adds a disturbance mode
laya-vs-jev
darrenli6
Compares Laya and Jev in snake-racing and fighting-game arenas
laya-plays-doom
greencat667
Uses Laya as a single-pass decision model for an autonomous Doom-playing agent
laya-flappy-bird
GadhiyaRaj
A Flappy Bird-style game uses Laya to choose real-time flap or coast actions
laya-or-jev-pong
bananadonn
Compares local Laya and hosted Jev decision APIs by having them control paddles in Pong
doom-ai-overlord
JohGirard
Runs Laya as a local decision model for autonomous Doom gameplay through ViZDoom
Tuantuan
JunbiaoXue
Provides a native macOS desktop companion that uses local Laya decisions to choose behavior
Knowledge-Decider
TaewoooPark
An interactive artwork uses a local Laya model to select books across three rounds
PacmanLocalJev
raboija
Runs local Laya decisions in a Windows Pac-Man-inspired game with live probabilities and benchmarks
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