Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pawn ram code in gnuchess

65 views
Skip to first unread message

Chua Kong Sian

unread,
Jun 18, 1994, 12:54:15 AM6/18/94
to

The pawn ram code in gnuchess as it is currently implemented is
ineffective. The code is given in eval.c PawnValue() as

if (rank != 7 && color[sq+8] == black && board[sq+8] == pawn)
s -= PCRASH;

This says that if the square in front of a white pawn contains a black
pawn, then the white side is penalised by PCRASH. A similar code is
also given for black pawns. The problem with this code is that it is not
assymetric. This means that if there is a pawn ram, both the computer
and its opponent will be penalised by PCRASH and consequently both
penalties cancel eash other out. To fix this, change the above to

if (c1==computer && rank != 7 && color[sq+8] == black &&
board[sq+8] == pawn)
s -= PCRASH;

Now, only the computer is penalized and not the opponent. The same
thing can be done with the pawn ram code for black pawns too.


Kong Sian

0 new messages