Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Thoughts about board representations...

Author: Andrew Dados

Date: 11:44:16 02/11/00

Go up one level in this thread


On February 11, 2000 at 14:33:59, Dave Gomboc wrote:

>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

It looks like I misunderstand your post and connected it to last Toms post in
that thread - his proposed list range is : pieces 0..16 then Pawns 17-whatever
etc..
I just don't see reason to rigorously separate Pawns and Pieces at the cost of
enlarging list he proposed. So we both seem to agree on making loop ranges small
for overall speedup (and some extra effort in make/unmake, which is negligible
for overall performance anyway).



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.