Author: Ernst A. Heinz
Date: 07:48:55 10/04/98
Go up one level in this thread
On October 03, 1998 at 17:03:19, Inmann Werner wrote:
>
>I read the article of Ulli Türke about razoring. I must say, I did not
>understand it full, but I tried to implement something like this
>
>In alpha beta after checking for checkmate and the extensions i try
>
> if (noextension_made && distance to horizon<=2 && material_bilance[depth]
> + 6*pawn_Value <=alpha) return(alpha-1)
Werner,
It looks like you did not really study the article -- you got neither the
implementation nor the author correct ... :-(
I think you refer to limited razoring as detailed in my article about
extended futility pruning. The article even lists ANSI-C source code that
demonstrates how to use both techniques. In order to simplify the
subsequent discussion, I quote the code as published in my article below.
/****************************************************************************/
int search(int alpha, int beta, int depth, int move, node parent) {
node current;
int extend, fmax, fprune, fscore, score, selective;
/* execute the opponent's move and initialize some local variables */
make_move(parent, move, ¤t);
fprune = selective = 0;
score = -INFINITY;
/* determine if and how to extend the search at the current node */
extend = extensions(depth, move, current);
depth += extend;
/* decide about limited razoring at pre-pre-frontier nodes */
fscore = (mat_balance(current) + razor_margin);
if (!extend && (depth == PRE_PRE_FRONTIER) && (fscore <= alpha)
&& (opposing_pieces(current) > 3)) depth = PRE_FRONTIER;
/* decide about extended futility pruning at pre-frontier nodes */
fscore = (mat_balance(current) + extd_futil_margin);
if (!extend && (depth == PRE_FRONTIER) && (fscore <= alpha)) {
fprune = selective = 1;
score = fmax = fscore;
}
/* decide about selective futility pruning at frontier nodes */
fscore = (mat_balance(current) + futil_margin);
if (!check(move) && (depth == FRONTIER) && (fscore <= alpha)) {
fprune = selective = 1;
score = fmax = fscore;
}
/* ``selective == 1'' and ``--INFINITY < score <= alpha'' hold if
* the search will be selective at the current node.
*
* continue like normal but prune all futile moves if ``fprune == 1''
*/
...
for (move = first(current), (move!= 0), move = next(current, move))
if (!fprune || check(move)
|| (fmax + mat_gain(move) > alpha)) {
... /* <-- the recursive search call is somewhere here */
}
...
}
/****************************************************************************/
1. Limited razoring applies at pre-pre-frontier nodes with a remaining
depth of 3 plies. At these nodes you simply reduce the depth by 1 ply
if the according conditions are fulfilled. Yet you do *not* stop the
search by returning some fishy score ... where did you get this from?
2. Extended futility pruning applies at pre-frontier nodes with a remaining
depth of 2 plies. At these nodes you only follow promising captures and
all checking moves if the according conditions are fulfilled (similar to
normal/selective futility pruning at frontier nodes). Again, you do *not*
stop the search immediately but you rather prune unpromising captures
and all quiet moves based on a static decision at the current node.
=Ernst=
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.