Chaingammon

An open protocol for portable backgammon reputation and agentic collaboration

Chaingammon

Created At

Open Agents

Project Description

Backgammon is an ancient and popular game that has help people's attention for millennia. The project attempts to solve problems with current web2 frameworks: one can spend years building a ranking on a platform only to have it go down, find that dice are rigged, or terms changed. The challenges are naturally solved by web3: every match settles to a MatchRegistry contract. Result, ELO delta, and a hash of the full game record (archived on 0G Storage) are all public and cryptographically tied together — anyone can audit any rating change end-to-end. Each player's rating lives in their wallet via an ENS subname (<name>.chaingammon.eth) whose text records hold current ELO, match count, and a link to the full archive. Switch frontends, switch clients — reputation comes with you.

I also thought about modernizing backgammon by making it agentic. The state of the art model is GNUBG, trained with RL, TD-lambda, and minimax, and A Bearoff Database, which can beat humans. It is not very interesting to have humans out of the picture and identical agents compete resulting in completely random outcomes. I propose two innovations:

  1. agents infer moves based the game state using on GNUBG's open weights AND a feature vector of the opponent, trained by RL. This opens the possibility for star agents, who end up with superior strategy, which could beat GNUBG in the long run by choosing the right teammates.

  2. Based on DeepMind's insights, particularly following their work with AlphaZero, the future of optimal game play is viewed as a partnership that combines human creativity with AI's superhuman analytical capabilities. We see this in programming: claude code is superior to humans at coding, but the combination is better than claude code. Chaingammon provides a way for human and agent to team up and make joint decisions utilizing respective strengths: agents at computation (they can see the history of the opponents matches to find patterns) and and micro-tactics, and human intent and out-of-band context. When humans and agents play on a team, the LLM interface is more than a dashboard of agent findings: it allows for a back and forth human guidance and LLM research iterations.

How it's Made

Frontend: Next.js 16 + wagmi v3 / viem v2, pinned to Webpack.

Backend: Solidity, Sepolia

KeeperHub: workflow fires on both MatchEscrow.Deposited events. Games are started by collecting escrow by Keeperhub, provides drand dice, which also ECDSA-signs the result, lands record + payout in one tx, mirrors the audit JSON to 0G Storage.

Each player's rating lives in their wallet via an ENS subname (<name>.chaingammon.eth) whose text records hold current ELO, match count, and a link to the full archive.

0G Storage holds GameRecords (Log), per-player style profiles (KV), and per-agent NN checkpoints (Blob, Merkle root committed to iNFT.dataHashes.

0G Compute runs the Qwen 2.5 7B Chief-of-Staff coach via @0glabs/0g-serving-broker called straight from Next.js Route Handlers. Includes TEE attestation sig.

Python shells out to Node CLIs (og-bridge, og-compute-bridge) because the 0G SDKs are not on Keeperhub.

background image mobile

Join the mailing list

Get the latest news and updates

Chaingammon | ETHGlobal