Page 2 of 2

Re: Fixed shift magics with 800KB lookup table

PostPosted: 23 Mar 2011, 01:04
by Teemu Pudas
Because the attack bitboards are incompatible: if a1=0, one is b1|a2|a3|a4 and the other is (rank1^b1)|b2.

Re: Fixed shift magics with 800KB lookup table

PostPosted: 23 Mar 2011, 07:45
by Gerd Isenberg
Teemu Pudas wrote:Because the attack bitboards are incompatible: if a1=0, one is b1|a2|a3|a4 and the other is (rank1^b1)|b2.


I see, you already added the sqIndecies, which I initially missed and only focused on the magic products/shifts.
Anyway, if I calculate your values I get different products as well as indices. What did I miss?
Code: Select all
0x000001000100001A * 0x00A801F7FBFEFFFF => 0x080C312F96E5FFE6
0x0000020000000200 * 0xFFB000810113FFFF => 0x8801000227FFFE00
0x080 + 5630 => 0x167E
0x880 + 3582 => 0x247C

Re: Fixed shift magics with 800KB lookup table

PostPosted: 23 Mar 2011, 08:15
by Teemu Pudas
Gerd Isenberg wrote:0x080 + 5630 => 0x167E
0x880 + 3582 => 0x247C


0x247C - 3582 == 0x167E, not 0x880.

Re: Fixed shift magics with 800KB lookup table

PostPosted: 23 Mar 2011, 08:27
by Gerd Isenberg
Teemu Pudas wrote:
Gerd Isenberg wrote:0x080 + 5630 => 0x167E
0x880 + 3582 => 0x247C


0x247C - 3582 == 0x167E, not 0x880.

oups, you are right, i mixed up some values. Too early in the morning.
Code: Select all
0x080 + 5630 => 0x167E
0x880 + 3582 => 0x167E

Re: Fixed shift magics with 800KB lookup table

PostPosted: 24 May 2011, 20:04
by Gerd Isenberg
Teemu Pudas wrote:Because the attack bitboards are incompatible: if a1=0, one is b1|a2|a3|a4 and the other is (rank1^b1)|b2.


Solved!
Grant still uses variable shifts but no fixed as the title suggests :evil:

http://www.talkchess.com/forum/viewtopi ... 05&t=39123

Gerd

Re: Fixed shift magics with 800KB lookup table

PostPosted: 06 May 2016, 03:40
by rkalyankumar
How to generate the magic factor & the (overlapping) index?

Thanks,
Kalyan