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

0·GitHub repo

laya-snake

D9-cell

Runs Laya in Rust to play Snake in a terminal or browser dashboard

0·GitHub repo

laya-tetris

kuchris

Runs Laya as a Tetris placement decision-maker with a heuristic safety guard

0·GitHub repo

Laya_Demo

zhangfanxp

Uses the local Laya model to choose maze branches and trace a route to the exit

0·GitHub repo

Laya_Playground

jonas050210

Runs local Laya decision demos, games, and a raw playground through a browser interface

0·GitHub repo

laya-gomoku

ttianeo

A tkinter Gomoku game uses Laya decisions and heuristics to choose moves

0·GitHub repo

laya-breakout

Eng-Ahmd

Runs a locally hosted Laya decision model to control a Windows Breakout game

0·GitHub repo

sway-laya

CallSohail

A Gradio word game where players try to elicit specific decisions from Laya

0·GitHub repo

snake-AI

jhao

A browser Snake game with switchable local Laya and hosted Jev decision engines

0·GitHub repo

laya-snake-ai

ArjunSonara

Integrates Laya decisions into a Snake game that navigates hazards and hunts apples

0·GitHub repo

SnakeGame-laya

Cong-Quang

Serves a Laya-powered decision API for a self-playing Snake game

0·GitHub repo

laya-doom-agent

Jaiswal-Siddhant

Uses Laya-MLX to choose actions for an autonomous DOOM agent

0·GitHub repo

exp-laya-router

zheyar-ltd

Demonstrates a CUDA-based Laya policy router in real-time Snake and Tetris games

0·GitHub repo

laya-snake-ai

IrMaho

Runs a tactical Snake arena powered by the local Laya decision model

0·GitHub repo

keemsisi-tetris-laya

keemsisi

Lets players control Tetris with decisions from the Laya model

0·GitHub repo

laya-snake-cuda

inhabitants

Ports the laya-mlx Snake demo to PyTorch for CUDA or CPU and adds a disturbance mode

0·GitHub repo

laya-vs-jev

darrenli6

Compares Laya and Jev in snake-racing and fighting-game arenas

0·GitHub repo

laya-plays-doom

greencat667

Uses Laya as a single-pass decision model for an autonomous Doom-playing agent

0·GitHub repo

laya-flappy-bird

GadhiyaRaj

A Flappy Bird-style game uses Laya to choose real-time flap or coast actions

0·GitHub repo

laya-or-jev-pong

bananadonn

Compares local Laya and hosted Jev decision APIs by having them control paddles in Pong

0·GitHub repo

doom-ai-overlord

JohGirard

Runs Laya as a local decision model for autonomous Doom gameplay through ViZDoom

0·GitHub repo

Tuantuan

JunbiaoXue

Provides a native macOS desktop companion that uses local Laya decisions to choose behavior

0·GitHub repo

Knowledge-Decider

TaewoooPark

An interactive artwork uses a local Laya model to select books across three rounds

0·GitHub repo

PacmanLocalJev

raboija

Runs local Laya decisions in a Windows Pac-Man-inspired game with live probabilities and benchmarks

0·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