Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SpGreedyPlayer.h

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


17 Jun 2010 Doxygen 1.4.7