Author: José Carlos
Date: 09:58:56 10/26/02
Go up one level in this thread
On October 26, 2002 at 12:43:02, Antonio Dieguez wrote: >On October 26, 2002 at 12:27:46, José Carlos wrote: > >>On October 26, 2002 at 12:07:16, Antonio Dieguez wrote: >> >>>>>score = -alphabeta(board, -alpha-1, -alpha, depth-1); >>>>> >>>>>if(score > alpha && score < beta) >>>> ^^^^^^^^^^^^^^^ >>>> >>>> Don't use beta there. You just want to know you're above the pv score (which >>>>is alpha now). >>> >>>if I am not mistaken it depends on the exact writing. >>> >>>he can write >>> >>>make... >>>score = -alphabeta(board, -alpha-1, -alpha, depth-1); >>>if(score > alpha && score < beta) >>>{ >>> unmake & make(depends on the program) >>> score = -alphabeta(board, -beta, -alpha+1, depth-1); >>>} >>> >>>unmake >>> >>>if (score>alpha) >>>{ >>> blabla >>> if (score>=beta) >>> { update killer; update hash; etc. } >>>} >>> >>>------------------- >>>or he can write something like this? >>> >>>make >>>score = -alphabeta(board, -alpha-1, -alpha, depth-1); >>>if(score > alpha) >>>{ >>> if (score>=beta) >>> { unmake; update killer; update hash; return beta; } >>> unmake & make(depends on the program) >>> score = -alphabeta(board, -beta, -alpha+1, depth-1); >>> unmake >>> if (score>alpha) // 'cause it could fail low right? >>> { >>> if (score>=beta) >>> { update killer; update hash; return beta; } >>> etc. >>> } >>>} >>> >>>I have written the first option, I think I can't make it prettier with the >>>second option or something else but may be you can write it better off corse. >>> >>>Ah if the search always return alpha or beta then that can change things. >>> >>> >>>antonio's usefull post. > > >> I don't quite follow. He's talking about the null window searches after the >>pv. He's searching [alpha,alpha+1] so he might fail high with alpha+1 or >>alpha+500, and beta isn't useful here at all. All you know if you fail high is >>"I've found a move that seems to be better than my current pv". > >I don't quite follow you... Ok, I'll try to make myself clear :) We're at the root. We search Nf3 (pv move) with alpha = 0, beta = 50 The search returns: score = 25 Now alpha = 25; We try Nc3 with [alpha,alpha + 1] [25,26] The search returns: score = 49 In the code you posted, as score (aux) is between alpha and beta, you now research with a window [48,50] which most probably will fail high again, so you waste time. It's more logical to simple open the window with something like [score,score+50] or [score,+INFINITY] without caring what beta is. >I think that is what we call fail-hard or fail-soft >alphabeta right? we can return a score greater than beta whenever the >real score if at least this score, and something like that with alpha if >we don't force the score to be at least alpha. > >so one could even write > >make >aux = -alphabeta(board, -alpha-1, -alpha, depth-1); >if(aux > alpha && aux < beta) >{ > unmake & make(depends on the program) > aux = -alphabeta(board, -beta, -aux+1, depth-1); >} > >if (aux>alpha) >{ > if (aux>=beta) > {....return aux } > alpha=aux >... >} Ok, now I see the problem. You missed we're talking _at the root_. José C. >etc. > >antonio's usefull post.
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.