The Version 1 computer opponent


There are two versions of the computer player. The program plays very weakly (weaker than a complete beginner, I suspect) at a simple 2-ply level.

The program searches 2 ply moves ahead (that is, two moves by the Japanese count, or one move for each side), plus one extra ply if the second-ply was a capture. Thereafter it continues to search for captures on the same square as the previous capture. This helps deal with the (very common in Chu) situation of many pieces all acting on the same square (but doesn't help against igui, or capture and move on). Apart from this, it uses an ordinary minimax (with alpha-beta pruning) algorithm.

The computer knows the strength of the pieces (if you wish to change them, the relevant figure is the last column in the pieces.data file), but it will still appear to make stupid plays at 2-ply - this is because it only sees it's own move, and your reply. So, for instance, if you have the option of playing Lion takes Dragon King, but will obviously not do so, as the Dragon King is protected, the computer is still liable to play Dragon Horse takes Pawn. Since it can't see it's own reply to your capture, if it can't move the Dragon King away, then it looks to it that you must gain a whole Dragon King. So it captures the Pawn, doing the best it can (it thinks you do better to capture the Dragon King than it's Dragon Horse, not seeing that it can re-capture your Lion).

The extra move option cures this silliness.

The program has little intelligence programmed into the program - it tries to make the biggest material gain (or, more likely, the least material loss), although there is a bonus (of roughly a promoted Gold) for having both a King and a Crown Prince. In addition, it uses a set of matrices of weightings for the different types of pieces. This has the tendency to make the computer play a little like Colin Adams when he's had one beer too many. Consequently, it is easily the best Chu Shogi program I have played against (but I haven't played against Zillions), and better than some humans I have played.

It does play all the rules correctly (if you find otherwise, then this is a BUG, and you should report it to me, whereupon I may fix it (priority is given to the Version 2 computer opponent, but if the bug also affects other areas of the program, then it will be dealt with).

Top