SnailChess is a Windows program written in C and compiled with MS Visual C for the Pentium Compatible processor. It does not have its own graphical interface and requires to run with the chess playing interface Winboard by Tim Mann.
The basic of the program follows mainly what is learned from the codes of TSCP by Tom Kerrigan and that of Gerbil by Bruce Moreland. Both programs are very good sources for beginners.
The author started chess programming in 1997 and has released previous versions. This version 4.0 is a new rewrite but some codes from the previous versions have been used.
The 32 chess pieces are represented using 32 structures that contain square positions, color, type , an on-off flag and the pieces are toggled on or off as needed. This seems better than that of TSCP that keeps track of a 64 piece-board and having to loop through 64 squares instead of 32 pieces.
Presently moves that captures at least the same ranking is given the highest ordering without additions. For other moves, history heuristic is used. Also a fairly comprehensive attack scoring is added and this may reduce the overall NPS, but seems good.
So when the signals are unreliable, the recommended best move may not be too good against an opponent coming with a more reliable probability of the goodness of move. Crafty is a near grand master level chess program and its evaluation codes seem to be highly complicated with exotic terms like tropism ... and other things that need chess knowledge to understand.
The evaluation of SnailChess follows the basic from TSCP and added other elements from common sense. The evaluation of TSCP is a raw and short core evaluator that uses the bare minimum of chess knowldege, but the most important aspect for each of the types.
Pawns - penalty for being lone, doubled, backward. A high bonus per rank
for passed-opponent-pawn and exposed, ie. cleared ahead of any opponent pawns.
Bonus for advancing pawns.
Knight and Bishop - Only piece-square table values are used, emphasis being
on the central positions.
Rook - Bonus for rook on 7th rank, on open or half-open file from blocking pawns.
Queen - no evaluation.
King - King penalty when it goes higher in rank before end-game.
3-pawn cover when the king has gone into a corner; Pawn storms by opponent pawns
getting close to the king; Castling
With the above evaluation, TSCP can out-search and out-play other programs that may be more complicated or may even have a hash table but less well implemented. So what it does not detect at raw basic evaluation, it detects after searching deeper with very fast evaluation. It simply optimizes on the trade-off between evaluation knowledge and search speed. TSCP is near the top among the basic winboard chess programs.
SnailChess includes all of the above with minor variations. It added others like evaluations with binary-bishop and binary-rook, lone-bishop, bishop trap by pawns at 7th rank side file, knight trap, rook trap, knight passed-pawn, knight near the center of gravity of king-king and best-passed-exposed pawns of the 2 sides during end-game( maybe what knight tropism is ?), trapped rook at a corner by own king, pieces getting to the same side of a king with a weak 3-pawn cover, evaluation for the best passed-pawn, and others. Connected-pawn-chain has a high emphasis. pawn, knight and bishop attacks with double attack, and other attacking evaluations.
If all options in the snail.ini file is set off including the hash table, then the program relies only on move ordering and evaluation.
SnailChess uses 10 bytes per record and the hash table may be disabled or the size set from the executable command line/ init file and has a maximum limit of about 700MB. It will round up to the nearest reasonable size value. The actual value allocated from memory is printed to the log file at the start of the program. All nodes are hashed including those for quiescence search and nullmove search using the same hash-table.