ALTXI

Type in your friends' names, five a side, and watch a cricket match that never happened, ball by ball, with commentary. A random seed chosen before the first ball decides everything, and when the match ends your browser can prove the seed wasn't swapped.

Open ALTXI

Made
Built with
TypeScript, React, Hono, Cloudflare Workers and D1
Status
Live

The question

Can a game be fair without anyone having to trust the server? In ALTXI nobody controls anything. There are no tactics or ratings, and no buttons to press during play. The only way to cheat would be to change the result after the fact, so the whole design is about making that checkable.

How it works

There are two ways in. A quick match is two five-player teams set up on one phone, or a challenge link so the other side picks their own team. A league is 4 to 8 teams of 5 to 11 players, playing one round-robin season. Matches are 5 or 10 overs, ties go to a Super Over, and league tables use net run rate.

Every player is equal: there are no player ratings, and the tests check that a player's position in the list makes no difference.

Each fixture stores a random 256-bit seed, and that seed decides everything. Separate deterministic streams (xoshiro128**) drive the play, the line-ups and the commentary, so the same seed always produces the same match, byte for byte. The Worker simulates the whole match up front but only sends what has happened so far. Until the end, no response contains the seed, a future ball, the final scores or the winner.

Commentary comes in English or Hinglish. A six might get "ne ball seedha WhatsApp group mein bhej di": he sent the ball straight into the WhatsApp group.

Checking the result

Before the first ball, each match publishes a commitment: a SHA-256 hash of the seed, the fixture and the rules version. The hash gives nothing away about the seed. When the match ends, the seed itself is published, and your browser recomputes the hash. If they match, the seed, and so every ball, was fixed before the match began.

commitment = sha256(seed + fixtureId + rulesVersion)

This is commit-reveal, the same idea as sealing your guess in an envelope before the answer is known.

Evidence

There are 20 tests. They cover fixed random-number vectors, byte-for-byte repeatability, engine invariants across seeded samples, equality across roster positions, tied matches and Super Overs, round-robin fixture counts, and net run rate when a side is all out.

It's about 3,900 lines of TypeScript, in one Worker with one D1 database. There are no accounts, background jobs or WebSockets, and no AI at run time.

In September it moved to its own address with a fresh database and no analytics. After the move I checked that pages and API responses serve with no injected scripts, and that a new match is created with its commitment in place and its seed hidden.

What didn't work

Commit-reveal proves less than it seems to. It shows the seed wasn't changed after the commitment, but it doesn't show the seed was chosen fairly. The server picks it, and could in principle try many seeds before committing to one it liked. Nothing here guards against that except that the server has no stake in the result. The fix would be to mix in randomness from the players themselves.

Real names are personal data. Matches are public only after an explicit acknowledgement, and can be switched to link-only or deleted. Public pages take reports, and a league can be hidden while a report is reviewed by hand.

The move started from scratch, so matches played at the first address didn't come across. And without WebSockets there's no live push: a match page keeps asking for new balls as the match plays out.