Author: Robert Hyatt
Date: 18:25:18 11/05/98
Go up one level in this thread
On November 05, 1998 at 14:21:39, Will Singleton wrote: >All, > >My program Amateur has been in development for more than a year, and does pretty >well on the servers. But it's an outgrowth of an old approach to chess >programming, and needs a modern search algorithm. In my old method, I manually >negate alternate ply scores, using a single bound for cutoffs, and therefore >must distinguish between shallow and deep cutoffs. This causes all kinds of >complications and inefficiencies. Don't ask me why I stuck with this old >method; something to do with being stubborn and wanting to do it "my way." > >So now I've implemented a standard alpha-beta negamax search, and am in the >process of reworking the rest of the code to work with this search. And it's >running now in a basic mode, with most extensions, nullmove, and hashing >disabled. > >Now for the odd question: it seems I still have to negate the value from eval() >on odd plys to get the thing to work! Here's a *very simplified* bit of code to >explain the problem: > > >int ab (alpha, beta) > >if (depth==0) return (eval()); >score = -9999; >gen_moves(); >for all moves > value = -ab(-beta,-max(alpha,score)); > if (value > score) score = value; >end for >return score; > >Now assume you are doing a 1 ply search, and the eval score is 100. Since the >score is negated upon return, value == -100. But that's obviously not correct, >since the smallest value will be selected, not the largest. But it works if >eval() negates the score on odd plies before return. > >I know I'm missing something simple, but what is it? > >Will first, I assume your eval produces scores where + = good for white to move? Assuming that is true, at the bottom of eval, where you would normally return(score); replace that by return(wtm?score:-score); and your problems go away... You have to do this with *everything*. IE if you use some sort of non-zero draw score, you have to fudge these scores there as well...
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.