Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Help with Static Exchange Evaluator

Author: Andrew Williams

Date: 15:00:01 07/18/99

Go up one level in this thread


On July 18, 1999 at 17:27:12, William Bryant wrote:

>I have created a SEE routine for my program (following the general plan of
>Swap()
>from Crafty) and now have a question about where it should be implemented.
>
>I initially implemented it in the move generator.  When generating captures, if
>the Captured_Piece - Capturing_Piece <0, I would uses a SEE score of < 0 to
>discard the move, never searching it.
>

You can't do this. What if your only way out of check is a losing capture?
The way I use SEE in my move generation is to help me in ordering moves. In
other words, if the SEE for a particular capture is >= 0, I add this to
a large constant, so that when I sort the moves before searching them, this
one is considered early on. If the SEE score is negative, I don't add the
large constant. This means that my sorting gives me winning captures then
non-captures then losing captures. But I don't discard anything at move
generation time.

Note that most people don't use SEE in move generation at all. They just
use a trick called MVV/LVA (Most Valuable Victim/Least Valuable Attacker), which
means take the value of the attacker away from the value of the victim to
discover the significance of the capture. When I used this, I used my normal
material  values for the victim (100, 330, 330, 500, 900 etc), but the values:
1, 3, 3, 5, 9 for the attacker. You then add the result of the subtraction to a
large constant (whose purpose, as above, is to ensure that captures will be
considered before other moves when you come to search).


>This created an overall speed up but leaves a number of questions.
>
>Some positions require a sacrifice to find the winning line.  These positions
>are never found because the sacrifice move is always discarded and never
>searched.
>
>Is this the tradeoff of this heuristic?
>
>Is there a better way to apply the SEE rather than to all capture moves as they
>are generated?
>

I do the discarding trick you suggest, but only in the qsearch. If there's a
line that needs such a capture to be found, I rely on reaching sufficient depth
in the main search to find it.

>Are there other heuristics that allow these discarded moves to be found in the
>right positions?
>
>Here is an example position:
>1rr3k1/4ppb1/2q1bnp1/1p2B1Q1/6P1/2p2P2/2P1B2R/2K4R w - -
>It is from a list of mating positions posted by Dan
>
>I can find the winning mate in 0:32 without the SEE,
>and never with the SEE.
>
>Thanks in advance.
>
>William
>wbryant@ix.netcom.com


Hope this is helpful.

Andrew Williams



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.