Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How big should move list be?

Author: Daniel Clausen

Date: 05:28:35 03/18/02

Go up one level in this thread


Hi

On March 18, 2002 at 08:06:23, Uri Blass wrote:

>On March 18, 2002 at 07:34:19, Andreas Stabel wrote:
>
>>On March 18, 2002 at 07:01:49, Travers Waker wrote:
>>
>>>Hi all programmers.
>>>
>>>I've been wondering:  How big do people make their move list (i.e. the list of
>>>legal/pseudo-legal moves in a particular position)?  I assume that most people
>>>don't want to use a dynamic list (e.g. linked list), because it's slow, but if
>>>you allocate an array as your list, what length do you make it?  It's easy for
>>>captures, since their can only be 16 possible captures (if you allow capturing
>>>the king), but non-captures are not so easy, I think.  If you take a guess about
>>>what the greatest number of possible non-captures is in any legal chess
>>>position, how do you know your program won't crash in certain unusual positions?
>>>
>>>Looking forward to hearing your ideas.
>>>
>>>Travers
>>
>>The maximum number of moves anybody has managed in a constructed position is
>>216 moves I think. In real games I have never seen more than 92 !
>>Even after scanning approx. 1.5 million games.
>>
>>Best regards
>>Andreas Stabel
>
>I remember that it is 218
>
>Uri

And prolly slightly bigger for move generators generating only pseudo-legal
moves.

Of course you could simply give the move-generator a pointer to a place in a
huge array of potential moves and the move generator returns either the number
of moves it created or the new pointer. (which is the aequivalent (sp?)
information) Since you use the number of moves anyway, it sounds like a very
good solution to me. And you use the space of the array much better, which is
not really a memoryspace-issue but a performance issue (data which is closer to
each other is more likely in cache etc)

Sargon



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.