Author: Dave Gomboc
Date: 11:33:59 02/11/00
Go up one level in this thread
On February 11, 2000 at 14:22:57, Andrew Dados wrote:
>On February 11, 2000 at 14:13:22, Dave Gomboc wrote:
>>
>>So using half-open ranges:
>>
>>piece_start = a;
>>piece_end = pawn_start = b;
>>pawn_end = c;
>>
>>now you can
>>
>>// just pieces
>>for (blah = piece_start; blah < piece_end; ++blah) { blah };
>>
>>// just pawns
>>for (blah = pawn_start; blah < pawn_end; ++blah) { blah };
>>
>>// all
>>for (blah = piece_start; blah < pawn_end; ++blah) { blah };
>
>note 'idle' loop part for at least blah=piece_start+8 to piece_start+16... for
>most positions there's way less then 16 pieces. That alone makes me think twice
>about unnecessary enlarging piecelist (and there are quite a few such a loops in
>capture generation, movegeneration, eval...).
>-Andrew-
>
>>
>>and to make this possible, when a capture (or promotion) occurs, some shuffling
>>is necessary.
>>
>>Dave
I don't understand your comment re: idling. In the initial position,
piece_start = 0, piece_end = pawn_start = 8, pawn_end = 16. In a king and 2
pawns vs king and 2 pawns endgame, piece_start = 0, piece_end = pawn_start = 1,
pawn_end = 3. This is why I mentioned that some shuffling is necessary.
The layout I described was the one I thought you were suggesting, so I guess I
misunderstood you.
Dave
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.