Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Qsearch problems...(about sorting and SEE)

Author: Bruce Moreland

Date: 10:18:52 11/26/00

Go up one level in this thread


On November 26, 2000 at 11:01:25, Severi Salminen wrote:

>Hi!
>
>Now my state-of-art-brand-new-super-extra-paradigm-chess-program (no, that's not
>the final name...) works and searches easily 5-7 plies deep on slow Celeron
>300MHZ(without the cache) at about 200-300 KNPS!! Man, I'm so excited! I have
>programmed only the basic things: PVS, Qsearch, standard nullmove. Now the
>problem is the qsearch: it explodes the tree. I have about 10x qnodes than
>"normal" nodes, which is too much. The reason is probably that the only sorting
>I do is LVA (least valuable aggressor) as my captures are generated starting
>from pawns. Would the MVV/LVA solve my problem? How does SEE work (any links)?
>Do i just take one capture from the move list and check out the outcome of
>capture series statically? And if the result is 0 (or should it be negative?) I
>just dump that move. Thanks for any advice!

There are at least three obvious ways to do it:

1) MVV/LVA.  You take the *value* (pawn=100, minor=300, etc.) of the taken
piece, and subtract the *index* (pawn=0, knight=1, bishop=2, rook=3, etc.) of
the attacking piece, and sort this from high to low, and just search them all.

2) SEE, pruning out losers.  You run a static exchange eval on all the captures,
and throw away those that appear to *lose* material.  Then you sort these from
high to low depending upon amount of material won (swaps are last).

3) Either of the above with some winning moves pruned out if they don't appear
to drive the score above alpha.  Meaning, that if your current eval is 200
points below alpha, and you are thinking about capturing a pawn, don't, because
even if you win it, the other side will stand pat and return, and you'll still
be 100 points below alpha.  Why try a move that you will fail low on instantly?

You can detect checks and do a full-width search in these cases if you wish.

SEE is hard to write.  You have to make sure to avoid bugs like calling PxP a
losing capture because after PxP in return, you can only play QxP, which would
be followed by NxQ.  PxP PxP is a swap, and you aren't forced to play QxP after
that.  You almost have to sort the piece list from low to high, and your program
might not allow you to do this easily.

The answer to most of your questions is:  Try it and see.  Maybe you will find
some way that works better.  Maybe something that works in my program won't work
in yours, and something else will work better.

Another thing you can experiment with is general philosophy.  Are you trying to
be perfect, like a sniper, or are you going for fire volume, like a machine
gunner?  It is not necessarily true that one is better than the other.  When
people start writing chess programs they assume that they can put extra work in,
be super-accurate with everything, and make the best program because of this.
This isn't necessarily true, sometimes a fairly bad answer arrived at in little
time is better than a perfect answer arrive at in a long time.

bruce

>
>Severi



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.