Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SpSafePlayer.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file SpSafePlayer.h
00003     Safe player
00004 */
00005 //----------------------------------------------------------------------------
00006 
00007 #ifndef SP_SAFEPLAYER_H
00008 #define SP_SAFEPLAYER_H
00009 
00010 #include "SpSimplePlayer.h"
00011 #include "SpMoveGenerator.h"
00012 
00013 //----------------------------------------------------------------------------
00014 
00015 /** Uses GoSafetySolver and one ply search.
00016     Strong in the end, random in the beginning
00017 */
00018 class SpSafeMoveGenerator
00019     : public Sp1PlyMoveGenerator
00020 {
00021 public:
00022     explicit SpSafeMoveGenerator(GoBoard& board)
00023         : Sp1PlyMoveGenerator(board)
00024     { }
00025 
00026     int Evaluate();
00027 };
00028 
00029 //----------------------------------------------------------------------------
00030 
00031 /** Simple player using SpSafeMoveGenerator */
00032 class SpSafePlayer
00033     : public SpSimplePlayer
00034 {
00035 public:
00036     SpSafePlayer(GoBoard& board)
00037         : SpSimplePlayer(board, new SpSafeMoveGenerator(board))
00038     { }
00039 
00040     std::string Name() const
00041     {
00042         return "Safe";
00043     }
00044 };
00045 
00046 //----------------------------------------------------------------------------
00047 
00048 #endif // SP_SAFEPLAYER_H
00049 


17 Jun 2010 Doxygen 1.4.7