Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PV array

Author: Nagendra Singh Tomar

Date: 03:20:31 10/10/02

Go up one level in this thread


No, not really.
I have got a single one-dim array that is part of the singleton ChessBoard
structure.
If a move at ply 'x' is found to be lying on the PV (score > alpha) then I
simply do "PV[x] = this_move" without caring to copy the remaining PV from the
deeper plies, because they would have already added it to the PV array at
appropriate place in the PV array. So by the time I reach ply 'x' after
returning from ply 'x+1' I am sure that the part of the PV starting from 'x+1'
is already in place. I just add this ply's contribution to the PV.
Doing this when i reach the root, all the moves in the PV will be stored in the
one dimensional PV array.

What do u say ?

tomar



On October 10, 2002 at 06:01:17, Daniel Clausen wrote:

>On October 10, 2002 at 05:49:41, Nagendra Singh Tomar wrote:
>
>>Can anybody tell me why, almost all the chess program codes that I have seen use
>>a bi-dimensional array for PV as in PV[256][256], even though only the first row
>>is what that is used. In using so every time we update the PV we have to copy
>>the PV[ply+1][*] to PV[ply][*]. In my engine I use a single dimensional array
>>and it works fine. Is there any other aspect to it that I am missing.
>>
>>regds
>>tomar
>
>But you most likely have a single dimensional array as a local variable in
>search  and therefore also have N of these arrays when you're N plies deep in
>the search tree. And you also have to copy the moves when updating the PV.
>Otherwise you either use a different search or just have a bug.
>
>I use the "single dimensional array as local variable in search", since it seems
>more intuitive to me. But that's just me.
>
>Sargon



This page took 0.01 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.