If you write shogi engines, this is an invitation.
I built tinyai.run, an arena where you register an engine and it plays other engines around the clock until it has a rating.
The shogi ladder has four engines on it right now. Two are mine. The other two are versions from a single outside author. I am looking for more.
No hardware advantage
An ordinary game server measures a move with a wall clock. Whoever brings the faster machine searches deeper, and a busy server changes the result.
Here there is no wall clock. Before an engine runs, its WebAssembly is rewritten so that every executed instruction is counted. 100 ms a move means 4 billion instructions.
- A faster PC does not search deeper.
- The same game is produced on a phone, on Node on your laptop, and on the server.
- A timeout is not "the machine was slow". It is a fact you can replay from the record.
From the engine's side, clock_time_get returns a virtual time built from the instruction count. An ordinary engine that watches the clock to stop its search works unchanged.
The same conditions for everyone
Every rated game is run by the server, under the same limits.
| Item | Value |
|---|---|
| One move | 100 ms (4 billion instructions). There is no time bank |
| WASM size | up to 4 MiB |
| Memory | up to 32 MiB |
| Threads | not available |
| Game end | Repetition (sennichite) and 256 moves are draws. Entering-king declaration uses the 27-point rule |
Memory is not free either. The more memory an engine holds, the less of each move it can use.
| Memory in use | 1 MiB or less | 4 MiB | 8 MiB | 16 MiB | 32 MiB |
|---|---|---|---|---|---|
| Usable part of a 100 ms move | 100 ms | 85 ms | 71 ms | 53 ms | 35 ms |
A big hash table or evaluation function goes in if it earns back the time it costs. If it does not, it comes out. That decision shows up directly in the ranking.
A submitted WASM is never handed to anyone, other participants included. What is public is the name, the size, the game records and the rating.
This is a place for small shogi engines
To be plain: this is not a replacement for floodgate or for the championships. It is also not a place to bring a strong engine with a large evaluation file as it is.
How smart can an engine be inside a small budget of bytes and instructions? That is a different game. Ratings are on the arena's own scale and cannot be compared with floodgate ratings.
The first shogi engine to arrive was 95 KB and used 0.7 MiB of memory. Its first version won 2 of 49 games. A new version arrived two hours later and has won 41 of 134 so far.
Above it, two reference engines of mine are waiting.
How to set one loose
If you already have a USI engine, it can join almost as it is. It needs a WASI build (Rust wasm32-wasip1, or C and C++ with wasi-sdk) and no threads. The arena sends only usi, isready, position and go btime 0 wtime 0 byoyomi 100.
Starting from nothing? There is a starter: one dependency-free Rust file (MIT) that handles pieces in hand, promotion, two pawns on a file (nifu) and pawn-drop mate (uchifuzume).
rustup target add wasm32-wasip1 ARENA=https://tinyai.run mkdir -p mine/src mine/.cargo && cd mine curl -sf $ARENA/starter/shogi/Cargo.toml -o Cargo.toml curl -sf $ARENA/starter/shogi/src/main.rs -o src/main.rs curl -sf $ARENA/starter/shogi/.cargo/config.toml -o .cargo/config.toml cargo build --release --target wasm32-wasip1 cp target/wasm32-wasip1/release/starter-shogi.wasm starter.wasm Improve src/main.rs, build it the same way, copy the result to engine.wasm, and play it locally. The tool is a single file with the same checks, referee and instruction clock as the server.
curl -sf $ARENA/tools/arena.mjs -o arena.mjs node arena.mjs check engine.wasm node arena.mjs play engine.wasm --opponent starter.wasm --game shogi --games 4 To register, open the Join tab on the site, type a name and choose the WASM. It costs nothing and there is no account.
A new engine first plays a gate: 3 games against a weak opponent, with no loss and at least one win. The unchanged starter rarely passes (measured: about 1%). Add a quiescence search, so that captures are followed to the end, and it passes about 3 times in 10.
After the gate you can leave it alone. Games are paired automatically, and the record keeps the instruction count, depth and evaluation of every move. Read the games it lost, then send the next version.
You can also hand this to your AI agent. Give it https://tinyai.run/llms.txt and it can go from check to registration over HTTP alone.
The first 32
The first 32 authors through the gate get a numbered GEN-0 mark on their engine, in the order they passed. The mark is permanent. It applies to registrations signed with an author key.
Chess and shogi together have two outside authors so far. More than 30 seats are left.
Please submit only code you have the right to submit, and name the engine yours builds on, if any.
The full rules are in the manual and the spec.
The same 4 billion instructions for everyone. How far can yours read? Set one loose.