Razoring isn't my idea. Came from Heinz, and someone else before him (Kent?)Gerd Isenberg wrote:As mentioned, NegaScout aka PVS as alpha-beta enhancement is probably most common. Further important enhancements are related to various forward pruning techniques like Null Move Pruning, eventually Multi-Cut and Hyatt's Razoring. Quite common nowadays seems Late Move Reduction to reduce effective branching factor even more.
Search-algorithm
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Search-algorithm
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Search-algorithm
What you proposed in October 2008, was a complete different animal than classical razoring from Birmingham and Kent, as well the Limited Razoring (L) in AEL-Pruning from Heinz:bob wrote:Razoring isn't my idea. Came from Heinz, and someone else before him (Kent?)Gerd Isenberg wrote:As mentioned, NegaScout aka PVS as alpha-beta enhancement is probably most common. Further important enhancements are related to various forward pruning techniques like Null Move Pruning, eventually Multi-Cut and Hyatt's Razoring. Quite common nowadays seems Late Move Reduction to reduce effective branching factor even more.
I had heard Tord mention that he was using razoring. I had tried this a few years back (along with lots of other things) and I try to save old code. I decided yesterday to see how it would look on a cluster run since I had never been able to test that thoroughly in the past.
Code: Select all
/*
************************************************************
* *
* now we try a quick Razoring test. If we are within 3 *
* plies of a tip, and the current eval is 3 pawns (or *
* more) below beta, then we just drop into a q-search *
* to try to get a quick cutoff without searching more in *
* a position where we are way down in material. *
* *
************************************************************
*/
if (razoring_allowed && depth <= razor_depth) {
if (alpha == beta - 1) { // null window ?
if (Evaluate(tree, ply, wtm, alpha, beta) + razor_margin < beta) { // likely a fail-low node ?
value = QuiesceChecks(tree, alpha, beta, wtm, ply);
if (value < beta)
return value;
}
}
}
-
- Posts: 88
- Joined: Wed Mar 25, 2009 12:49 pm
Re: Search-algorithm
"Rajlich-Osipov Razoring"?Gerd Isenberg wrote:How should we call it if not "Hyatt's Razoring"?
Code: Select all
/* In the non-pv not-in-check search function of Strelka 2.0 */
value = pos_info_entry->value + 300;
if (value < beta && depth <= 3) {
new_value = qu_search(beta-1, beta, depth*8-8, new_pv);
if (new_value < beta) {
if (new_value >= value) return new_value; else return value;
}
}
-
- Posts: 2250
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: Search-algorithm
Yes, but Bob also said "I had tried this a few years back (along with lots of other things) and I try to save old code", so the idea was probably known and used by Bob (and others?) before Rybka/Strelka appeared.Teemu Pudas wrote:"Rajlich-Osipov Razoring"?Gerd Isenberg wrote:How should we call it if not "Hyatt's Razoring"?qu_search with positive depth doesn't prune bad captures (doesn't reorder them either; Vas has hinted that this was a Rybka bug). Checks are searched at depth -5 and higher.Code: Select all
/* In the non-pv not-in-check search function of Strelka 2.0 */ value = pos_info_entry->value + 300; if (value < beta && depth <= 3) { new_value = qu_search(beta-1, beta, depth*8-8, new_pv); if (new_value < beta) { if (new_value >= value) return new_value; else return value; } }
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Search-algorithm
That is more of a reduction, and I do not do things that way any longer, switching to actual forward pruning, which is what razoring actually does. So if you want to call that "Hyatt's razoring" I suppose that is OK. It is less risky, obviously, but also less effective although the difference is not huge.Gerd Isenberg wrote:What you proposed in October 2008, was a complete different animal than classical razoring from Birmingham and Kent, as well the Limited Razoring (L) in AEL-Pruning from Heinz:bob wrote:Razoring isn't my idea. Came from Heinz, and someone else before him (Kent?)Gerd Isenberg wrote:As mentioned, NegaScout aka PVS as alpha-beta enhancement is probably most common. Further important enhancements are related to various forward pruning techniques like Null Move Pruning, eventually Multi-Cut and Hyatt's Razoring. Quite common nowadays seems Late Move Reduction to reduce effective branching factor even more.
I had heard Tord mention that he was using razoring. I had tried this a few years back (along with lots of other things) and I try to save old code. I decided yesterday to see how it would look on a cluster run since I had never been able to test that thoroughly in the past.How should we call it if not "Hyatt's Razoring"?Code: Select all
/* ************************************************************ * * * now we try a quick Razoring test. If we are within 3 * * plies of a tip, and the current eval is 3 pawns (or * * more) below beta, then we just drop into a q-search * * to try to get a quick cutoff without searching more in * * a position where we are way down in material. * * * ************************************************************ */ if (razoring_allowed && depth <= razor_depth) { if (alpha == beta - 1) { // null window ? if (Evaluate(tree, ply, wtm, alpha, beta) + razor_margin < beta) { // likely a fail-low node ? value = QuiesceChecks(tree, alpha, beta, wtm, ply); if (value < beta) return value; } } }
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Search-algorithm
That idea didn't come from Strelka. It's been "as is" in Crafty for several years, added (I believe) by Jeremiah P. I think the notes in main.c give credit for this to him. I'd suspect someone borrowed it from Crafty, no big surprise there...Teemu Pudas wrote:"Rajlich-Osipov Razoring"?Gerd Isenberg wrote:How should we call it if not "Hyatt's Razoring"?qu_search with positive depth doesn't prune bad captures (doesn't reorder them either; Vas has hinted that this was a Rybka bug). Checks are searched at depth -5 and higher.Code: Select all
/* In the non-pv not-in-check search function of Strelka 2.0 */ value = pos_info_entry->value + 300; if (value < beta && depth <= 3) { new_value = qu_search(beta-1, beta, depth*8-8, new_pv); if (new_value < beta) { if (new_value >= value) return new_value; else return value; } }