00001 //---------------------------------------------------------------------------- 00002 /** @file GoBensonSolver.h 00003 Recognize safe stones and territories according to [Benson 1976]. 00004 00005 D.B. Benson. Life in the game of Go. Information Sciences, 10:17Ð29, 1976. 00006 Reprinted in Computer Games, Levy, D.N.L. (Editor), Vol. II, pp. 203-213, 00007 Springer Verlag, 1988. 00008 */ 00009 //---------------------------------------------------------------------------- 00010 00011 #ifndef GO_BENSONSOLVER_H 00012 #define GO_BENSONSOLVER_H 00013 00014 #include "GoBoard.h" 00015 #include "GoRegion.h" 00016 #include "GoStaticSafetySolver.h" 00017 00018 //---------------------------------------------------------------------------- 00019 00020 /** Benson's classic algorithm for finding unconditionally alive blocks */ 00021 class GoBensonSolver : public GoStaticSafetySolver 00022 { 00023 public: 00024 /** If regions = 0, creates its own */ 00025 explicit GoBensonSolver(GoBoard& board, GoRegionBoard* regions = 0) 00026 : GoStaticSafetySolver(board, regions) 00027 { 00028 } 00029 00030 /** Main function, compute safe points */ 00031 void FindSafePoints(SgBWSet* safe); 00032 }; 00033 00034 //---------------------------------------------------------------------------- 00035 00036 #endif // GO_BENSONSOLVER_H