Difference between revisions of "ProbCut"
GerdIsenberg (talk  contribs) 
GerdIsenberg (talk  contribs) 

Line 180:  Line 180:  
* [[MultiCut]]  * [[MultiCut]]  
* [[Null Move Pruning]]  * [[Null Move Pruning]]  
+  * [[RankCut]]  
=Publications=  =Publications= 
Latest revision as of 21:11, 6 November 2019
Home * Search * Selectivity * Pruning * ProbCut
ProbCut,
a selective search enhancement of the alphabeta algorithm created in 1994 by Michael Buro as introduced in his Ph.D. thesis ^{[2]}. It permits to exclude probably irrelevant subtrees from beeing searched deeply. ProbCut and its improved variant Multi–ProbCut (MPC) have been shown to be effective in Othello ^{[3]} and Shogi ^{[4]}, and a technique similar to ProbCut is used in the checkers program Chinook by Schaeffer et al. (1992) ^{[5]} described their approach in a footnode: Chinook performs forward cuts in positions with a material deficit, where a shallow search does not show an escape. ProbCut is a generalization of this method in that it is game independent. It was tested by incorporating it in Buro's already strong Othello program Logistello ^{[6]} and increased the program's playing strength ^{[7]}. Despite some promising results reported by Albert Xin Jiang and Michael Buro with Crafty ^{[8]}, it seemed not that successful in chess programs which already perform Null Move Pruning and Late Move Reductions, until Stockfish proved otherwise as implemened by Gary Linscott ^{[9]} ^{[10]}.
Contents
The Idea
ProbCut is based on the idea that the result v of a shallow search with depth d is a rough estimate of the result v of a deeper search with depth d > d'. A way to model this relationship is by means of a linear model:
v = a*v' + b + e
where e is a normally distributed error variable with mean 0 and standard deviation σ (sigma) or variance σ². If the evaluation function is relative stable, the slope a is about 1.0, offset b about 0.0 and a small variance σ². The cutoff condition of depth d
v ≥ β
becomes
(v' + b  β)/σ ≥ e/σ
since e/σ is normally distributed with mean 0 and variance 1 (and distribution function Φ, phi), the condition holds true with probability of at least p iff
(v' + b  β)/σ ≥ Φ1(p)
which is equivalent to
v' ≥ (Φ1(p) * σ + β  b) / a
Similar for
v ≤ α
the condition becomes
v' ≤ (Φ1(p) * σ + α  b) / a
Pseudo Code
This observation immediately leads to the implementation of the ProbCut alphabeta extension for one depth and reduced depth pair using floats. Before sigma, a and b are estimated by linear regression likely for different game phases, the search depths d and d' < d and cut threshold must be chosen or be determined empirically, by checking the performance of the program with various parameter settings ^{[11]} .
int alphaBetaProbCut(int α, int β, int depth) { const float T(1.5); const int DP(4); const int D(8); if ( depth == 0 ) return evaluate(); if ( depth == D ) { int bound; /* v >= β with prob. of at least p? yes => cutoff */ bound = round( ( T * σ + β  b) / a ); if ( alphaBetaProbCut( bound1, bound, DP) >= bound ) return β; /* v <= α with prob. of at least p? yes => cutoff */ bound = round( (T * σ + α  b) / a ); if ( alphaBetaProbCut( bound, bound+1, DP) <= bound ) return α; } /* the remainder of alphabeta goes here */ ... }
Multi–ProbCut
Multi–ProbCut (MPC) enhances ProbCut by
 Allowing different regression parameters and cut thresholds for different stages of the game
 Using more than one depth pair
 Using internal iterative deepening for shallow searches
struct Param { int d; /* shallow search depth */ float t; /* cut threshold */ float a, b, σ; /* slope, offset, standard deviation */ } param[MAX_STAGE+1][MAX_HEIGHT+1][NUM_TRY]; int alphaBetaMPC(int α, int β, int depth) { if ( depth == 0 ) return evaluate(); if ( depth <= MAX_D ) { for (int i=0; i < NUM_TRY; i++) { int bound; const Param &pa = param[stage][depth][i]; if (pa.d < 0 ) break; /* no more parameters available */ /* v >= β with prob. of at least p? yes => cutoff */ bound = round( ( pa.t * pa.σ + β  pa.b) / pa.a ); if ( alphaBetaMPC( bound1, bound, pa.d) >= bound ) return β; /* v <= α with prob. of at least p? yes => cutoff */ bound = round( (pa.t * pa.σ + α  pa.b) / pa.a ); if ( alphaBetaMPC( bound, bound+1, pa.d) <= bound ) return α; } } /* the remainder of alphabeta goes here */ ... }
ProbeCut or MPC in Chess
In 2003, Albert Xin Jiang implemented ProbCut and MPC in Crafty by Robert Hyatt. In his thesis he introductory elaborates on ProbCut in Chess ^{[12]} :
There has been no report of success for ProbCut or MPC in chess thus far. There are at least two reasons for this:

Nullmove is available for chess. Nullmove and ProbCut are based on similar ideas, as a result they tend to prune the same type of positions. Part of the reason why ProbCut is so successful in Othello is that nullmove does not work in Othello. But in chess, ProbCut and MPC have to compete with nullmove, which is way better than bruteforce alphabeta.

Chess searches tend to make more mistakes than Othello searches
^{[13]}. This leads to a larger standard deviation in the linear relationship between shallow and deep search results, which makes it harder to get ProbCut cuts
.
In his research, Albert Xin Jiang further determined following parameters by linear regression. The about 2700 positions were chosen randomly from some computer chess tournament games and some of Crafty’s games against human grandmasters on internet chess servers:
v' versus v for depth pair (4,8) ^{[14]}
Linear regression results. The evaluation function’s scale is 100 = one pawn. r is the regression correlation coefficient, a measure of how good the data fits the linear model:
Pairs  Stage  a  b  σ  r 

(3,5)  Middlegame  0.998  7.000  55.80  0.90 
(3,5)  Endgame  1.026  4.100  51.80  0.94 
(4,8)  Middlegame  1.020  2.360  82.00  0.82 
(4,8)  Endgame  1.110  1.750  75.00  0.90 
While ProbCut did not result in better playing strength of Crafty, Albert Xin Jiang and Michael Buro report an improvement with MPC while playing two times three 64game matches with three Crafty versions and two time controls versus Dieter Bürßner's program Yace ^{[15]} :
Pairing  Crafty %  

2min + 10sec/move 
8min + 20sec/move  
Crafty  Yace  42.0  50.8 
MPC Crafty(1.2, 1.0)  Yace  53.1  56.3 
MPC Crafty(1.0, 1.0)  Yace  57.0  55.5 
However, Robert Hyatt first stated results were inconclusive ^{[16]} , and later that MPC was somewhat worse in every test he tried ^{[17]} , also confirmed by Robert Allgeuer, who performed Crafty MPC tests with following conclusion in CCC ^{[18]} :
My tests indicate that the overall playing strength of Crafty 18.15 remains more or less unchanged by the addition of MultiProbCut. However, the characteristic of the engine changes significantly due to ProbCut: Even though nominal search depth is increased by one to two plies, tactical strength is severely reduced.
Furthermore with ProbCut match results become more unpredictable and inconsistent: Apparently there are types of opponents against which ProbCut works very well and results in significantly improved results, but there are also other opponents (the tactically stronger ones?) where ProbCut has exactly the opposite effect.
See also
 Enhanced Forward Pruning
 Futility Pruning
 Late Move Reductions
 Match Statistics
 MultiCut
 Null Move Pruning
 RankCut
Publications
^{[19]} ^{[20]}
 Michael Buro (1994). Techniken für die Bewertung von Spielsituationen anhand von Beispielen. Ph.D. Thesis. Paderborn University, Paderborn, Germany. (German), pdf
 Michael Buro (1995). ProbCut: An Effective Selective Extension of the AlphaBeta Algorithm. ICCA Journal, Vol 18, No. 2, pdf
 Michael Buro (1997). Experiments with MultiProbCut and a New Highquality Evaluation Function for Othello. Technical Report No. 96, NEC Research Institute, pdf
 Michael Buro (2000). Experiments with MultiProbCut and a new HighQuality Evaluation Function for Othello. Games in AI Research
 Kazutomo Shibahara, Nobuo Inui, Yoshiyuki Kotani (2002). Effect of ProbCut in Shogi  by changing parameters according to position category. 7th Game Programming Workshop
 Michael Buro (2002). MultiProbCut Search. slides as pdf
 Albert Xin Jiang (2003). Implementation of MultiProbCut in Chess. CPSC 449 Thesis, pdf
 Albert Xin Jiang, Michael Buro (2003). First Experimental Results of ProbCut Applied to Chess. Advances in Computer Games 10
 Maarten Schadd, Mark Winands, Jos Uiterwijk (2009). ChanceProbCut: Forward Pruning in Chance Nodes. in IEEE Symposium on Computational Intelligence and Games (CIG 2009)
Forum Posts
 whats probcut? by vitor, CCC, August 29, 1999
 muliti probcut by Martin Fierz, CCC, July 04, 2001
 MultiProbCut and Crafty : does it work ? by Frédéric Louguet, CCC, June 28, 2003
 Crafty MPC tests (long post) by Robert Allgeuer, CCC, October 18, 2003
 ProbCut: An Effective Selective Extension of the AlphaBeta Algorithm by Albert Silver, CCC, July 21, 2004
 Re: Possible search improvment by Ryan Benitez, CCC, June 17, 2009 » History Leaf Pruning
 Bad Pruning by Onno Garms, CCC, March 13, 2011
 Probcut by Gary, CCC, May 24, 2013 » Stockfish
External Links
 Writing an Othello program by Gunnar Andersson
 SmartGame Library: SgProbCut.h File Reference, Fuego Documentation ^{[21]}
References
 ↑ Illustrations of the first two ProbCut generalizations: a) allowing forward cuts at several heights and b) performing a sequence of check searches of increasing depth from Michael Buro (1997). Experiments with MultiProbCut and a New Highquality Evaluation Function for Othello. Technical Report No. 96, NEC Research Institute, Princeton, N.J. pdf, 8 MultiProbCut, pp 7.
 ↑ Michael Buro (1994). Techniken für die Bewertung von Spielsituationen anhand von Beispielen. Ph.D. Thesis. Paderborn University, Paderborn, Germany. (German), Kapitel 4. Selektive Suche
 ↑ Michael Buro (1997). Experiments with MultiProbCut and a New Highquality Evaluation Function for Othello. Technical Report No. 96, NEC Research Institute, Princeton, N.J. pdf
 ↑ Kazutomo Shibahara, Nobuo Inui, Yoshiyuki Kotani (2002). Effect of ProbCut in Shogi  by changing parameters according to position category. 7th Game Programming Workshop
 ↑ Jonathan Schaeffer, Joe Culberson, Norman Treloar, Brent Knight, Paul Lu, and Duane Szafron (1992). A World Championship Caliber Checkers Program. Artificial Intelligence, Vol. 53, Nos. 23
 ↑ LOGISTELLO's Homepage
 ↑ Michael Buro (1995). ProbCut: An Effective Selective Extension of the AlphaBeta Algorithm. ICCA Journal, Vol 18, No. 2, pdf
 ↑ Albert Xin Jiang, Michael Buro (2003). First Experimental Results of ProbCut Applied to Chess. Advances in Computer Games 10
 ↑ Probcut by Gary, CCC, May 24, 2013
 ↑ Stockfish/search.cpp at master · officialstockfish/Stockfish · GitHub, Step 9. ProbCut
 ↑ Michael Buro (1995). ProbCut: An Effective Selective Extension of the AlphaBeta Algorithm. ICCA Journal, Vol 18, No. 2, pdf
 ↑ Albert Xin Jiang (2003). Implementation of MultiProbCut and Chess. CPSC 449 Thesis, pdf, 2.5 ProbeCut in Chess, pp. 6
 ↑ Andreas Junghanns, Jonathan Schaeffer, Mark Brockington, Yngvi Björnsson, Tony Marsland (1997). Diminishing Returns for Additional Search in Chess. Advances in Computer Chess 8
 ↑ Image from Albert Xin Jiang (2003). Implementation of MultiProbCut in Chess. CPSC 449 Thesis, pdf
 ↑ Page 30 in Albert Xin Jiang, Michael Buro (2003). First Experimental Results of ProbCut Applied to Chess. Advances in Computer Games 10, pdf
 ↑ Re: MultiProbCut and Crafty : does it work ? by Robert Hyatt, CCC, June 28, 2003
 ↑ Re: ProbCut: An Effective Selective Extension of the AlphaBeta Algorithm by Robert Hyatt, CCC, July 21, 2004
 ↑ Crafty MPC tests (long post) by Robert Allgeuer, CCC, October 18, 2003
 ↑ Michael Buro's Publication List
 ↑ Albert Xin Jiang  publications
 ↑ Fuego, Go playing program by Markus Enzenberger, Martin Müller, Broderick Arneson, Richard Segal, Gerald Tesauro and Arpad Rimmel