Lars Mathiesen wrote:
>
> I am hoping that you are the right one to ask.
>
> In eval.c (version 5.07) in ScoreK I have noticed the following code:
>
> b = (board.b[white][pawn] | board.b[black][pawn]);
> while (b)
> {
> sq1 = leadz (b);
> CLEARBIT (b, sq1);
> if (BitPosArray[sq1] & board.b[white][pawn])
> s -= distance[sq][sq1+8] * 10 - 5;
> else if (BitPosArray[sq1] & board.b[white][pawn])
> s -= distance[sq][sq1-8] * 10 - 5;
> else
> s -= distance[sq][sq1] - 5;
> }
> Clearly the "else if" is wrong. Since it can never happen.
> And also this piece of code scores differently for white and black which
> should not happen!
> ... SNIP ...
Hi Lars,
fairly sure you are right in both statements.
I assume one of these (the second?) should have said black instead of
white for reasons of symmetry, and the test is probably too crude to be
useful (even if it were right).
I will test the performance of removing it entirely, versus correcting
it, and include the better outcome in 5.08. It may be worth including
some measure of king distance from pawns.
Simon
_______________________________________________
Bug-gnu-chess mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnu-chess