AdaChess – The third release!

It’s time to happily say: AdaChess, the 3rd release, is ready to play! It has passed a lot of time from the previous version and from the alpha and beta release. Despite the long waiting, I develop AdaChess actively every week. There are a lot of improvement comparing to the previous 2.1 release and also some changes/improvement comparing with the beta release.

As already mentioned, the source code is now full Ada idiomatic and that was one of the most important requirement of the upgrading process. But of course as a chess engine there should be nice features to make it cool. And there they are! Here the improvement from the beta release to this final!

The engine

The move generator

The move generator has been seriously improved. The data structure has been resized as and 12×10 array and the array of pieces containing white and black pieces position has been unified. Therefore, I was able to remove one of the two utility board for mapping the piece-array and their index into the utility board.

The process of generating moves is almost the same as the beta release. It generate directly legal moves. The algorithm as been optimized for testing the legality only in the conditions in which it makes sense to do it. Those are King evasion and the movement of pinned pieces.

The generator detects the moves that checks opponent kings and AdaChess is able to understand “which” kind of check is it – a standard check, discovery check, double check or checkmate).  Those information, plus the captures, castles, promotions and en-passant, are collected and you can see them by running the perft.

AdaChess perft result from starting position on Microsoft Surface Pro.

AdaChess perft speed reaches 10MNps on an Intel core i5.

The search

As in the beta release, AdaChess search prune the three mainly with alpha-beta pruning, plus a futility pruning is applied on moves whose score is outside a small margin. The zero-window search has been recovered and the null-move implementation improved. The late move reduction is kept as is.

The PV nodes of the search tree doesn’t use any reduction and pruning.  Curiously, the search depth decreased on 1-2 ply but the playing strength increased around 50 Elo.

The hash tables

Hash table, called Transposition tables, are working fine and they has been tested a lot. The size of the table can be configured and AdaChess will find a power-of-two Mb to allocate the table.

The evaluation

The most important features in the evaluation is the mobility – weighted to the center. The mobility collect information for the pressure on the opponent king, giving me the ability to implement the king-safety for free.

Compilation from source

From this version AdaChess can be compiled directly by using the gprbuild tool. You can download the GPS IDE/editor to open the project file and compiling AdaChess from his source.

 

For other information you can have a look on the beta-release of AdaChess!

 

Please do not forget that AdaChess is a GPL software. Feel always free to use and share it under the terms of the GNU Public License. If you find any bug or if you thing that can be improved in some way please contact me!

Have fun and enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *