Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tracking the Principal Variation

Author: David Blackman

Date: 01:08:09 10/23/97

Go up one level in this thread


On October 22, 1997 at 20:50:34, Stuart Cracraft wrote:

>I've seen it described but it is usually incomprehensible.
>
>How do you track the principal variation? There is supposed
>to be a method using a triangular array. Any simpler methods?
>I don't understand the triangular array method either.
>
>Whatever is simplest, most easily understandable, and takes
>the least complicated code...

The simplest way is to put a "Best known move" at every node in the
transposition table. You probably want to do this anyway for move
ordering purposes. Then anytime you want to know the principle
variation, start at the root and walk through the transposition table
making the "best" moves until you get a transposition miss.

Advantage is, it's the simplest way. Disadvantage is you often get the
principle variation cut off fairly early by a transposition miss,
especially if you use a small transposition table, or very long thinking
time.

The triangular array method is to put the current move you are searching
at A[N][N] where N is the number of plies from root. If you decide that
the current position represents the best (or the first, or better than
any others tried so far) move from the previous position, then you copy
A[N][N], A[N][N+1], and so on over to A[N-1][N], A[N-1][N+1] and so on.
Eventually the current line will percolate over to A[0][N] which
represents the principle variation, but only if every move that got us
here is the best.

This is not too horrible, but it is probably a bit harder than the
transposition table method. Also it is not always better at storing the
whole principle variation because transposition table hits can cause you
to lose part of the PV.



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.