All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
osl::game_playing::SearchPlayer Class Reference

MtdfPlayer と AlphaBetaPlayer の共通部分 More...

#include <searchPlayer.h>

Inheritance diagram for osl::game_playing::SearchPlayer:
Inheritance graph
[legend]
Collaboration diagram for osl::game_playing::SearchPlayer:
Collaboration graph
[legend]

List of all members.

Classes

struct  Config

Public Member Functions

 SearchPlayer ()
 SearchPlayer (const SearchPlayer &)
 ~SearchPlayer ()
void setDepthLimit (int limit, int initial_limit, int deepening_step)
void setNodeLimit (size_t node_limit)
void setNodeCountHardLimit (size_t node_limit)
void setTableLimit (size_t size, int record_limit)
void setVerbose (int verbose=1)
void setDrawCoef (int new_value)
void setNextIterationCoefficient (double new_value)
double nextIterationCoefficient () const
void enableSavePV (bool enable=true)
void enableMultiPV (int width)
void addMonitor (const boost::shared_ptr< search::SearchMonitor > &)
void resetRecorder (search::CountRecorder *new_recorder)
 所有権移転
void pushMove (Move m)
void popMove ()
void swapTable (SearchPlayer &other)
 other の局面表と取り替える
const search::SimpleHashTabletable () const
const search::CountRecorderrecorder () const
bool stopSearchNow ()
 探索をとめる
bool canStopSearch ()
const MoveWithComment selectBestMove (const GameState &, int limit, int elapsed, int byoyomi)
 searchWithSecondsForThisMove を呼び出す
const MoveWithComment selectBestMoveInTime (const GameState &, const search::TimeAssigned &)
const search::TimeAssigned assignTime (const GameState &state, int limit, int elapsed, int byoyomi) const
void saveSearchResult (const GameState &, const MoveWithComment &)
virtual const MoveWithComment searchWithSecondsForThisMove (const GameState &, const search::TimeAssigned &)=0
void setRootIgnoreMoves (const MoveVector *rim, bool prediction)
const ConfiggetConfig () const
int secondsForThisMove (const GameState &state, int limit, int elapsed, int byoyomi) const
void setTimeAssign (const search::TimeAssigned &new_assign)
const MilliSeconds startTime () const

Static Public Member Functions

static const search::TimeAssigned assignTime (const GameState &state, int limit, int elapsed, int byoyomi, int verbose)
static int secondsForThisMove (const GameState &state, int limit, int elapsed, int byoyomi, int verboseness)

Protected Member Functions

template<class Searcher >
ComputerPlayercloneIt (const Searcher &) const
const MilliSeconds::Interval setUpTable (const GameState &, int pawn_value)
template<class Searcher >
const MoveWithComment search (const GameState &, const search::TimeAssigned &)
template<class Searcher >
bool isReasonableMoveBySearch (Searcher &, Move move, int pawn_sacrifice)
const search::TimeAssigned adjust (const search::TimeAssigned &org, const MilliSeconds::Interval &elapsed)

Static Protected Member Functions

template<class Searcher >
static int pawnValue ()
template<class Searcher >
static int pawnValueOfTurn (Player turn)

Protected Attributes

Config config
boost::shared_ptr
< search::SimpleHashTable
table_ptr
boost::shared_ptr
< checkmate::DualDfpn
checkmate_ptr
boost::scoped_ptr
< search::CountRecorder
recorder_ptr
volatile bool searching
boost::scoped_ptr
< search::SearchTimer
searcher
volatile bool plan_stop
 探索に入る前に止める
const MoveVector * root_ignore_moves
bool prediction_for_speculative_search
boost::scoped_ptr< PVHistorypv_history
int almost_resign_count

Detailed Description

MtdfPlayer と AlphaBetaPlayer の共通部分

Definition at line 36 of file searchPlayer.h.


Constructor & Destructor Documentation

Definition at line 49 of file searchPlayer.cc.

Definition at line 59 of file searchPlayer.cc.

Definition at line 71 of file searchPlayer.cc.


Member Function Documentation

void osl::game_playing::SearchPlayer::addMonitor ( const boost::shared_ptr< search::SearchMonitor > &  m)

Definition at line 233 of file searchPlayer.cc.

const osl::search::TimeAssigned osl::game_playing::SearchPlayer::adjust ( const search::TimeAssigned org,
const MilliSeconds::Interval &  elapsed 
) [protected]
const osl::search::TimeAssigned osl::game_playing::SearchPlayer::assignTime ( const GameState state,
int  limit,
int  elapsed,
int  byoyomi,
int  verbose 
) [static]

Definition at line 328 of file searchPlayer.cc.

References osl::eval::max(), and osl::eval::min().

const osl::search::TimeAssigned osl::game_playing::SearchPlayer::assignTime ( const GameState state,
int  limit,
int  elapsed,
int  byoyomi 
) const

Definition at line 320 of file searchPlayer.cc.

Definition at line 82 of file searchPlayer.cc.

template<class Searcher >
osl::game_playing::ComputerPlayer * osl::game_playing::SearchPlayer::cloneIt ( const Searcher copy) const [protected]

Definition at line 40 of file searchPlayer.tcc.

void osl::game_playing::SearchPlayer::enableMultiPV ( int  width) [inline]
void osl::game_playing::SearchPlayer::enableSavePV ( bool  enable = true) [inline]

