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 #ifndef SP_GREEDYPLAYER_H
00007 #define SP_GREEDYPLAYER_H
00008 
00009 #include "SpSimplePlayer.h"
00010 #include "SpMoveGenerator.h"
00011 
00012 //----------------------------------------------------------------------------
00013 
00014 /** GreedyMoveGenerator goes for liberties, and some influence */
00015 class SpGreedyMoveGenerator
00016     : public Sp1PlyMoveGenerator
00017 {
00018 public:
00019     explicit SpGreedyMoveGenerator(const GoBoard& board)
00020         : Sp1PlyMoveGenerator(board)
00021     { }
00022 
00023     int Evaluate();
00024 };
00025 
00026 //----------------------------------------------------------------------------
00027 
00028 /** Simple player using SpGreedyMoveGenerator */
00029 class SpGreedyPlayer
00030     : public SpSimplePlayer
00031 {
00032 public:
00033     SpGreedyPlayer(const GoBoard& board)
00034         : SpSimplePlayer(board, new SpGreedyMoveGenerator(board))
00035     { }
00036 
00037     std::string Name() const
00038     {
00039         return "Greedy";
00040     }
00041 };
00042 
00043 #endif
00044 


Sun Mar 13 2011 Doxygen 1.7.1