Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Static Mate Detection

Author: Ulrich Tuerke

Date: 05:13:43 01/23/02

Go up one level in this thread


On January 22, 2002 at 22:21:57, Brian Richardson wrote:

>I think most programs detect mate as part of searching for a legal moves (not
>left in check).  Naturally, if there are none, then it is mate (if in check to
>begin with), or stalemate otherwise.  Some progams are more sophisticated and
>have different routines to generate "all" moves when not in check, or only check
>evasions when in check, but either way mates are found in the search routine,
>not in the evaluation function.  Of course, if it is relatively "cheap" for you
>to do as part of your evaluation function king safety anyway, why not experiment
>a little?

A stupid question, Gerd.
Are you sure that it's worthwhile to code all this stuff ? It seems to me that
it's quite some considerably large piece of code with a good chance to introduce
errors. I assume that it will also cost a bit performance ?

I prefer detection of mate by the search. I try using some tricks to also detect
mate a bit earlier (if I'm lucky). So, my eval sets some flag at the last ply of
the full search, in case king safety of either king is in danger. In this case,
I generate checking moves at the 1st quiescence plies, and check for check
evasion in the quies search.

Of course, this isn't perfect, but easier to code (at least I guess so). And I
think, it helps a bit.

Regards,
Uli



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.