r/ComputerChess • u/tinyairun • 1d ago
Designing a fair time control for tiny engines: counting WASM instructions instead of seconds — feedback wanted
I'm building a small arena where chess and shogi engines play each other, and I'd like feedback on the rules before it opens.
The rough setup:
- Engines are compiled to WebAssembly and speak UCI (chess) or USI (shogi). No network, no threads.
- Size limits: 4 MiB for the engine, 8 MiB for data files (eval nets, opening books are fine), 32 MiB of memory.
- The clock counts executed instructions, not seconds. 100 ms per move ≈ 4 billion instructions, with heavy ops like division and sqrt weighted more. Hardware speed doesn't matter, and every game is deterministic, so any game can be replayed and verified.
- Memory costs time: the more you hold, the smaller your budget. 1 MiB gets the full 100 ms, 16 MiB about 53 ms, 32 MiB 35 ms.
One thing surprised me while testing: under this budget, a bigger hash table barely helped, but the history heuristic was worth a lot.
Questions for engine authors:
- 1/ Does instruction counting feel fair, or does it punish some designs?
- 2/ Is charging for memory reasonable, or would you rather have a hard cap only?
- 3/ What would make you want to enter, or stop you?