Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: move lists

Author: Robert Hyatt

Date: 20:36:05 04/23/00

Go up one level in this thread


On April 23, 2000 at 19:35:06, John Coffey wrote:

>I assume that at least some programs generate a complete move list at every
>branch of the tree.  That is my intent at the moment.  (My 1987 program was
>kind of dumb in that it only cared about move order at the base of the tree, so
>it always generated moves on the fly above the base without keeping a list.)
>
>So I see myself having a big array of moves.  When I generate moves deeper than
>the base, I will add them to the array and keep track of where the beginning and
>end are for the current depth.
>
>Does anyone else do it this way?  Is this a valid approach?
>
>John Coffey


I've always done it this way.  My approach has a large array to hold the
moves, and a single array last[ply].  last[0]=0, and the moves for the current
ply always go from last[ply-1] to last[ply]-1.  IE if there are 20 ply=1 moves,
they are in moves[0]...moves[19], with last[1]=20.  if there are 30 ply=2 moves,
they are at moves[20]...moves[39] with last[2]=50.

simple and easy to use...  In cray blitz I had a last[n] and first[n] but later
realized that first[ply] is redundant.




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.