/[chess]/chess/src/eval.c
ViewVC logotype

Diff of /chess/src/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28 by srw, Thu Mar 6 10:30:29 2003 UTC revision 1.29 by srw, Thu Aug 7 08:39:52 2003 UTC
# Line 1214  int ScoreDev (short side) Line 1214  int ScoreDev (short side)
1214   *   *
1215   ***************************************************************************/   ***************************************************************************/
1216  {  {
1217     int s = 0;     int s;
    int xside;  
1218     int sq;     int sq;
1219     BitBoard c;     BitBoard c;
1220    
    xside = 1 ^ side;  
   
1221     /* Calculate whether we are developed */     /* Calculate whether we are developed */
1222     c = (board.b[side][knight] & nn[side]) | (board.b[side][bishop] & bb[side]);     c = (board.b[side][knight] & nn[side]) | (board.b[side][bishop] & bb[side]);
1223     s += nbits(c) * -8;     s = nbits(c) * -8;
1224    
1225     /* If we are castled or beyond the 10th move, no more ScoreDev */     /* If we are castled or beyond the 20th move, no more ScoreDev */
1226     if (board.castled[side] || GameCnt/2+1 >= 20)     if (board.castled[side] || GameCnt >= 38)
1227        return (s);        return (s);
1228    
1229     s += NOTCASTLED;     s += NOTCASTLED;
# Line 1264  int ScoreDev (short side) Line 1261  int ScoreDev (short side)
1261     }     }
1262    
1263     /* Discourage any wing pawn moves */     /* Discourage any wing pawn moves */
1264     c = board.b[side][pawn] & (FileBit[0]|FileBit[1]|FileBit[6]|FileBit[7]);  /*   c = board.b[side][pawn] & (FileBit[0]|FileBit[1]|FileBit[6]|FileBit[7]); */
1265       c = board.b[side][pawn] & ULL(0xc3c3c3c3c3c3c3c3);
1266     while (c) {     while (c) {
1267       sq = leadz(c);       sq = leadz(c);
1268       CLEARBIT(c, sq);       CLEARBIT(c, sq);
# Line 1273  int ScoreDev (short side) Line 1271  int ScoreDev (short side)
1271     }     }
1272    
1273     /* Discourage any repeat center pawn moves */     /* Discourage any repeat center pawn moves */
1274     c = board.b[side][pawn] & (FileBit[2]|FileBit[3]|FileBit[4]|FileBit[5]);  /*   c = board.b[side][pawn] & (FileBit[2]|FileBit[3]|FileBit[4]|FileBit[5]); */
1275       c = board.b[side][pawn] & ULL(0x3c3c3c3c3c3c3c3c);
1276     while (c) {     while (c) {
1277       sq = leadz(c);       sq = leadz(c);
1278       CLEARBIT(c, sq);       CLEARBIT(c, sq);

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26