Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Finding mate in the quiesce search

Author: Álvaro Begué

Date: 08:35:35 08/24/04

Go up one level in this thread


On August 24, 2004 at 11:03:12, Alessandro Scotti wrote:

>On August 24, 2004 at 10:39:52, Tom Likens wrote:
>
>>On August 24, 2004 at 08:45:56, Alessandro Scotti wrote:
>>
>>>What value do you return when you find a mate in the quiesce search? I used to
>>>return a "mate" score but then I found this is not correct because many paths
>>>were not considered in quiesce, so sometimes I got a "mate in n" score at the
>>>root which wasn't really a forced mate. I've patched the bug by returning a
>>>fixed value for now, but... which value is best?
>>
>>If you generate all replies to check in your qsearch this becomes a
>>non-issue.
>
>I do generate all replies to check in quiesce, but I think that my problems are
>caused by examining only the "good capture" moves versus all moves, which would
>be required to return a mate score. In other words my quiesce tells me: "all the
>moves I examined lead to mate", but the moves it examines are only a subset of
>all possible moves.

The quiescence search will only return a mate score if the losing side is
checked in every step.

As someone has already pointed out, your quiescence search should look something
like:

int qs(int alpha, int beta){
  int score=-MATE_SCORE;

  if(!in_check)
    score=static_eval();

  if(in_check)
    generate_all_valid_moves();
  else
    generate_only_some_moves_that_are_likely_to_change_the_score_a_lot();

  for(int i=0;i<num_moves;++i){
    ...
  }
}





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.