Skip to content
System One

Laya vs Jev: T-Rex Race

Laya, running locally on Apple Silicon via MLX, and Jev, over TypeSafe's hosted API, play Chrome's T-Rex game side by side on a shared obstacle course, with response times, survival streaks and crash replays recorded.

Still from Laya vs Jev: T-Rex RacePlay the video in the post below
Still from x.com

virajbhartiya/laya-vs-jev on GitHub

Stars
93
Forks
9
Language
Python
License
Apache-2.0
Last push
21 Sep 2026

Post on X

Views
240,842
Likes
1,658
Reposts
101

Read from GitHub and X on . Counts change daily.

This project races two typed-decision models against each other in a clone of Chrome’s offline dinosaur game: Laya running locally on Apple Silicon through MLX, and Jev called over TypeSafe’s hosted API, both actually controlling their dinosaur’s jumps and ducks on a shared obstacle course rather than following a script. According to the author’s post, Jev also controls the obstacles.

A deterministic physics planner labels the available moves, and each model picks among them, with a safety check able to override an unsafe or stale choice. Because of that override layer, the README is explicit that the recorded scores measure the combined system, not the two models’ decision-making in isolation; a separate best-move statistic tracks how often each model agrees with the planner’s own suggestion instead. The demo records live latency charts, survival streaks and slow-motion replays of crashes, and can run timed three-round matches where a tie is broken by whichever side needed fewer safety interventions.

The project builds on mizorewww’s laya-mlx port for the local Laya side; its documented latency figures are for that library’s own benchmark, not for gameplay in this race.

How it uses Jev

    """
    decision = self.route(state, questions, model=model, task=task, lang=lang)
    agent = self.load(decision["model"])
    result = agent.system_one(state, questions)
    result["routing"] = dict(decision)
    return result

system_one = predict

def __repr__(self):
    return "Router(loaded=%s, max_loaded=%d, default=%r)" % (
        self.loaded,
        self.max_loaded,
        self.default,
    )

View in laya_mlx/router.py

Open on GitHub

More like this

Use cases this is tagged with