Re: How do you copy an array?



Dan Bensen wrote:
Kim Minh Kaplan wrote:
First, the *child* node does not need the previous moves to do its job,

I don't understand. The effect of a move depends on the parent grid
just before that move, not the original grid several plies earlier. And
the score is determined from the entire child grid after adding the
latest move, isn't it? How can you compute the score without knowing
the entire, completely updated grid? How do you pass the current state
of the game to deeper plies without creating new grids?

;; pseudocode
(loop for x in (available-moves grid)
do (progn
(setf (aref grid x) player-token)
(do-alpha-beta grid (1+ ply) (next-player player-token))
(setf (aref grid x) #\Space)))

--
Geoff

.