Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: principal variation search question

Author: Pat King

Date: 17:37:16 01/28/00

Go up one level in this thread


On January 28, 2000 at 17:51:45, Tim wrote:

>I know what principal variation search is.
>But I don't understand returned value when window size so small.
>This is principal variation search algorithm.
>
>		if (Firstmove) {
>			value=-Search(-beta,-alpha);
>			Firstmove=0;
>		}
>		else {
>			value=-Search(-alpha-1,-alpha);
>			if ((value > alpha) && (value < beta))
>				value=-Search(-beta,-alpha);
>		}
>
>Above code says:
>If it is not the first move, search with window size 1.
>if value <= alpha or value >= beta, we don't have to search again.
>if value > alpha and value < beta, search again with normal window size.
>
>But how can we sure value is always correct when value <= alpha or value >=
>beta?
>And how can we sure value is always incorrect when value > alpha and value <
>beta?
>
>Thank you in advance.
Above code says,
Evaluate first move, which we are pretty sure is correct because we got it from
the hash table or a PV structure or something.
VERIFY assumption that first move was correct by evaluating other moves with
very narrow window.
If assumption proves wrong, then we have a new best move, which we evaluate with
a wider window to get a correct score.

The hope is that the extra searches conducted when we find "surprise" moves are
offset by the more common narrow searches, which we expect to fail low.



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.