Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PV array

Author: Dieter Buerssner

Date: 03:40:50 10/10/02

Go up one level in this thread


On October 10, 2002 at 06:20:31, Nagendra Singh Tomar wrote:

>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 ?

If I understand you correctly, this should give wrong PVs, which may even
include illegal moves.

Assume a 2 ply search from the start position. You start with e4 (which shall
"win" here). The PV shall be e4 e5. As the second move you try d4, which will
not give a better score. But after d4 you search for a best move for the
opponent. Now this best move will overwrite the e5 in the above PV. That you
don't update the first ply in the PV does not matter - the tail will be
destroyed. Having a local copy in the search, or a two dimensional array will
get rid of this problem.

Regards,
Dieter




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.