Search found 67 matches

by grant
Thu Sep 04, 2008 8:43 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: checks in q-search.
Replies: 68
Views: 15766

Re: checks in q-search.

Well, I have it working. And now I'm re-writing my move generators to handle the information to produce only legal moves. To get it working I have to handle the rank, file and two diagonals separately. Example, the rank:- If the king is checked along the rank on the left, a pin on the right can be i...
by grant
Thu Sep 04, 2008 10:38 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: checks in q-search.
Replies: 68
Views: 15766

Re: checks in q-search.

Zack Did you read this post by HG? What I meant was that you could also start the other way around: Code: r = rookAttacks(oppositeRooksOrQueen, kingSquare); followed by Code: index = pinMagic[kingSquare]*(occupancy&r)>>52; switch(index) { // 4096 case labels, of only a few different kinds case DOUBL...
by grant
Wed Sep 03, 2008 7:20 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Automatic save of screen question
Replies: 4
Views: 1590

Re: Automatic save of screen question

Uri

There is a screen capture program called Screen Hunter.
http://wisdom-soft.com/sh/index.htm

Grant
by grant
Fri Jul 25, 2008 11:13 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Bitboard of Pinned Pieces
Replies: 24
Views: 10145

Re: Bitboard of Pinned Pieces

Hi Thanks for your comments. Taking a closer look at the table size, it would more likely be about 200Kb from my calculations. The lookup and magic multiplication for this table need only be done on the few occasions that there are pinned pieces, since pinners is only non-zero when it is pinning a p...
by grant
Thu Jul 24, 2008 12:41 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Bitboard of Pinned Pieces
Replies: 24
Views: 10145

Bitboard of Pinned Pieces

Hi Again I find myself coming up with an idea and not being at my computer to test it out, so apologies for this. I was reading through some posts about generating a bitboard of pinned pieces and found this post by Gerd rookWise = rookAttacks(occ, kiSq); potPinned = rookWise & ownPieces; xra...
by grant
Fri Jul 04, 2008 9:36 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to reduce the "bits" used in a magic number ca
Replies: 67
Views: 27584

Re: How to reduce the "bits" used in a magic numbe

Gerd For the rank, no magic numbers are required as the lookup table is already very small (512 bytes). U64 rankAttacks(U64 occ, enumSuare sq) { unsigned int file = sq & 7; unsigned int rkx8 = sq & 56; // rank * 8 occ = (occ >> rkx8) & 2*63; U64 attacks = arrFirstRankAttacks64x8...
by grant
Wed Jul 02, 2008 3:59 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to reduce the "bits" used in a magic number ca
Replies: 67
Views: 27584

Re: How to reduce the "bits" used in a magic numbe

Gerd

A MagicMix routine - I like it.

Thank you for taking the time to compare this with Kindergarten. I look forward to seeing your results.

Grant
by grant
Wed Jul 02, 2008 11:20 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to reduce the "bits" used in a magic number ca
Replies: 67
Views: 27584

Re: How to reduce the "bits" used in a magic numbe

Gerd This rook attack getter would only require 8 magic numbers and a table size of just 2.5K though it may be a fraction slower. rankAddress = (int)((Occupied >> (square & 56)) >> 1) & 0x3F; occ = (int)((Occupied >> (square & 7)) & 0x0001010101010100)...
by grant
Wed Jul 02, 2008 10:09 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to reduce the "bits" used in a magic number ca
Replies: 67
Views: 27584

Re: How to reduce the "bits" used in a magic numbe

Volker Congratulations on finding some very good magic numbers. Square 55 for rooks is certainly a tough one to find. I have been concentrating my efforts on square 54 where so far, 992 out of the 1024 occupancies fit into 9 bits, but the magic number still eludes me. I'm beginning to think that thi...
by grant
Thu Jun 19, 2008 8:37 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How to reduce the "bits" used in a magic number ca
Replies: 67
Views: 27584

Re: How to reduce the "bits" used in a magic numbe

Hi Here is a new set of magics for the rooks. The upper most 6 bits stores the shift making the table redundant. Remember that in my engine A8=0, B8=1 ... H1=63. 0 D0800280A0400072 12 bit 1 D440003000A00040 11 bit 2 D500082000304100 11 bit 3 D480080150001481 11 bit 4 D500070008001004 11 bit 5 D60008...