00001 //---------------------------------------------------------------------------- 00002 /** @file SpInfluencePlayer.h 00003 Greedy influence player */ 00004 //---------------------------------------------------------------------------- 00005 00006 #ifndef SP_INFLUENCEPLAYER_H 00007 #define SP_INFLUENCEPLAYER_H 00008 00009 #include "SpSimplePlayer.h" 00010 #include "SpMoveGenerator.h" 00011 00012 //---------------------------------------------------------------------------- 00013 00014 /** The influence move generator tries to maximize influence */ 00015 class SpInfluenceMoveGenerator 00016 : public Sp1PlyMoveGenerator 00017 { 00018 public: 00019 explicit SpInfluenceMoveGenerator(const GoBoard& board) 00020 : Sp1PlyMoveGenerator(board) 00021 { } 00022 00023 int Evaluate(); 00024 }; 00025 00026 //---------------------------------------------------------------------------- 00027 00028 /** Simple player using SpInfluenceMoveGenerator */ 00029 class SpInfluencePlayer 00030 : public SpSimplePlayer 00031 { 00032 public: 00033 SpInfluencePlayer(const GoBoard& board) 00034 : SpSimplePlayer(board, new SpInfluenceMoveGenerator(board)) 00035 { } 00036 00037 std::string Name() const 00038 { 00039 return "Influence"; 00040 } 00041 }; 00042 00043 //---------------------------------------------------------------------------- 00044 00045 #endif 00046