Author: Robert Hyatt
Date: 20:08:57 10/22/00
Go up one level in this thread
On October 22, 2000 at 17:43:15, Lenard Spencer wrote:
>In evaluate.c, the trapped-bishop code has something that has me curious.
>
>> if (WhiteBishops) {
>> if (WhiteBishops&mask_A7H7) {
>> if (WhiteBishops&SetMask(A7) && SetMask(B6)&BlackPawns)
>> score-=BISHOP_TRAPPED;
>> else if (WhiteBishops&SetMask(H7) && SetMask(G6)&BlackPawns)
>> score-=BISHOP_TRAPPED;
>> }
>> }
>> if (BlackBishops) {
>> if (BlackBishops&mask_A2H2) {
>> if (BlackBishops&SetMask(A2) && SetMask(B3)&WhitePawns)
>> score+=BISHOP_TRAPPED;
>> else if (BlackBishops&SetMask(H2) && SetMask(G3)&WhitePawns)
>> score+=BISHOP_TRAPPED;
>> }
>> }
>
>The way I see this, if someone were so foolish to trap BOTH his bishops,
>wouldn't this only see one of them, skipping the second check after it finds the
>first one? Or is this just something to speed up the search a tiny bit upon
>finding a trapped bishop at A2/A7? Or am I missing something else?
>
>Thanks.
>
>BTW, I finally got the BOOK.BIN file, with (would you believe???) AOL's "Keyword
>FTP". All that after both IE and Netscape choked at the same point in the file.
> Go figure....
That is just "habit" programming. 99.999% of the time, both ifs are
executed, since no bishops are hung. When one is on the key square, then
the other square is not checked...
I doubt it matters at all how it is done.
No idea what would hang an ftp connection, other than a very poor internet
link that loses too many packets...
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.