recorder of MTDF/AlphaBeta More...
#include <searchRecorder.h>
Public Member Functions | |
CountRecorder () | |
以下を定義すると詰将棋に入った時の局面を別ファイルに保存する | |
virtual | ~CountRecorder () |
void | addNodeCount (int count=1) |
探索の途中終了で使えるように必ず数える | |
void | addQuiescenceCount (int count=1) |
void | addCheckmateCount (int count=1) |
void | setCheckmateCount (int count) |
void | resetNodeCount () |
size_t | nodeCount () const |
size_t | quiescenceCount () const |
size_t | checkmateCount () const |
size_t | searchNodeCount () const |
size_t | allNodeCount () const |
double | checkmateRatio () const |
void | tryMove (const MoveLogProb &, int, int) const |
recordValue とセットで呼ぶ | |
void | retryMove (const MoveLogProb &, int, int, int) const |
recordValue とセットで呼ぶ | |
void | recordValue (const MoveLogProb &, int, bool, int) const |
tryMove とセットで呼ぶ | |
void | recordTopLevelLowFail (const MoveLogProb &, int) const |
主に数の記録用 | |
void | recordTopLevelHighFail (const MoveLogProb &, int) const |
void | tableHitLowerBound (Player, int, int, int) const |
void | tableHitUpperBound (Player, int, int, int) const |
void | tableStoreLowerBound (Player, const MoveLogProb &, int, int) const |
void | tableStoreUpperBound (Player, const MoveLogProb &, int, int) const |
void | startSearch (int) const |
virtual void | finishSearch (Move best, double seconds_consumed, bool verbose) const |
これは遅くても気にしない | |
void | recordInvalidMoveInTable (const state::SimpleState &, const MoveLogProb &, int limit) const |
void | newCategory (const char *, int) const |
void | gotoCheckmateSearch (const state::SimpleState &, int) const |
詰将棋無限ループ発見用 | |
void | backFromCheckmateSearch () const |
void | reportCount (std::ostream &, double seconds) const |
void | reportCount (std::ostream &) const |
Private Attributes | |
size_t | node_count |
size_t | quiescence_count |
size_t | checkmate_count |
recorder of MTDF/AlphaBeta
destructor はvirtualにすることで管理を容易にする. method はvirtualに*しない*ことで,キャストしたら上位クラスとして 振る舞うようにする.
Definition at line 27 of file searchRecorder.h.
以下を定義すると詰将棋に入った時の局面を別ファイルに保存する
Definition at line 28 of file searchRecorder.cc.
osl::search::CountRecorder::~CountRecorder | ( | ) | [virtual] |
Definition at line 33 of file searchRecorder.cc.
void osl::search::CountRecorder::addCheckmateCount | ( | int | count = 1 | ) | [inline] |
Definition at line 52 of file searchRecorder.h.
References checkmate_count, count, and SCOPED_LOCK.
void osl::search::CountRecorder::addNodeCount | ( | int | count = 1 | ) | [inline] |
探索の途中終了で使えるように必ず数える
Definition at line 40 of file searchRecorder.h.
References count, node_count, and SCOPED_LOCK.
void osl::search::CountRecorder::addQuiescenceCount | ( | int | count = 1 | ) | [inline] |
Definition at line 46 of file searchRecorder.h.
References count, quiescence_count, and SCOPED_LOCK.
size_t osl::search::CountRecorder::allNodeCount | ( | ) | const [inline] |
Definition at line 91 of file searchRecorder.h.
References checkmate_count, node_count, quiescence_count, and SCOPED_LOCK.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::testStop().
void osl::search::CountRecorder::backFromCheckmateSearch | ( | ) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 134 of file searchRecorder.h.
size_t osl::search::CountRecorder::checkmateCount | ( | ) | const [inline] |
Definition at line 78 of file searchRecorder.h.
References checkmate_count, and SCOPED_LOCK.
Referenced by checkmateRatio().
double osl::search::CountRecorder::checkmateRatio | ( | ) | const [inline] |
Definition at line 97 of file searchRecorder.h.
References checkmateCount(), search(), and searchNodeCount().
void osl::search::CountRecorder::finishSearch | ( | Move | best, |
double | seconds_consumed, | ||
bool | verbose | ||
) | const [virtual] |
これは遅くても気にしない
Reimplemented in osl::search::SearchRecorder.
Definition at line 52 of file searchRecorder.cc.
Referenced by osl::search::SearchRecorder::finishSearch().
void osl::search::CountRecorder::gotoCheckmateSearch | ( | const state::SimpleState & | , |
int | |||
) | const [inline] |
詰将棋無限ループ発見用
Reimplemented in osl::search::SearchRecorder.
Definition at line 133 of file searchRecorder.h.
void osl::search::CountRecorder::newCategory | ( | const char * | , |
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 130 of file searchRecorder.h.
size_t osl::search::CountRecorder::nodeCount | ( | ) | const [inline] |
Definition at line 66 of file searchRecorder.h.
References node_count, and SCOPED_LOCK.
size_t osl::search::CountRecorder::quiescenceCount | ( | ) | const [inline] |
Definition at line 72 of file searchRecorder.h.
References quiescence_count, and SCOPED_LOCK.
void osl::search::CountRecorder::recordInvalidMoveInTable | ( | const state::SimpleState & | , |
const MoveLogProb & | , | ||
int | limit | ||
) | const |
Definition at line 38 of file searchRecorder.cc.
References osl::MoveLogProb::logProb(), and osl::MoveLogProb::move().
void osl::search::CountRecorder::recordTopLevelHighFail | ( | const MoveLogProb & | , |
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 114 of file searchRecorder.h.
void osl::search::CountRecorder::recordTopLevelLowFail | ( | const MoveLogProb & | , |
int | |||
) | const [inline] |
主に数の記録用
Reimplemented in osl::search::SearchRecorder.
Definition at line 113 of file searchRecorder.h.
void osl::search::CountRecorder::recordValue | ( | const MoveLogProb & | , |
int | , | ||
bool | , | ||
int | |||
) | const [inline] |
tryMove とセットで呼ぶ
Reimplemented in osl::search::SearchRecorder.
Definition at line 109 of file searchRecorder.h.
Referenced by osl::search::SearchRecorder::recordValue().
void osl::search::CountRecorder::reportCount | ( | std::ostream & | os, |
double | seconds | ||
) | const |
Definition at line 68 of file searchRecorder.cc.
void osl::search::CountRecorder::reportCount | ( | std::ostream & | os | ) | const |
Definition at line 60 of file searchRecorder.cc.
Definition at line 46 of file searchRecorder.cc.
void osl::search::CountRecorder::retryMove | ( | const MoveLogProb & | , |
int | , | ||
int | , | ||
int | |||
) | const [inline] |
recordValue とセットで呼ぶ
Reimplemented in osl::search::SearchRecorder.
Definition at line 106 of file searchRecorder.h.
size_t osl::search::CountRecorder::searchNodeCount | ( | ) | const [inline] |
Definition at line 84 of file searchRecorder.h.
References node_count, quiescence_count, and SCOPED_LOCK.
Referenced by checkmateRatio().
void osl::search::CountRecorder::setCheckmateCount | ( | int | count | ) | [inline] |
Definition at line 58 of file searchRecorder.h.
References checkmate_count, count, and SCOPED_LOCK.
void osl::search::CountRecorder::startSearch | ( | int | ) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 123 of file searchRecorder.h.
Referenced by osl::search::SearchRecorder::startSearch().
void osl::search::CountRecorder::tableHitLowerBound | ( | Player | , |
int | , | ||
int | , | ||
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 116 of file searchRecorder.h.
void osl::search::CountRecorder::tableHitUpperBound | ( | Player | , |
int | , | ||
int | , | ||
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 117 of file searchRecorder.h.
void osl::search::CountRecorder::tableStoreLowerBound | ( | Player | , |
const MoveLogProb & | , | ||
int | , | ||
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 119 of file searchRecorder.h.
void osl::search::CountRecorder::tableStoreUpperBound | ( | Player | , |
const MoveLogProb & | , | ||
int | , | ||
int | |||
) | const [inline] |
Reimplemented in osl::search::SearchRecorder.
Definition at line 120 of file searchRecorder.h.
void osl::search::CountRecorder::tryMove | ( | const MoveLogProb & | , |
int | , | ||
int | |||
) | const [inline] |
recordValue とセットで呼ぶ
Reimplemented in osl::search::SearchRecorder.
Definition at line 104 of file searchRecorder.h.
size_t osl::search::CountRecorder::checkmate_count [private] |
Definition at line 31 of file searchRecorder.h.
Referenced by addCheckmateCount(), allNodeCount(), checkmateCount(), and setCheckmateCount().
size_t osl::search::CountRecorder::node_count [private] |
Definition at line 29 of file searchRecorder.h.
Referenced by addNodeCount(), allNodeCount(), nodeCount(), and searchNodeCount().
size_t osl::search::CountRecorder::quiescence_count [private] |
Definition at line 30 of file searchRecorder.h.
Referenced by addQuiescenceCount(), allNodeCount(), quiescenceCount(), and searchNodeCount().