Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about quiescence search

Author: Antonio Dieguez

Date: 10:06:57 10/20/02

Go up one level in this thread


As one can see if there is a queen attacked the score will be ~9 pawns below
eval if for example there are no captures, unless one add the excuse of
"tactical moves" and say saving the queen is a tactical move then or a barbarie
like that.
If you are referencing it then you are supporting it somehow? is it correctly
written here? let state clear that as presented here is very imprecise, or very
wrong. In any case replace a good qsearch with this obviusly won't do an engine
any stronger, so may be it has only a didactic meaning.


>no. in my previous post I saved time by referencing Don Beals work with
>null-move in the qsearch. To be clear, here is his algorithm out of my mind:
>
>int qsearch(int lower, int upper)
>{
>    // we are pessimistic: our best score is the enemy threat
>    make(null-move);
>    best= -captsearch(-upper, -lower);
>    unmake(null-move);
>
>    // no need to score better than the upper bound:
>    if (best>=upper)
>        return best;
>
>    // improve our best score by searching moves:
>    for each tactical move m do {
>       make(m);
>       value= -qsearch(-upper, -best);
>       unmake(m);
>       if (value>best) {
>           if (value>=upper)
>               return value;
>
>           best= value;
>       };
>    };
>
>    return best;
>}
>
>with
>
>int captsearch(int lower, int upper)
>{
>    // we are optimistic: our best score is the static score (no enemy threat)
>    best= staticEval();
>
>    // no need to score better than the upper bound:
>    if (best>=upper)
>        return best;
>
>    // improve our best score by searching moves:
>    for each capture m do {
>       make(m);
>       value= -captsearch(-upper, -best);
>       unmake(m);
>       if (value>best) {
>           if (value>=upper)
>               return value;
>
>           best= value;
>       }
>    };
>
>    return best;
>}
>
>Explanation:
>- qsearch searches tactical moves. these are not just captures, but also threats
>to other pieces like knight attacks rook or checks. if all of them are searched
>or not is up to the programmer.
>
>- in qsearch() and captsearch() a move is searched with the window (best, upper)
>and not with (lower, upper)! this means, we are considering the enemy threat in
>the search, until there is no one (in the sense that it doesn't hurt us enough:
>score of enemy threat >= upper).
>
>- captsearch is a pure capture search. only captures are searched. same here: if
>all of them are searched or not is up to the programmer.
>
>- just if you didn't know it: make(null-move) is aquivalent to change side to
>move. the inverse is then also clear.
>
>- I didn't add the code to avoid making a null-move when in check to simplify
>the algorithm. in the end we have something like the following in qsearch.
>
>   if (inCheck)
>       best= -MATE+ply;
>   else {
>       make(null-move);
>       best= -captsearch(-upper, -lower);
>       unmake(null-move);
>
>       if (best>=upper)
>          return best;
>   }
>
>
>So, pessimistic means: set our initial best score to the score of the null-move,
>which is the enemy threat.
>
>If you didn't know null-move I suggest you read about this topic. Here is a good
>link: http://www.seanet.com/~brucemo/topics/topics.htm
>
>
>Alessandro



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.