MtdfPlayer と AlphaBetaPlayer の共通部分. [詳細]
#include <searchPlayer.h>
構成 | |
struct | Config |
Public メソッド | |
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) |
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::SimpleHashTable * | table () const |
const search::CountRecorder & | recorder () const |
bool | stopSearchNow () |
探索をとめる | |
bool | canStopSearch () |
const MoveWithComment | selectBestMove (const GameState &, int, int, int) |
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 Config & | getConfig () 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 メソッド | |
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 メソッド | |
template<class Searcher > | |
ComputerPlayer * | cloneIt (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 メソッド | |
template<class Searcher > | |
static int | pawnValue () |
template<class Searcher > | |
static int | pawnValueOfTurn (Player turn) |
Protected 変数 | |
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< PVHistory > | pv_history |
MtdfPlayer と AlphaBetaPlayer の共通部分.
searchPlayer.h の 36 行で定義されています。
osl::game_playing::SearchPlayer::SearchPlayer | ( | ) |
searchPlayer.cc の 49 行で定義されています。
osl::game_playing::SearchPlayer::SearchPlayer | ( | const SearchPlayer & | copy | ) |
searchPlayer.cc の 59 行で定義されています。
osl::game_playing::SearchPlayer::~SearchPlayer | ( | ) |
searchPlayer.cc の 70 行で定義されています。
void osl::game_playing::SearchPlayer::addMonitor | ( | const boost::shared_ptr< search::SearchMonitor > & | m | ) |
searchPlayer.cc の 232 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::monitors.
const osl::search::TimeAssigned osl::game_playing::SearchPlayer::adjust | ( | const search::TimeAssigned & | org, | |
const MilliSeconds::Interval & | elapsed | |||
) | [protected] |
searchPlayer.cc の 109 行で定義されています。
参照先 osl::search::SearchTimer::adjustMemoryUseLimit(), osl::search::TimeAssigned::max, osl::eval::min(), と osl::search::TimeAssigned::standard.
参照元 osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), と osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove().
const osl::search::TimeAssigned osl::game_playing::SearchPlayer::assignTime | ( | const GameState & | state, | |
int | limit, | |||
int | elapsed, | |||
int | byoyomi | |||
) | const |
searchPlayer.cc の 316 行で定義されています。
参照先 assignTime(), と table_ptr.
const osl::search::TimeAssigned osl::game_playing::SearchPlayer::assignTime | ( | const GameState & | state, | |
int | limit, | |||
int | elapsed, | |||
int | byoyomi, | |||
int | verbose | |||
) | [static] |
searchPlayer.cc の 324 行で定義されています。
参照先 osl::eval::max(), osl::eval::min(), と secondsForThisMove().
参照元 assignTime(), と selectBestMove().
bool osl::game_playing::SearchPlayer::canStopSearch | ( | ) |
searchPlayer.cc の 81 行で定義されています。
参照先 searching.
osl::game_playing::ComputerPlayer * osl::game_playing::SearchPlayer::cloneIt | ( | const Searcher & | copy | ) | const [inline, protected] |
void osl::game_playing::SearchPlayer::enableMultiPV | ( | int | width | ) | [inline] |
searchPlayer.h の 90 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::multi_pv_width.
void osl::game_playing::SearchPlayer::enableSavePV | ( | bool | enable = true |
) | [inline] |
searchPlayer.h の 89 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::save_pv.
const Config& osl::game_playing::SearchPlayer::getConfig | ( | ) | const [inline] |
searchPlayer.h の 141 行で定義されています。
参照先 config.
int osl::game_playing::SearchPlayer::pawnValue | ( | ) | [inline, static, protected] |
searchPlayer.tcc の 47 行で定義されています。
参照先 osl::BLACK, osl::newPtypeO(), と osl::PAWN.
int osl::game_playing::SearchPlayer::pawnValueOfTurn | ( | Player | turn | ) | [inline, static, protected] |
searchPlayer.tcc の 54 行で定義されています。
参照先 osl::eval::delta().
void osl::game_playing::SearchPlayer::popMove | ( | ) | [virtual] |
osl::game_playing::ComputerPlayerを実装しています。
searchPlayer.cc の 246 行で定義されています。
参照先 checkmate_ptr, osl::game_playing::ComputerPlayer::speculative_search_allowed, と table_ptr.
void osl::game_playing::SearchPlayer::pushMove | ( | Move | m | ) | [virtual] |
osl::game_playing::ComputerPlayerを実装しています。
searchPlayer.cc の 239 行で定義されています。
参照先 checkmate_ptr, osl::game_playing::ComputerPlayer::speculative_search_allowed, と table_ptr.
const search::CountRecorder& osl::game_playing::SearchPlayer::recorder | ( | ) | const [inline] |
searchPlayer.h の 105 行で定義されています。
参照先 recorder_ptr.
void osl::game_playing::SearchPlayer::resetRecorder | ( | search::CountRecorder * | new_recorder | ) |
void osl::game_playing::SearchPlayer::saveSearchResult | ( | const GameState & | state, | |
const MoveWithComment & | best_move | |||
) |
searchPlayer.cc の 355 行で定義されています。
参照先 osl::game_playing::GameState::moveHistory(), pv_history, と osl::container::MoveStack::size().
参照元 search().
const osl::search::MoveWithComment osl::game_playing::SearchPlayer::search | ( | const GameState & | state, | |
const search::TimeAssigned & | msec | |||
) | [inline, protected] |
searchPlayer.tcc の 61 行で定義されています。
参照先 config, osl::game_playing::SearchPlayer::Config::deepening_step, osl::game_playing::SearchPlayer::Config::initial_limit, osl::Move::INVALID(), osl::Move::isNormal(), osl::game_playing::SearchPlayer::Config::limit, osl::eval::min(), osl::game_playing::SearchPlayer::Config::monitors, osl::game_playing::GameState::moveHistory(), osl::game_playing::SearchPlayer::Config::multi_pv_width, osl::game_playing::SearchPlayer::Config::next_iteration_coefficient, osl::game_playing::SearchPlayer::Config::node_count_hard_limit, osl::game_playing::SearchPlayer::Config::node_limit, plan_stop, prediction_for_speculative_search, root_ignore_moves, saveSearchResult(), searcher, searching, osl::search::TimeAssigned::standard, と osl::game_playing::GameState::state().
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 | |||
) | const |
searchPlayer.cc の 254 行で定義されています。
参照先 secondsForThisMove(), と table_ptr.
int osl::game_playing::SearchPlayer::secondsForThisMove | ( | const GameState & | state, | |
int | limit, | |||
int | elapsed, | |||
int | byoyomi, | |||
int | verboseness | |||
) | [static] |
const osl::search::MoveWithComment osl::game_playing::SearchPlayer::selectBestMove | ( | const GameState & | state, | |
int | limit, | |||
int | elapsed, | |||
int | byoyomi | |||
) | [virtual] |
searchWithSecondsForThisMove を呼び出す
osl::game_playing::ComputerPlayerを実装しています。
searchPlayer.cc の 337 行で定義されています。
参照先 assignTime(), と selectBestMoveInTime().
const osl::search::MoveWithComment osl::game_playing::SearchPlayer::selectBestMoveInTime | ( | const GameState & | state, | |
const search::TimeAssigned & | msec | |||
) | [virtual] |
osl::game_playing::ComputerPlayerSelectBestMoveInTimeを実装しています。
searchPlayer.cc の 344 行で定義されています。
参照先 config, osl::Move::DeclareWin(), osl::search::TimeAssigned::max, osl::game_playing::SearchPlayer::Config::next_iteration_coefficient, searchWithSecondsForThisMove(), setNextIterationCoefficient(), osl::search::TimeAssigned::standard, と osl::game_playing::GameState::state().
参照元 selectBestMove().
void osl::game_playing::SearchPlayer::setDepthLimit | ( | int | limit, | |
int | initial_limit, | |||
int | deepening_step | |||
) |
void osl::game_playing::SearchPlayer::setDrawCoef | ( | int | new_value | ) | [inline] |
searchPlayer.h の 87 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::draw_coef.
void osl::game_playing::SearchPlayer::setNextIterationCoefficient | ( | double | new_value | ) |
searchPlayer.cc の 224 行で定義されています。
参照先 config, osl::game_playing::SearchPlayer::Config::next_iteration_coefficient, と searcher.
参照元 search(), と selectBestMoveInTime().
void osl::game_playing::SearchPlayer::setNodeCountHardLimit | ( | size_t | node_limit | ) |
searchPlayer.cc の 201 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::node_count_hard_limit.
void osl::game_playing::SearchPlayer::setNodeLimit | ( | size_t | node_limit | ) |
searchPlayer.cc の 195 行で定義されています。
参照先 config, と osl::game_playing::SearchPlayer::Config::node_limit.
参照元 search().
void osl::game_playing::SearchPlayer::setRootIgnoreMoves | ( | const MoveVector * | rim, | |
bool | prediction | |||
) | [inline] |
searchPlayer.h の 135 行で定義されています。
void osl::game_playing::SearchPlayer::setTableLimit | ( | size_t | size, | |
int | record_limit | |||
) |
void osl::game_playing::SearchPlayer::setTimeAssign | ( | const search::TimeAssigned & | new_assign | ) |
searchPlayer.cc の 361 行で定義されています。
参照先 searcher.
const osl::MilliSeconds::Interval osl::game_playing::SearchPlayer::setUpTable | ( | const GameState & | gs, | |
int | pawn_value | |||
) | [protected] |
searchPlayer.cc の 120 行で定義されています。
参照先 osl::game_playing::HistoryToTable::adjustTable(), osl::BLACK, checkmate_ptr, config, osl::game_playing::GameState::counter(), osl::ctime_r(), osl::game_playing::SearchPlayer::Config::draw_coef, osl::OslConfig::evalRandom(), osl::game_playing::GameState::moveHistory(), pv_history, osl::game_playing::SearchPlayer::Config::save_pv, osl::game_playing::HistoryToTable::setPV(), osl::game_playing::GameState::state(), table_ptr, osl::game_playing::SearchPlayer::Config::table_record_limit, osl::game_playing::SearchPlayer::Config::table_size, osl::game_playing::SearchPlayer::Config::verbose, osl::WHITE, と osl::search::FixedEval::winByLoop().
参照元 osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), と osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove().
void osl::game_playing::SearchPlayer::setVerbose | ( | int | verbose = 1 |
) |
searchPlayer.cc の 216 行で定義されています。
参照先 config, table_ptr, と osl::game_playing::SearchPlayer::Config::verbose.
参照元 search().
const osl::MilliSeconds osl::game_playing::SearchPlayer::startTime | ( | ) | const |
searchPlayer.cc の 369 行で定義されています。
参照先 searcher.
bool osl::game_playing::SearchPlayer::stopSearchNow | ( | ) | [virtual] |
探索をとめる
osl::game_playing::ComputerPlayerを再定義しています。
searchPlayer.cc の 87 行で定義されています。
参照先 osl::ctime_r(), plan_stop, searcher, と searching.
void osl::game_playing::SearchPlayer::swapTable | ( | SearchPlayer & | other | ) |
const search::SimpleHashTable* osl::game_playing::SearchPlayer::table | ( | ) | const [inline] |
boost::shared_ptr<checkmate::DualDfpn> osl::game_playing::SearchPlayer::checkmate_ptr [protected] |
searchPlayer.h の 68 行で定義されています。
参照元 osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::isReasonableMove(), popMove(), pushMove(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove(), と setUpTable().
Config osl::game_playing::SearchPlayer::config [protected] |
volatile bool osl::game_playing::SearchPlayer::plan_stop [protected] |
bool osl::game_playing::SearchPlayer::prediction_for_speculative_search [protected] |
searchPlayer.h の 75 行で定義されています。
参照元 search(), と setRootIgnoreMoves().
boost::scoped_ptr<PVHistory> osl::game_playing::SearchPlayer::pv_history [protected] |
searchPlayer.h の 76 行で定義されています。
参照元 saveSearchResult(), と setUpTable().
boost::scoped_ptr<search::CountRecorder> osl::game_playing::SearchPlayer::recorder_ptr [protected] |
searchPlayer.h の 69 行で定義されています。
参照元 osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::isReasonableMove(), recorder(), resetRecorder(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), と osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove().
const MoveVector* osl::game_playing::SearchPlayer::root_ignore_moves [protected] |
searchPlayer.h の 74 行で定義されています。
参照元 search(), と setRootIgnoreMoves().
boost::scoped_ptr<search::SearchTimer> osl::game_playing::SearchPlayer::searcher [protected] |
searchPlayer.h の 71 行で定義されています。
参照元 osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::isReasonableMove(), search(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove(), setNextIterationCoefficient(), setTimeAssign(), startTime(), と stopSearchNow().
volatile bool osl::game_playing::SearchPlayer::searching [protected] |
searchPlayer.h の 70 行で定義されています。
参照元 canStopSearch(), search(), と stopSearchNow().
boost::shared_ptr<search::SimpleHashTable> osl::game_playing::SearchPlayer::table_ptr [protected] |
searchPlayer.h の 67 行で定義されています。
参照元 assignTime(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::isReasonableMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::isReasonableMove(), popMove(), pushMove(), osl::game_playing::AlphaBeta3OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2OpenMidEndingEvalPlayer::searchWithSecondsForThisMove(), osl::game_playing::AlphaBeta2ProgressEvalPlayer::searchWithSecondsForThisMove(), secondsForThisMove(), setTableLimit(), setUpTable(), setVerbose(), swapTable(), と table().