Author: Andrew Dados
Date: 11:04:16 02/11/00
Go up one level in this thread
On February 11, 2000 at 13:52:05, Tom Kerrigan wrote:
>On February 11, 2000 at 13:29:31, Andrew Dados wrote:
>
>>On February 11, 2000 at 13:23:28, Tom Kerrigan wrote:
>>
>>>Interesting...
>>>
>>>I didn't think much about condensing the lists.
>>>
>>>It seems like you can have 16 pieces if nothing gets captured and all your pawns
>>>promote. And you can have 8 pawns.
>>>
>>>So I was going to do my piece list like this:
>>>
>>>int piece_list[52];
>>>
>>>piece_list[0] is a 0-terminated list of white pieces.
>>>piece_list[17] is a 0-terminated list of white pawns.
>>>etc.
>>>
>>>Comments?
>>>
>>>-Tom
>>
>>Zero means no piece in my representation. You may need to fill board with
>>non-zero values for empty squares to allow 'holes' in piecelists due to
>>captures...
>
>Oh, I guess you also put piece color/type in the piece list?
Putting piece type in the list simplifies greatly e.g. qsearch:
for (i=1;i++;i<=last_pawn){if value[piece_list[i]->type] < gap_to_alpha then
skip it}
Also retrieving Rooks,Bishops, etc takes way less time and effort...
>
>I was thinking of just keeping the square # of the piece.
>
>As for holes in the piece list, I figured you could fill them up:
>
>if (piece capture) {
> piece_list[captured piece] = *last_piece;
> *last_piece = 0;
> --last_piece;
>}
That way your piecelist will not be preserved during search... while it does not
have to, it introduces changes into, say, order of generated moves. I am not
sure if I want that.
>
>-Tom
This page took 0 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.