Author: Vasik Rajlich
Date: 09:38:09 06/19/05
Go up one level in this thread
On June 19, 2005 at 11:25:24, rasjid chan wrote: >On June 19, 2005 at 05:54:02, Vasik Rajlich wrote: > >>On June 19, 2005 at 03:06:35, rasjid chan wrote: >> >>>Vasik, >>> >>>How do you resolve this simplest of case:- >>>We have:- >>>1) absearch has a rep3 that FH with 0 > beta; >>>2) Assume for the node below, all other moves also fail low. >>> >>>Now at the node after returning from rep3():- >>>Consider code-block A. >>> >>> int absearch(int alpha, int beta){ >>> int best, alpha0 = alpha; >>> >>> score = -absearch(); >>> //score== 0 from rep3 >>> >>> if (score>alpha){ >>> alpha = score; >>> ... >>> }else if (alpha == alpha0){ >>>/*code-block A*/ >>> >>> //if we DO NOT pass down return_type, we do this:- >>> if (score>best) >>> best = score; >>> } >>> >>> If all other moves also fail low with score below 0, then >>> best = 0; we finally return best(0) which is an error. >>> >>> //if we PASS DOWN return_type, we do this:- >>> if (return_type == REP3) >>> best = alpha; >>> } >> >>I don't understand the purpose of these four lines. If you just remove them, >>you'll get the behavior you want. >> >>> If all other moves also fail low with score < alpha , then >>> best = alpha; we finally return best(alpha) which is CORRECT. >>> >> >>If you had removed those four lines above, then you would be returning best, >>which is 0 - which is the correct fail-soft value. > > My mistake here. 0 is the correct fail-soft value for "this" current > path-dependent search. When this node is hashed, path-dependency enters > into HT and if there is a need to avoid HT corruption, we have to be informed > and passing down REP3 may be a way. > Aha. That's true - I have to think about this. I just ignore this in Rybka, but I guess I could run into some problems. For example: [D] r5k1/5p1p/5p1Q/5N2/8/7P/5PPK/8 w - - 0 1 Let's say we're searching here, and the first move we try is 1. Kg1. Black then plays 1. .. Ra1+ 2. Kh2 Ra8, at which point my search returns 0.00. The position after 1. Kg1 then gets a 0.00 in the HT. If we later reach this position in another way, we'll just read the draw score from the HT. It should be _extremely_ rare but thanks for the idea, I'll think about it .. > >> >>> This is similar to the cases of forward-prunning, lazy evaluation, etc >>> when we CANNOT fail low and soft at the same time. >>> } >>> >> >>It's not that you can't fail soft, it's that your fail-soft value won't be as >>soft as you would like. > > I apologize I can never understand how to analyse the way search() intereacts > with set board positions. But I understand now, also from dieter's reply, > that fail-soft value need not be strictly correct UB / LB; ie some > risk may be taken. > I don't think Dieter is saying this. An UB should always be an UB - if you have to make a mistake, you set it too high. This happens for example with lazy eval, or using a margin for pruning in q-search. Vas > >> >>Let's do another crazy position :) >> >>[D] rnb1kbnr/p1p2p1p/3p4/4p3/1pP1P1p1/2N2N2/PP1P1PPP/R1BQKB1R w KQkq - 0 1 >> >>Here, white is up a queen. Let's say that our alpha-beta window is 0.00. A very >>likely continuation of the search will be 1. (null) bxc3 2. (null) gxf3 3. null >>and white fails high with a score of around +3 (queen vs two pieces). >> >>You're still failing soft here - just not as aggressively as you would like. >> >>Vas >> >>> >>> return .... >>> } >>> >>> >>> Have I mixed up darkness with the light. >>> >>> Best Regards >>> Rasjid
This page took 0.01 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.