Search found 67 matches

by grant
Tue Jan 05, 2010 4:27 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: The problem with LMR in suprtactical positions.
Replies: 23
Views: 5423

Re: The problem with LMR in suprtactical positions.

If you keep record of king safety scores then

Code: Select all

if (blackKingSafety[ply] - blackKingSafety[ply - 1] > SAFETYMARGIN)
 do not reduce;
where kingSafety values are stored as positives.

Grant
by grant
Mon Dec 15, 2008 3:41 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: beowulf opening book
Replies: 6
Views: 1396

Re: beowulf opening book

I found this on the web. An en passant target square is given if and only if the last move was a pawn advance of two squares. Therefore, an en passant target square field may have a square name even if there is no pawn of the opposing side that may immediately execute the en passant capture. Though ...
by grant
Sat Dec 13, 2008 3:59 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

So what about queens? Does this look really too slow, as compared with generating all queen moves from the queen and intersecting with all queen moves from the king? TO_bitboard = queenIntersect[from][oppKing]; while (TO_bitboard) { to = lsb_clear(TO_bitboard); if (!((inbetw...
by grant
Fri Dec 12, 2008 10:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Looks like I may just as well use my existing inbetween[][] array for legal bishop checks (my inbetween[][] includes destination square). Discovered checks are handled separately. to1 = diagIntersect1[from][oppKing]; if (to1) { if (mask[from] & pinned) { if (inbetween[o...
by grant
Fri Dec 12, 2008 8:27 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Gerd thanks very much.

The diagIntersect[64][64] array need only be 1 char because an intersection can never occur at square 0.

Code: Select all

to1 = diagIntersect[from][oppKing];
if (to1)  // intersection point;
Grant
by grant
Thu Dec 11, 2008 11:59 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Gerd

If the bishop was not on the same colour square as the opponents king, then the first test would fail since the allBishopTargets bitboard would be set to 0xFFFFFFFFFFFFFFFF.

Grant
by grant
Thu Dec 11, 2008 11:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Sven Yes, but they need to be done separately which is what I am setting up at the moment. int diagIntersect1[64][64]; int diagIntersect2[64][64]; int to1, to2; // if (!(allBishopTargets_1[from][oppKing] & allOccupied)) to1 = diagIntersect1[from][oppKing]; if (!(allBishopTargets_2[from][...
by grant
Thu Dec 11, 2008 9:26 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Bob Yes, this is what I did in my previous GenerateChecks(), but I seem to have gone off the magics idea and only use them in GenerateCaptures(). Ironically. For the queen, I let the GenerateCaptures() know when to save the attacks bitboard (certain plys in QS) which saves duplicating the calculatio...
by grant
Thu Dec 11, 2008 7:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4143

Re: Calculating TO

Thanks Edmund

The rook calculation above should have read

(sqA & 56) + (sqB & 7) and/or
((sqB & 56) + (sqA & 7)

Oops.

Grant