Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: See'ing makes my program blind ?

Author: Tord Romstad

Date: 07:34:39 10/19/04

Go up one level in this thread


On October 19, 2004 at 04:15:19, martin fierz wrote:

>On October 18, 2004 at 22:10:48, Zach Wegner wrote:
>
>>Going back into the main search is the cheap way out, IMO.
>
>i disagree. going back into the main search is the right way out IMO. let's say
>you duplicate your code in the qsearch for the case you're in check as you
>suggest. then you change something in the way you handle in-checks. => you have
>to change it in two places. a very bad idea...

I agree with Zach here.  There is really not a lot of code that needs to be
duplicated in the qsearch anyway.  In both of my engines, the only special
code for handling situations where the side to move is in check in the
qsearch is that all legal moves are generated (rather than just captures,
promotions and checks), and that returning a stand pat score is not allowed.

>the speed gain you get for your version is probably tiny - i admit that it will
>be faster.

The speed gain could be quite big (at least in some positions) for engines
which extend single replies to checks.  If you call the main search from the
qsearch when the side to move is in check, there is a risk that there is
only a single legal move, and that this move will be extended.  This means
that you will stay in the main search for yet another ply, and search
all moves rather than just captures for one more ply _after_ the check
evasion.  This can be quite expensive.  It will probably help you find
some tactics more quickly, but I doubt that it is worth the cost.

Of course it would be possible to work around this problem, but then it
might no longer be simpler to call the main search rather than handling
checks correctly in the qsearch.

>but ease of implementation is much more important than a % or two in
>speed, IMO. most amateur programs are weak because they have bugs, not because
>they are slow.

Here I agree, as you know.  As long as you don't have any serious bugs, you
can afford to be slow, have very little chess knowledge, and still beat most
of the amateur engines.

Tord



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.