
Training a Shogi Engine: ONNX Conversion, TensorRT, and Getting Crushed by Ryfamate
Shogi — Japanese chess — has a thriving computer engine scene that most Western developers have never encountered. While the chess world has Stockfish and Leela Chess Zero, the shogi world has its own ecosystem of neural network engines, and the engineering challenges are fascinating. This is the story of converting a 20-billion-parameter shogi model from PyTorch to ONNX, optimizing it for TensorRT inference, and discovering that model size means nothing if your search parameters are wrong. Shogi AI: Context for Chess Developers If you know Stockfish or Leela Chess Zero, shogi engines will feel familiar with important differences: Shogi has a much larger game tree than chess. Captured pieces can be dropped back onto the board, which means the branching factor is roughly 80 (vs. chess's ~35). This makes brute-force search much harder. dlshogi is the shogi equivalent of Leela Chess Zero — a neural network engine that uses Monte Carlo Tree Search (MCTS) to evaluate positions. It's been co
Continue reading on Dev.to Python
Opens in a new tab




