KPK

Discussion of chess software programming and technical issues.

Moderator: Ras

tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: KPK

Post by tpetzke »

Hi Martin,

in pawn less endgames I only store positions with the White King on A1-D1, B2-D2, C3-D3 and D4. Whenever I encounter a position in a game where the WK is not on one of those 10 squares I transform the board until he is.

Possible transformations are simple rotates by 90, 180 and 270 degree or flipping on the A1-H8 diag and then possible board rotates. (After having implemented rotated bitboards the mind becomes flexible enough for some more rotations)

In endgames with pawns I only have 1 transformation when the white king is on the E-H file. Here I mirror it back onto the A-D file.

Thomas...
mar
Posts: 2648
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: KPK

Post by mar »

tpetzke wrote:Hi Martin,

in pawn less endgames I only store positions with the White King on A1-D1, B2-D2, C3-D3 and D4. Whenever I encounter a position in a game where the WK is not on one of those 10 squares I transform the board until he is.

Possible transformations are simple rotates by 90, 180 and 270 degree or flipping on the A1-H8 diag and then possible board rotates. (After having implemented rotated bitboards the mind becomes flexible enough for some more rotations)

In endgames with pawns I only have 1 transformation when the white king is on the E-H file. Here I mirror it back onto the A-D file.

Thomas...
Hi Thomas,
nice tricks, thanks, although I'm not going to write EGTBs, it's always
nice to have at least an insight. Makes perfect sense.
Btw. you did rotated bitboards? I thought you use magics in iCE.

Martin
tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: KPK

Post by tpetzke »

In iCE I use magics but iCE is my 2nd engine already. In my first I implemented rotated bitboards (in Pascal) and this caused some real headaches but I got it working.

Thomas...
User avatar
Rebel
Posts: 7297
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: KPK

Post by Rebel »

Received some elegant Komodo KPK code which looks a lot better than my old 6502 approach when a table of 24Kb was a non option.

Thanks Don and HNY to everybody :!: