Author: Antonio Dieguez
Date: 21:51:15 02/09/03
Go up one level in this thread
hi
> I have more tests to do, but this seems to work.
> I began to wonder how close the first and second search values are in pvs.
> I ran some tests and the seem relatively close. So, I adjusted the algorithm.
>
> Normal algorithm:
> v = -Search(-alpha-1,-alpha); // first value
> if ((v>alpha) && (v<beta))
> v = -Search(-alpha,-beta) // second value
you mean (-beta,-alpha)
> Adjusted algorithm:
> v = -Search(-alpha-1,-alpha);
> if ((v>alpha) && (v<beta))
> {
> int nalpha, nbeta;
> nalpha = v - (pawnvalue>>3);
> nbeta = v + (pawnvalue>>3);
perhaps you mean
nalpha = max (alpha, v - (pawnvalue>>3));
nbeta = min (beta , v + (pawnvalue>>3));
> v = -Search(-nbeta,-nalpha);
>
> if ((v<nalpha) || (v>nbeta))
> v = -Search(-beta, -alpha);
> }
I know, we may know what you mean anyway, but I would like when posting in the
forum, why not use alpha,beta and such in the windows instead of -beta,-alpha,
everybody will understand also and even better. Or not?
> So far this produces a 3 to 5 percent speedup in NoonianChess.
>
> What does everyone think?
Perhaps I will post a result here in a few days, unlikely as am not using pvs
inside the tree except for a few moves anyway.
-----------------------------------
what happens if instead of:
a=-Search(-beta, -alpha);
I write
a=-Search(alpha,beta);
and at the begginning of the function I write
int Search (..., int alpha_, int beta_)
{
int alpha = -beta_;
int beta = -alpha_;
...
}
is the compiler intelligent enough to reduce the slight overhead if any?
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.