2 December 2026
Live mode: agents that act every tick
The v4 match was close, but one point from a reviewer stuck: a plan is still a script. Two agents typing a program every few minutes doesn't look like two minds fighting. So we started on a mode where both act in real time.
The obvious idea is to put every move on chain. It doesn't work: a fight tick is a tenth of a second and a block is about four seconds, so a one-minute match has 600 ticks and the chain could carry about 15 moves in that time. That is exactly why rooms use plans. A plan is a policy the chain can run on its own for a whole round.
So the chain's job changes. It stops being the messenger and becomes the judge. The match is played off-chain, tick by tick, by two programs that exchange moves through a small relay. The chain only has to be able to check, afterwards, that the logs were honest and produce the score.
Before building anything we tested the one thing that could kill the idea: can the existing rules take two independent move logs and give a score both sides accept? A throwaway test replayed two 1200-tick logs in a single call for about 167M gas, comfortably inside the 500M we already ask for, and the result matched an independent replay. That was a pass or fail test, and it passed.
Then came the part that makes the claim worth anything: proving the moves were played live and not rewritten afterwards. Each side posts a hash of its whole log every 10 seconds (a rolling hash, so each one covers everything so far). At the end both submit full logs, and the chain checks each against its own hashes before replaying. A log written after the fact can't match.
Our first version had a hole. Anchors could land any time before a deadline, so a side could play a match, watch the other's moves, then rewrite its own and anchor late. A reviewer spotted the same weakness from the design alone. Each anchor now has a window: not before its time, so nobody can commit a whole match in advance, and not long after, so nobody can wait and peek. A side that misses a window can't submit and forfeits.
We also tested it the way a cheater would. The test suite doctors one tick of a log after anchoring, submits a log one tick short, anchors too early, anchors too late, and leaves one side out so it forfeits. Each is refused as it should be. We then ran two agents through the relay and fed their real logs to the chain's rules: the hashes the agents printed were exactly the ones the realm computes, and the replay gave the score the agents reached themselves.
What we built
- A realm (live/v1): create, join, anchor, submit, settle, forfeit.
- A relay: a mailbox with a clock that applies both sides' moves for each tick and publishes the pair.
- An agent loop that runs the real rules locally, in step with the other side, and picks one move per tick. Its policy can be a house bot, a smart plan or any function.
- A browser view that follows the relay's stream and, after the match, asks the chain whether it replayed the same score.
How a live match is checked
| Step | Who | What happens |
|---|---|---|
| Every 0.1 s | Agents and relay | Each agent sends a move for the next tick; the relay applies both together and publishes the pair. |
| Every 10 s | Each agent | Posts one hash covering all of its moves so far (Anchor). |
| At the end | Each agent | Submits its full log (Submit). |
| Straight after | The chain | Checks each log against its anchors, replays both, records the score. |
| If a side is missing | The chain | After the deadline it forfeits and the other side wins. |
What went wrong, and the fix
- Could the chain take two independent move logs and agree on a score? If not, the whole idea fails.
- Fix: We tested that first, before anything else: yes, about 167M gas for two 1200-tick logs in one call.
- Anchors could land any time before a deadline, so a side could wait, watch the other, rewrite its own moves and anchor late.
- Fix: Each anchor has a window, with a test for the late case. A side that misses one forfeits.
- Where should the relay run? Whoever hosts it controls the clock and what happens to a late move.
- Fix: It has to be run by someone who isn't one of the two agents, and its code is public so its rules can be audited.
- The relay could show one agent a different stream from the other.
- Fix: Not built yet: each agent will compare what it saw of the other side with the other side's submitted log.
- Over the internet, an agent that reacts to tick N can only affect a later tick, so the faster connection would win.
- Fix: Not built yet: agents will send moves a few ticks ahead so the lead is the same for both.
What we learned: Prove the risky half first, and let someone else attack the design before the code is written. Both changed what we built.