Definition at line 94 of file searchPlayer.h.

References config, and osl::game_playing::SearchPlayer::Config::save_pv.

Definition at line 147 of file searchPlayer.h.

References config.

template<class Searcher >
bool osl::game_playing::SearchPlayer::isReasonableMoveBySearch ( Searcher searcher,
Move  move,
int  pawn_sacrifice 
) [protected]

Definition at line 146 of file searchPlayer.tcc.

template<class Searcher >
int osl::game_playing::SearchPlayer::pawnValue ( ) [static, protected]

Definition at line 47 of file searchPlayer.tcc.

References osl::BLACK, osl::newPtypeO(), and osl::PAWN.

template<class Searcher >
int osl::game_playing::SearchPlayer::pawnValueOfTurn ( Player  turn) [static, protected]

Definition at line 54 of file searchPlayer.tcc.

References osl::eval::delta().

Implements osl::game_playing::ComputerPlayer.

Definition at line 247 of file searchPlayer.cc.

Implements osl::game_playing::ComputerPlayer.

Definition at line 240 of file searchPlayer.cc.

Definition at line 110 of file searchPlayer.h.

References recorder_ptr.

所有権移転

Definition at line 104 of file searchPlayer.cc.

void osl::game_playing::SearchPlayer::saveSearchResult ( const GameState state,
const MoveWithComment &  best_move 
)
template<class Searcher >
const osl::search::MoveWithComment osl::game_playing::SearchPlayer::search ( const GameState state,
const search::TimeAssigned msec 
) [protected]
virtual const MoveWithComment osl::game_playing::SearchPlayer::searchWithSecondsForThisMove ( const GameState ,
const search::TimeAssigned  
) [pure virtual]
int osl::game_playing::SearchPlayer::secondsForThisMove ( const GameState state,
int  limit,
int  elapsed,
int  byoyomi,
int  verboseness 
) [static]
int osl::game_playing::SearchPlayer::secondsForThisMove ( const GameState state,
int  limit,
int  elapsed,
int  byoyomi 
) const

Definition at line 255 of file searchPlayer.cc.

const osl::search::MoveWithComment osl::game_playing::SearchPlayer::selectBestMove ( const GameState state,
int  limit,
int  elapsed,
int  byoyomi 
) [virtual]

searchWithSecondsForThisMove を呼び出す

Implements osl::game_playing::ComputerPlayer.

Definition at line 341 of file searchPlayer.cc.

Referenced by main().

void osl::game_playing::SearchPlayer::setDepthLimit ( int  limit,
int  initial_limit,
int  deepening_step 
)

Definition at line 188 of file searchPlayer.cc.

Referenced by main(), and search().

void osl::game_playing::SearchPlayer::setDrawCoef ( int  new_value) [inline]

Definition at line 88 of file searchPlayer.h.

References config, and osl::game_playing::SearchPlayer::Config::draw_coef.

Definition at line 225 of file searchPlayer.cc.

Referenced by search().

Definition at line 202 of file searchPlayer.cc.

void osl::game_playing::SearchPlayer::setNodeLimit ( size_t  node_limit)

Definition at line 196 of file searchPlayer.cc.

Referenced by main(), and search().

void osl::game_playing::SearchPlayer::setRootIgnoreMoves ( const MoveVector *  rim,
bool  prediction 
) [inline]

Definition at line 141 of file searchPlayer.h.

References prediction_for_speculative_search, and root_ignore_moves.

void osl::game_playing::SearchPlayer::setTableLimit ( size_t  size,
int  record_limit 
)

Definition at line 208 of file searchPlayer.cc.

Referenced by main(), and search().

Definition at line 365 of file searchPlayer.cc.

const osl::MilliSeconds::Interval osl::game_playing::SearchPlayer::setUpTable ( const GameState gs,
int  pawn_value 
) [protected]

Definition at line 217 of file searchPlayer.cc.

Referenced by search().

const osl::MilliSeconds osl::game_playing::SearchPlayer::startTime ( ) const

Definition at line 373 of file searchPlayer.cc.

探索をとめる

Reimplemented from osl::game_playing::ComputerPlayer.

Definition at line 88 of file searchPlayer.cc.

References osl::ctime_r().

other の局面表と取り替える

Definition at line 76 of file searchPlayer.cc.

References table_ptr.

Referenced by osl::game_playing::SpeculativeAllMoves::waitResult().

Definition at line 109 of file searchPlayer.h.

References table_ptr.

Referenced by search().


Member Data Documentation

Definition at line 77 of file searchPlayer.h.

Definition at line 68 of file searchPlayer.h.

volatile bool osl::game_playing::SearchPlayer::plan_stop [protected]

探索に入る前に止める

Definition at line 73 of file searchPlayer.h.

Definition at line 75 of file searchPlayer.h.

Referenced by setRootIgnoreMoves().

Definition at line 76 of file searchPlayer.h.

Definition at line 69 of file searchPlayer.h.

Referenced by recorder().

Definition at line 74 of file searchPlayer.h.

Referenced by setRootIgnoreMoves().

Definition at line 71 of file searchPlayer.h.

volatile bool osl::game_playing::SearchPlayer::searching [protected]

Definition at line 70 of file searchPlayer.h.

Definition at line 67 of file searchPlayer.h.

Referenced by swapTable(), and table().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines