Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Principal Variation question

Author: Bas Hamstra

Date: 14:42:17 08/11/02

Go up one level in this thread


On August 10, 2002 at 13:14:51, Steffen Basting wrote:

>Hello!
>I've got 2 questions about principal variations:
>1.) How do I receive the principal variation in my alpha-beta algorithm?
>    (I read the "tutorial" on Bruce Morelands page but didn't understand it :-)
>    Are there more than 1 possibilities to handle that?
>2.) Why do programs sometimes show "shorter" principal variations compared to
>    depth? For example this output from an analysis with Little Goliath on the
>    position Eduard posted:

You keep track of the PV from "the tail" and gradually complete it to the first
move of the PV, which is added last. Suppose you have exactly one ply to search
in a 6 ply search (so you are near the leafs of the tree) and there you found a
move with score between alpha and beta. That's when you save this new best move
as the last move of the PV sequence. Now suppose you have 2 moves to search. Add
the bestmove you found plus + the "tail" from the previous step. So it builds up
until you found the bestmove at the "rootposition", which completes the PV.
Suppose you never search more than 50 ply, then you can use an
array PV[50][50] to save the tails in. Eventually the PV will land in PV[0][].

The main reason incomplete PV's is that you can have a score between alpha and
beta straight from the hashtable, in the middle of the tree. No clue about what
"tail" of bestmoves hangs under it. What you can do though, in such cases, is
reconstruct as much as you can from that tail from the hashtable. IE you found
that good hashmove and actually play it on the board, and see if you can find
another bestmove from the hashtable etc. Since hashtrees get overwritten, this
gives no guarantee for a complete PV.

Hope this helped a little bit!

Best regards,
Bas.














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.