bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible mistake in ScoreP


From: Simon Waters
Subject: Re: possible mistake in ScoreP
Date: Tue, 21 Jan 2003 02:38:39 +0000
User-agent: Simon/5.0 (X11; U; Linux i686; en-US ; rv:1.0.0; hi, Mom) Gecko/20020604

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernard Helmstetter wrote:
> Hi everybody,
>
> There might be a mistake in the function ScoreP in eval.c:
>
>   /* Pawn on f6/c6 with Queen against castled king is very
strong */
>   c = board.b[side][pawn];
>   sq = board.king[xside];


>   if (side == white && board.b[side][queen] &&

if we are white and have a queen

>    (BitPosArray[C6] | BitPosArray[F6]) & c)

and have a pawn on c6 or f6

>   {
>      if (c & BitPosArray[F6] && sq > H6 && distance[sq][G7]==1)
>         s += PAWNNEARKING;

   and the pawn is on F6, and the enemy king is on seventh or
eighth (this could be done better) and the king is one square
from G7....

>      if (c & BitPosArray[C6] && sq > H6 && distance[sq][B7]==1)
>         s += PAWNNEARKING;
>   }
>   else if (side == black && board.b[side][queen] &&
>    (BitPosArray[C3] | BitPosArray[F3]) & c)
>   {
>      if (c & BitPosArray[F3] && sq < A3 && distance[sq][G2]==1)
>         s += PAWNNEARKING;
>      if (c & BitPosArray[C3] && sq < A3 && distance[sq][B2]==1)
>         s += PAWNNEARKING;
>   }
>
> In my opinion, the test about the location of the king (sq) should
> depend on the location of the pawn.

I'm not sure what you mean, my reading is that the code agrees
with the comment - you might argue it is a fairly arbitary test,
and doesn't seem to apply if the king is in check (?), but I
don't see that it is wrong as such.

Can you give a position where you think it is wrong?

 Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+LLKrGFXfHI9FVgYRAgp5AJ42pvVCwoQ90VMICsGkXb2kDzPx2ACdHb4d
WDOzGxLnJnTihs5Vt3VaXAY=
=/F1X
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]