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.

294 projects

Rimworld autopilot

Georgy-hook

A local RimWorld colony autopilot uses Laya to choose and issue in-game orders

2·GitHub repo

doom-war

rythmn1111

Compares local MLX Laya and hosted Jev as decision-makers in a Doom deathmatch

2·GitHub repo

mac-attack

dockndevai

A macOS app uses Laya decisions to direct harmless effects in a camera-based screensaver game

2·GitHub repo

SnakeGame_Laya

Okbatti

Uses a fine-tuned Laya model to choose moves in a Snake game

2·GitHub repo

laya-asteroids-local

Klerith

Runs the Laya decision model locally to play Asteroids in a browser

2·GitHub repo

pacman-arena

hakan-gecili

Compares Laya with other local decision models playing Pac-Man under identical conditions

2·GitHub repo
D

laya-chess

datafreak

Fine-tunes Laya on chess positions to predict move win chances

29·HF model
R

laya-tetris

rehman-ali

A fine-tuned Laya model selects Tetris piece rotations and drop columns

8·HF model
T

laya-vision-201m

thaitea

A compact SmolVLM-based Laya checkpoint for image decisions and simple games

1·HF model
B

laya-plays-google-snake

BoogieKn

Provides an imitation-trained Laya checkpoint that scores moves in the Google Snake game

1·HF model
M

laya-snake-mlx

madhavbiplov

Fine-tunes a multilingual Laya model for calibrated snake-game decisions on Apple silicon

1·HF model
J

laya-ra2-v33

jayzou3773

Fine-tunes Laya to score candidate actions in Red Alert 2 matches

1·HF model

laya-plays-doom

shantanugoel

Trains Laya with reinforcement learning to play Doom through ViZDoom

1·GitHub repo

laya

xosi

Runs Laya typed-decision inference locally on Apple Silicon with MLX

1·GitHub repo

laya-mlx-ddz

smile-magic

A browser-based 斗地主 game lets two local AI seats play using Laya on Apple Silicon

1·GitHub repo

laya-plays-mario

DavidDevGt

Fine-tunes Laya as a control policy for playing Super Mario Bros

1·GitHub repo

laya-jev-arena

dante01yoon

Compares local Laya and hosted Jev models in games and measurement tools

1·GitHub repo

laya-unity

0x440-1me

A Unity SDK for local Laya-compatible servers and TypeSafe System One endpoints

1·GitHub repo

laya-invaders

inhabitants

Uses Laya to choose targets in a Space Invaders game and compares it with a rule baseline

1·GitHub repo

tetris_for_laya

fchange

Provides a terminal Tetris environment where a local Laya model chooses each action

1·GitHub repo

RayCodes_LayaAI

47thtechcorner

A browser-based Pong game uses Laya to control an AI opponent's paddle

1·GitHub repo

laya-vs-dijkstra

antonellof

Compares Laya MLX pathfinding decisions with Dijkstra on seeded weighted mazes

1·GitHub repo
M

laya-web-demo

mizchi

Runs Laya typed decisions in browser games using ONNX Runtime Web and WebGPU

1·HF Space

system1-jev-laya-agent

harshavarma02

Runs a speedcubing agent that uses Laya and Jev to assess cube states and choose moves

1·GitHub repo

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