Author: Ulrich Tuerke
Date: 00:56:48 10/28/99
Go up one level in this thread
On October 27, 1999 at 12:20:57, Bruce Moreland wrote: >On October 27, 1999 at 07:59:12, Ulrich Tuerke wrote: > >> >>>... >>>There are some other bugs: >>> >>>1) You have "if (score > beta)" and it should be "if (score >= beta)". This is >>>a serious bug. You have to very carefully check stuff like that. >> >>This is not necessarily a bug. This could just be another (admittedly >>non-standard ) convention, considering the boundary points still as parts of the >>interval. A consistent treatment in the whole program of this will also work >>correctly. >>However, I would also strongly suggest to adapt to the standard convention. >>Comparisons with literature or other source code will be much easier. > >It won't work, will it? > >Your search has the line: > > score = -search(-beta, -alpha); > >"search" is: > > int search(int alpha, int beta) > >In the search you try to get a score above alpha. If you don't, you do: > > return alpha; > >Since alpha used to be -beta, you returned -beta, which was negatized again, and >now you've got beta as your score. So when you do this line: > > if (score >= beta) > return beta; > >You will cut off. But if the line is: > > if (score > beta) > return beta; > >You won't return, because the score will be equal to beta. > >bruce I think that I see your point. You must modify your scheme carefully: Using "fail-soft" (best = - infinite) will not have this problem anyway (if I got it correctly). However, when using "fail hard" as in your example, you have to init your best value correspondingly: best = alpha -1 (instead of best = alpha) You have to make sure that the init value is outside the aspiration window. Then, everything should work again. (At least I think so ?) Care nust also be taken when accessing the transposition table, to handle bounds correctly. Intuitively, both conventions should be 100% equivalent. But, I don't trust my intuition too much. Uli BTW, I think that there is a problem of this kind in the GNUchess 3.x and 4.x sources.
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.