Xiangiqgame
AI engine for Xiangqi
|
This page shows terminal recordings and Minimax data plots for games run with a variety of play_xiangqi
command options.
Red establishes an advantage early, and maintains it throughout the game. During searches for moves ~ 40 - 60, both players detect ~100 leaf nodes with Red losing, but Red is able to prevent actual game moves from going down these paths. Around move 65, Red discovers a transposition table hit in the root node, resulting very low search time. Red's search time per node trends downward throughout the game as its ratio of transposition table hits to standard leaves increases. Search time per node for both players drops sharply in the final ~10 moves, likely due to discovery of shallow end-of-game leaves.
With the the deeper search depth, Red explores ~100x more nodes per move than Black throughout most of the game. Red's search time per node drops significantly from moves 40 - 60, largely due an increase in the ratio of transposition table hits to standard leaves. Black's search time per node also decreases in the same move range, benefitting from significant alpha pruning. Red realizes that its victory is guaranteed around move 85. Black does not realize that its loss is inevitable until move ~102.
Now, with Black using the deeper search depth, it searches ~100x more nodes per move than red. Both players exhibit a downward trend in search time per node throughout the game as pruning and transposition table hits become more significant (relative to standard leaves and fully evaluated nodes). Black detects that its victory is nearly certain around move 63.
In this game Red randomly selects one of its available moves on each turn, so Minimax data are only generated for Black. Black detects a path to victory at move 40, although the game continues for another 30 moves after this point. This larger than usual number of moves between victory detection and end-of-game is likely due to Red's random decisions which do not match the assumptions of Black's Minimax algorithm. Black's number of nodes explored per move drops dramatically at the same time that it realizes victory is virtually assured due to the discovery of end of game nodes.
In this game, both players use a max search depth = 6, which is larger than the search depths used in any other games in our demo series. During early moves, max search times per move are ~2x higher than observed for players with search depth = 5. Black has the advantage until move 80, but Red then quickly gains the upper hand and ultimately wins at move 136. Both players become aware of the eventual result around move 124.
Here, Red and Black use the same search depth (= 5), but black uses 128 bit Zobrist hashing keys instead of the usual 64 bits. While the use of 128 bit keys drastically reduces the hash collision probability, the time per node data do not indicate any significant search time penalty for the larger key size.
Deeper investigation into Minimax game data shows that with 64 bit keys and search depth = 5, evidence of one or more hash collisions is found in approximately 1 out of 6 games. It is likely that the actual rate of collisions is more common than this, as a collison is only detected if it causes a player to attempt an illegal move - and not all collisions will result in selection of an illegal move. With 128 bit keys, the practical hash probability goes to zero. Although the player with the larger key size does win the game here, it is not yet clear if 128 bit keys produce a significant benefit over 64 bit keys in game outcome.