Fixed shift magics with 800KB lookup table

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Re: Fixed shift magics with 800KB lookup table

Postby Teemu Pudas » 23 Mar 2011, 01:04

Because the attack bitboards are incompatible: if a1=0, one is b1|a2|a3|a4 and the other is (rank1^b1)|b2.
Teemu Pudas
 
Posts: 124
Joined: 16 Apr 2007, 14:03

Re: Fixed shift magics with 800KB lookup table

Postby Gerd Isenberg » 23 Mar 2011, 07:45

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
Gerd Isenberg
 
Posts: 285
Joined: 31 Jan 2005, 20:31
Location: Hattingen, Germany

Re: Fixed shift magics with 800KB lookup table

Postby Teemu Pudas » 23 Mar 2011, 08:15

Gerd Isenberg wrote:0x080 + 5630 => 0x167E
0x880 + 3582 => 0x247C


0x247C - 3582 == 0x167E, not 0x880.
Teemu Pudas
 
Posts: 124
Joined: 16 Apr 2007, 14:03

Re: Fixed shift magics with 800KB lookup table

Postby Gerd Isenberg » 23 Mar 2011, 08:27

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
Gerd Isenberg
 
Posts: 285
Joined: 31 Jan 2005, 20:31
Location: Hattingen, Germany

Re: Fixed shift magics with 800KB lookup table

Postby Gerd Isenberg » 24 May 2011, 20:04

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
Gerd Isenberg
 
Posts: 285
Joined: 31 Jan 2005, 20:31
Location: Hattingen, Germany

Re: Fixed shift magics with 800KB lookup table

Postby rkalyankumar » 06 May 2016, 03:40

How to generate the magic factor & the (overlapping) index?

Thanks,
Kalyan
rkalyankumar
 
Posts: 1
Joined: 18 Dec 2014, 09:42

Previous

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 28 guests