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 #ifndef GO_BENSONSOLVER_H 00011 #define GO_BENSONSOLVER_H 00012 00013 #include "GoBoard.h" 00014 #include "GoRegion.h" 00015 #include "GoStaticSafetySolver.h" 00016 00017 //---------------------------------------------------------------------------- 00018 00019 /** Benson's classic algorithm for finding unconditionally alive blocks */ 00020 class GoBensonSolver : public GoStaticSafetySolver 00021 { 00022 public: 00023 /** If regions = 0, creates its own */ 00024 explicit GoBensonSolver(GoBoard& board, GoRegionBoard* regions = 0) 00025 : GoStaticSafetySolver(board, regions) 00026 { 00027 } 00028 00029 /** Main function, compute safe points */ 00030 void FindSafePoints(SgBWSet* safe); 00031 }; 00032 00033 //---------------------------------------------------------------------------- 00034 00035 #endif // GO_BENSONSOLVER_H