## Search found 67 matches

Thu Dec 11, 2008 6:06 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4633

### Re: Calculating TO

Sven That is exactly what I was trying to avoid. For rooks giving check, I simply lookup the bitboard containing all the squares the rook has to pass over to capture the king (if you see what I mean), and AND it with ALLOccupied. If the result is zero, a non-capture check is possible and the TO squa...
Thu Dec 11, 2008 5:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4633

### Re: Calculating TO

Sven

The TO square means the square/s that the rook moves to to check the king.
My board representation is A8=0, B8=1 ... H1=63, and I have a bitboard engine.

I just thought of trying a quick calculation to get my TO square in my generate checks function, which also does not require magics.

Grant
Thu Dec 11, 2008 4:29 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Calculating TO
Replies: 24
Views: 4633

### Calculating TO

Hi

If my rook can check the king, then by calculation, the TO square is

(oppKing >> 3) + (from & 7) and/or
(from >> 3) + (oppKing & 7)

If my bishop can check the king, is there a formula for calculating the TO squares?

Grant
Sat Nov 01, 2008 5:24 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Chess programmers should take notice ..
Replies: 19
Views: 5390

### Re: Chess programmers should take notice ..

Oliver

I took a peek at your source code and I'm puzzled by one thing. Mobility for your bishop's are not blocked by the opponents queen OR rook. Is this because the rook is worth more and you expect it to move out of the way?

Grant
Sat Oct 25, 2008 11:56 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Chess programmers should take notice ..
Replies: 19
Views: 5390

### Re: Chess programmers should take notice ..

Uri

Not sure I follow your logic. If preventing a move is/could be an advantage, would you not want to express that advantage in the score?
In think in most cases the pawn is an effective defender. Yes there are sacrifices, the search should find that, not a mobility evaluation.

Grant
Sat Oct 25, 2008 10:20 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Chess programmers should take notice ..
Replies: 19
Views: 5390

### Re: Chess programmers should take notice ..

Oliver

Do you reward mobility points even if a square is attacked by an enemy pawn?
And how about Xrays if a bishop or rook can reach an own queen?

Grant
Tue Oct 21, 2008 3:09 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Legal move generator
Replies: 30
Views: 9930

### Re: Legal Move Generator

Maybe this is stating the obvious but it has only just dawned on me. If I know that my bishop or rook is pinned and I know the pinner, I need to find out if my piece can move along the pin ray rankDiff = (pinner >> 3) ^ (pinned >> 3); fileDiff = (pinner & 7) ^ (pinned & 7...
Mon Sep 29, 2008 10:29 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Legal move generator
Replies: 30
Views: 9930

### Re: Bitboard programs

HG I can see no way of bulk testing the king's neighbourhood squares for attacks. You simply have to generate the attacks of opponent pieces that can potentially reach the king's neighbourhood. A simple piece-type mask from the king's square removes most attackers, so not all moves for all opponent ...
Thu Sep 25, 2008 4:19 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Legal move generator
Replies: 30
Views: 9930

### Re: Legal move generator

I XOR the king out of the occupied bitboard so that it cannot hide in it's own shadow. I generate opponent moves just once, and the kings attack board that is left must be legal moves. Would you not generate opponent moves for each square the king could move to (potentially 8 times) when you do your...
Thu Sep 25, 2008 3:03 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Legal move generator
Replies: 30
Views: 9930

### Re: Legal move generator

HG Does Joker generate pseudo-legal king moves because it is non-bitboard? If the king has a possible 8 squares it can move to, you would have to make/unmake and test if the king is in check for each move. Whereas I start with a bitboard of king moves and AND out the NEG of all opponent moves. Grant