Notes on Creating a 5×5 Shogi AI

I’ve been gradually working on an AI for “5×5 Shogi,” a subset of standard Shogi. Here are some notes on what I’ve learned. Data Structure Each piece is managed using bitboards. For example, if a Black pawn exists at position 7, it’s represented as bitboard[B_PAWN] = 0x40. The range of rooks and bishops is derived using AVX2’s _pext_u32 instruction [5]. Search Strategy The basic approach uses alpha-beta pruning for search. Additionally, legal moves are sorted while performing iterative deepening....

May 29, 2015

Complete Analysis of Dobutsu Shogi

(Added 7/10) I’ve placed an AI that uses the complete analysis results at dobutsu-shogi.jar (17MB). Please try playing against it. It’s a bit late, but I performed a complete analysis of Dobutsu Shogi. The method has already been published, so please refer to that for unclear points (“Complete Analysis of Dobutsu Shogi”, Tetsuro Tanaka). My implementation also references that. The goal of the analysis is to complete an AI that, when playing as the second player, wins in exactly 78 moves, and when playing as the first player, plays moves that are hardest to lose (moves that maximize the number of moves until defeat)....

May 28, 2015