speculativeSearchPlayer.h
Go to the documentation of this file.
00001 /* speculativeSearchPlayer.h
00002  */
00003 #ifndef OSL_SPECULATIVESEARCHPLAYER_H
00004 #define OSL_SPECULATIVESEARCHPLAYER_H
00005 
00006 #include "osl/game_playing/computerPlayer.h"
00007 #include "osl/game_playing/speculativeModel.h"
00008 #include <boost/shared_ptr.hpp>
00009 #include <boost/scoped_ptr.hpp>
00010 
00011 namespace osl
00012 {
00013   namespace game_playing
00014   {
00015     class SearchPlayer;
00016     class SpeculativeModel;
00020     class SpeculativeSearchPlayer : public ComputerPlayer
00021     {
00022       boost::scoped_ptr<SearchPlayer> main_player;
00023       boost::shared_ptr<GameState> previous_state;
00024       boost::scoped_ptr<SpeculativeModel> speculative;
00025       Player my_turn;
00026     public:
00028       SpeculativeSearchPlayer(Player my_turn, SearchPlayer *);
00029       ~SpeculativeSearchPlayer();
00030       ComputerPlayer* clone() const;
00031 
00032       void pushMove(Move m);
00033       void popMove();
00034       bool stopSearchNow();
00035 
00037       void setMaxThreads(int new_max_threads);
00038 
00039       const MoveWithComment selectBestMove(const GameState&, int limit, int elapsed, int byoyomi);
00040       search::TimeAssigned standardSearchSeconds(const GameState&, int limit, int elapsed, int byoyomi) const;
00041     private:
00042       void selectBestMoveCleanUp(const GameState& state);
00043     };
00044   } // game_playing
00045 } // osl
00046 
00047 #endif /* OSL_SPECULATIVESEARCHPLAYER_H */
00048 // ;;; Local Variables:
00049 // ;;; mode:c++
00050 // ;;; c-basic-offset:2
00051 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines