Author: Andrew Dados
Date: 10:13:08 02/11/00
Go up one level in this thread
On February 11, 2000 at 07:02:52, Andrew Williams wrote:
>On February 11, 2000 at 04:18:08, Tom Kerrigan wrote:
>
>>On February 10, 2000 at 20:25:51, Andrew Dados wrote:
>>
>>> I define a structure:
>>>{
>>>piece: piecetype;
>>>color: colortype;
>>>index: byte (index into piece list);
>>>dummy: byte
>>>}
>>
>>Keeping the piece list index with the color and type is a really good idea. I
>>hadn't thought of that.
>>
>>How do you do your piece lists? I was thinking something along the lines of:
>>
>>int piece_list[n];
>>int *first_piece[2];
>>int *first_pawn[2];
>>int *last_piece[2];
>>int *last_pawn[2];
>>
>>So there are actually 4 lists in the piece_list array. I was also thinking about
>>making the lists 0-terminated. That way you don't have to know where the list
>>ends to step through it.
>>
>>-Tom
>
>
>In my piecelist array, W Pawns are always 0-7, W Pieces are 8-15 (K always 15).
>B Pawns are 16-23, B Pieces are 24-31 (K always 31). I don't condense my lists
>when pieces come off and when Pawns promote the Queen record simply replaces
>the appropriate Pawn record. I don't condense because that would screw up my
>attack boards, but I have considered condensing at the start of every search,
>because then I can change all the attack records and the board records and
>not do it too often. I wonder how much of a speed advantage a condensed
>piecelist is? Anyone got any experience of condensed vs uncondensed?
>
>If I was going to do this, I'd just force a gap in the middle. Pawns would
>always start at the front, pieces would always start at the back. There'd be
>a gap in between and you could put your promoted pieces (or pawns when you
>unmake a promotion) there.
>
>
>Andrew
I tried condensing piecelist at start of search, but I didn't gain much there
(some 1-2% if I remember correctly, then it was a year or two ago, so I may try
it again. I abandoned it because it broke my pondering somehow and was too lazy
to debug it fully :). One ages old trick is to keep tracking on LastPawn and
LastOfficer and don't bother with re-sorting list when promotion occures, just
adjust those indexes. Another trick is make/unmake move: always switching Origin
square content with Target square content (when capturing a piece just clear
'piece' in square structure, don't touch index nor color). That upon unmaking a
capture will preserve you original piece index to update piecelist...
-Andrew-
P.S. Not only do we have same names, but also exact same board structures ?!?
Rats.. :)
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.