🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #4908

Pawn ram code in gnuchess

#4908
From: Chua Kong Sian
Date: Sat, 18 Jun 1994 04:54
23 lines
1503 bytes
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
Technical Details
Message-ID: <2ttuln$bbd@nuscc.nus.sg>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,37bbd87f491aa673,start
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1994-06-17 22:29:10 PST
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!nuscc.nus.sg!nsrccks
From: nsrccks@leonis.nus.sg (Chua Kong Sian)
Newsgroups: gnu.chess
Subject: Pawn ram code in gnuchess
Date: 18 Jun 1994 04:54:15 GMT
Organization: National University of Singapore
Lines: 23
Message-ID: <2ttuln$bbd@nuscc.nus.sg>
NNTP-Posting-Host: leonis.nus.sg
X-Newsreader: TIN [version 1.2 PL0]