Search found 433 matches

by Aleks Peshkov
Mon Sep 03, 2007 5:08 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How do I test the quality of the Zobrist keys?
Replies: 41
Views: 17630

Re: How do I test the quality of the Zobrist keys?

The simplest solution here is to take code from other programs that work.You can check that you calculate perft with no error with hash to see if you have a problem and after finding no problems forget about it. Bad keys may have very few full 64-bit hash-key collisions, but collisions inside 20..2...
by Aleks Peshkov
Mon Sep 03, 2007 4:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How do I test the quality of the Zobrist keys?
Replies: 41
Views: 17630

Re: How do I test the quality of the Zobrist keys?

OTOH if the randoms for 3 different squares could XOR to zero, (say Qe4, Ba6 and Ng2) you would have lots of collissions between positions differing only in the occupation of those three squares. Hamming Distance have transitive property of conditional probability. If Qe4 is 24 bit distant from Ba6...
by Aleks Peshkov
Mon Sep 03, 2007 3:35 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How do I test the quality of the Zobrist keys?
Replies: 41
Views: 17630

Re: How do I test the quality of the Zobrist keys?

The only problem value is 0. If your zobrist numbers have a good Hamming Distance against 0, the above problem is gone. This is because 0 is the most common implicit member of any chess-position hash (all empty squares are encoded with implicit 0). Nonsense. You would have the same problem with 0xA...
by Aleks Peshkov
Mon Sep 03, 2007 2:50 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How do I test the quality of the Zobrist keys?
Replies: 41
Views: 17630

Re: How do I test the quality of the Zobrist keys?

Hamming distance is not everything. Using the following (not so random numbers) have a great hamming distance, but a lousy value as zobrist key: 0xffffffffffffffff 0x0000000000000000 0xffffffff00000000 0x00000000ffffffff The only problem value is 0. If your zobrist numbers have a good Hamming Dista...
by Aleks Peshkov
Mon Sep 03, 2007 1:24 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: How do I test the quality of the Zobrist keys?
Replies: 41
Views: 17630

Re: How do I test the quality of the Zobrist keys?

http://en.wikipedia.org/wiki/Hamming_distance Your should maximize the worst popcount(Zobkey ^ Zobkey[j]) values. So, you need to generate a random value and test its Hamming Distance against all previous zobrist values. If the Distance is too small you drop this random number and try next. In one ...
by Aleks Peshkov
Thu Aug 30, 2007 7:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Move ordering
Replies: 22
Views: 9651

Re: Move ordering

Gerd Isenberg wrote:I don't use other movelists any longer in this fillbased and setwise approach, except for the root.
What is special with rooks?
by Aleks Peshkov
Tue Aug 28, 2007 9:31 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: hyperbola-quintessence
Replies: 12
Views: 6181

Re: hyperbola-quintessence

The reason a lot of people use A8-0 is that it maps transparently to FEN and EPD (where the first square is A8). A1=0 is also quite natural, if you imagine playing as white. A8 = 0 is more natural to represent a board as C-array of constants. enum square_t { A8, B8, C8, D8, E8, F8, G8, H8, A7,...
by Aleks Peshkov
Tue Aug 28, 2007 2:10 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: hyperbola-quintessence
Replies: 12
Views: 6181

Re: hyperbola-quintessence

To make more clear: suggested "hyperbola-quintessence" approach is direct computation of only 6 from 8 sliding rays. It needs 3 arrays of 64 bitboards with masks for vertical, and both diagonals attacks from any square (excluding starting attacker's square). Missing horizontal-attacks need a help fo...
by Aleks Peshkov
Sun Aug 26, 2007 6:51 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Free Visual Studio vs GCC on Windows
Replies: 3
Views: 2243

Re: Free Visual Studio vs GCC on Windows

Use both! I personally code and compile inside Eclipse (using MinGW tools). 1) Eclipse IDE have very handy SVN integration. 2) Visual Studio Express have much better debugger (but slower). GCC have free profiler and profile-guided optimization, I use them until found some free alternative for Micros...
by Aleks Peshkov
Sat Aug 25, 2007 10:14 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: BitBoard Tests Magic v Non-Rotated 32 Bits v 64 Bits
Replies: 36
Views: 24077

Re: BitBoard Tests Magic v Non-Rotated 32 Bits v 64 Bits

The fascinating thing is the number of possible approaches to get sliding attacks. It is still a nice cycle hunting challenge and contest for some of us ;-) I am very happy with forgotten Gerd's "bswap" approach: struct M { BitBoard singleton; //optional well-known "bitmask" (1 << sq) ...