Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SpInfluencePlayer.h

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


17 Jun 2010 Doxygen 1.4.7