SimpleHashTable の中に記録するエントリ More...
#include <simpleHashRecord.h>

Public Member Functions | |
| SimpleHashRecord () | |
| void | addNodeCount (size_t diff) |
| void | setAbsoluteValue (Move best_move, int value, int limit) |
| 値を書き込む. More... | |
| void | setBestMove (Move m, int logprob=100) |
| void | setAbsoluteValue (MoveLogProb best_move, int value, int limit) |
| void | setLowerBound (Player P, int limit, const MoveLogProb &best_move, int value) |
| lowerBound の設定. More... | |
| void | setUpperBound (Player P, int limit, const MoveLogProb &best_move, int value) |
| upperBound の設定. More... | |
| int | upperLimit () const |
| upperBound を記録したときのlimit More... | |
| int | upperBound () const |
| 手番のプレイヤからみた評価値の上限 More... | |
| int | lowerLimit () const |
| lowerBound を記録したときのlimit More... | |
| int | lowerBound () const |
| 手番のプレイヤからみた評価値の下限 More... | |
| int | checkmateNodes () const |
| 今までに詰将棋で探したノード数 More... | |
| int | threatmateNodes () const |
| const MoveLogProb | bestMove () const |
| bool | hasUpperBound (int limit) const |
| bool | hasLowerBound (int limit) const |
| bool | hasAbsoluteUpperBound (Player p, int limit) const |
| bool | hasAbsoluteLowerBound (Player p, int limit) const |
| int | absoluteUpperBound (Player p) const |
| int | absoluteLowerBound (Player p) const |
| void | resetValue () |
| template<Player P> | |
| bool | hasGreaterLowerBound (int limit, int threshold, int &val) const |
| high fail するか More... | |
| template<Player P> | |
| bool | hasLesserUpperBound (int limit, int threshold, int &val) const |
| low fail するか More... | |
| const DualThreatmateState & | threatmate () const |
| DualThreatmateState & | threatmate () |
| void | dump (std::ostream &) const |
| size_t | nodeCount () const |
| bool | inCheck () const |
| void | setInCheck (bool new_value) |
Public Attributes | |
| QuiescenceRecord | qrecord |
| 静止探索用 More... | |
Private Member Functions | |
| template<bool PreferLowerBound> | |
| void | makeConsistent (Player P) |
| 上限と下限に矛盾があったら調整する. More... | |
Private Attributes | |
| MoveLogProb | best_move |
| int | upper_bound |
| int | lower_bound |
| signed short | upper_limit |
| signed short | lower_limit |
| unsigned int | search_nodes |
| CAVEAT: 32bit では 100万局面/秒で1時間ちょっと考えると溢れる More... | |
SimpleHashTable の中に記録するエントリ
Definition at line 22 of file simpleHashRecord.h.
|
inline |
Definition at line 36 of file simpleHashRecord.h.
|
inline |
Definition at line 196 of file simpleHashRecord.h.
References osl::BLACK, lowerBound(), and upperBound().
|
inline |
Definition at line 192 of file simpleHashRecord.h.
References osl::BLACK, lowerBound(), and upperBound().
|
inline |
Definition at line 40 of file simpleHashRecord.h.
References qrecord, SCOPED_LOCK_CHAR, and search_nodes.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), and osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively().
|
inline |
Definition at line 169 of file simpleHashRecord.h.
References best_move, qrecord, and SCOPED_LOCK_CHAR.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::SimpleHashTable::getPV(), osl::search::AlphaBeta2Tree< EvalT >::nextMove(), and osl::search::analyzer::DotWriter::showNode().
|
inline |
今までに詰将棋で探したノード数
Definition at line 167 of file simpleHashRecord.h.
References osl::search::QuiescenceRecordBase::checkmate_nodes, and qrecord.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain().
| void osl::search::SimpleHashRecord::dump | ( | std::ostream & | os) | const |
Definition at line 11 of file simpleHashRecord.cc.
References osl::record::csa::show().
Referenced by osl::search::SearchState2Core::abort().
|
inline |
Definition at line 188 of file simpleHashRecord.h.
References osl::BLACK, hasLowerBound(), and hasUpperBound().
|
inline |
Definition at line 184 of file simpleHashRecord.h.
References osl::BLACK, hasLowerBound(), and hasUpperBound().
|
inline |
high fail するか
Definition at line 210 of file simpleHashRecord.h.
References osl::eval::betterThan(), lowerBound(), lowerLimit(), qrecord, and SCOPED_LOCK_CHAR.
Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), and osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves().
|
inline |
low fail するか
Definition at line 223 of file simpleHashRecord.h.
References osl::eval::betterThan(), qrecord, SCOPED_LOCK_CHAR, upperBound(), and upperLimit().
Referenced by osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves().
|
inline |
Definition at line 180 of file simpleHashRecord.h.
References lowerLimit().
Referenced by hasAbsoluteLowerBound(), hasAbsoluteUpperBound(), makeConsistent(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), and setUpperBound().
|
inline |
Definition at line 176 of file simpleHashRecord.h.
References upperLimit().
Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), hasAbsoluteLowerBound(), hasAbsoluteUpperBound(), makeConsistent(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), and setLowerBound().
|
inline |
Definition at line 241 of file simpleHashRecord.h.
References osl::search::DualThreatmateState::flags, osl::search::DualThreatmateState::Flags::is_king_in_check, qrecord, SCOPED_LOCK_CHAR, and osl::search::QuiescenceRecordBase::threatmate.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2Tree< EvalT >::nextMove(), osl::search::AlphaBeta2Tree< EvalT >::quiesce(), osl::search::AlphaBeta2Tree< EvalT >::quiesceRoot(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), osl::search::AlphaBeta2Tree< EvalT >::testThreatmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain(), and osl::search::AlphaBeta2Tree< EvalT >::tryPass().
|
inline |
手番のプレイヤからみた評価値の下限
Definition at line 165 of file simpleHashRecord.h.
References lower_bound.
Referenced by absoluteLowerBound(), absoluteUpperBound(), osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively(), hasGreaterLowerBound(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), and osl::search::analyzer::DotWriter::showNode().
|
inline |
lowerBound を記録したときのlimit
Definition at line 163 of file simpleHashRecord.h.
References lower_limit.
Referenced by osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively(), hasGreaterLowerBound(), hasLowerBound(), and osl::search::analyzer::DotWriter::showNode().
|
inlineprivate |
上限と下限に矛盾があったら調整する.
同じ深さだったら後から来た方を優先しないと,再々探索の結果を記録できない
| PreferLowerBound | 同じ深さだったら lower bound を優先する |
Definition at line 140 of file simpleHashRecord.h.
References osl::eval::betterThan(), hasLowerBound(), hasUpperBound(), lower_bound, lower_limit, upper_bound, and upper_limit.
|
inline |
Definition at line 240 of file simpleHashRecord.h.
References search_nodes.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::testThreatmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmate(), and osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain().
|
inline |
Definition at line 200 of file simpleHashRecord.h.
References lower_limit, qrecord, SCOPED_LOCK_CHAR, and upper_limit.
Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot().
|
inline |
値を書き込む.
詰将棋や千日手対策を想定.
Definition at line 51 of file simpleHashRecord.h.
References osl::Move::isNormal(), limit, lower_bound, lower_limit, qrecord, SCOPED_LOCK_CHAR, upper_bound, and upper_limit.
Referenced by osl::search::SearchBase< EvalT, SimpleHashTable, CountRecorder, RealizationProbability >::recordCheckmateResult().
|
inline |
Definition at line 72 of file simpleHashRecord.h.
References best_move, limit, lower_bound, lower_limit, qrecord, SCOPED_LOCK_CHAR, upper_bound, and upper_limit.
|
inline |
Definition at line 65 of file simpleHashRecord.h.
References osl::search::BestMoves::add(), best_move, osl::search::QuiescenceRecordBase::best_moves, osl::Move::isInvalid(), and qrecord.
Referenced by osl::game_playing::HistoryToTable::setPV().
|
inline |
Definition at line 248 of file simpleHashRecord.h.
References osl::search::DualThreatmateState::flags, osl::search::DualThreatmateState::Flags::is_king_in_check, qrecord, SCOPED_LOCK_CHAR, and osl::search::QuiescenceRecordBase::threatmate.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2< EvalT >::makeMove(), and osl::search::AlphaBeta2Tree< EvalT >::quiesce().
|
inline |
lowerBound の設定.
Definition at line 89 of file simpleHashRecord.h.
References hasUpperBound(), limit, lower_bound, lower_limit, qrecord, SCOPED_LOCK_CHAR, and osl::MoveLogProb::validMove().
Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), and osl::search::AlphaBeta3::searchRoot().
|
inline |
upperBound の設定.
Definition at line 112 of file simpleHashRecord.h.
References best_move, hasLowerBound(), limit, qrecord, SCOPED_LOCK_CHAR, upper_bound, upper_limit, and osl::MoveLogProb::validMove().
|
inline |
Definition at line 235 of file simpleHashRecord.h.
References qrecord, and osl::search::QuiescenceRecordBase::threatmate.
Referenced by osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2< EvalT >::findCheckmateInPV(), osl::search::AlphaBeta2Tree< EvalT >::nextMove(), osl::search::AlphaBeta2Tree< EvalT >::quiesceExp(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), osl::search::AlphaBeta2Tree< EvalT >::showPV(), osl::search::AlphaBeta2Tree< EvalT >::testThreatmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain(), and osl::search::AlphaBeta2Tree< EvalT >::tryPass().
|
inline |
Definition at line 236 of file simpleHashRecord.h.
References qrecord, and osl::search::QuiescenceRecordBase::threatmate.
|
inline |
Definition at line 168 of file simpleHashRecord.h.
References qrecord, and osl::search::QuiescenceRecordBase::threatmate_nodes.
|
inline |
手番のプレイヤからみた評価値の上限
Definition at line 161 of file simpleHashRecord.h.
References upper_bound.
Referenced by absoluteLowerBound(), absoluteUpperBound(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively(), hasLesserUpperBound(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), and osl::search::analyzer::DotWriter::showNode().
|
inline |
upperBound を記録したときのlimit
Definition at line 159 of file simpleHashRecord.h.
References upper_limit.
Referenced by hasLesserUpperBound(), hasUpperBound(), and osl::search::analyzer::DotWriter::showNode().
|
private |
Definition at line 28 of file simpleHashRecord.h.
Referenced by bestMove(), setAbsoluteValue(), setBestMove(), and setUpperBound().
|
private |
Definition at line 30 of file simpleHashRecord.h.
Referenced by lowerBound(), makeConsistent(), setAbsoluteValue(), and setLowerBound().
|
private |
Definition at line 32 of file simpleHashRecord.h.
Referenced by lowerLimit(), makeConsistent(), resetValue(), setAbsoluteValue(), and setLowerBound().
| QuiescenceRecord osl::search::SimpleHashRecord::qrecord |
静止探索用
Definition at line 26 of file simpleHashRecord.h.
Referenced by addNodeCount(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), bestMove(), checkmateNodes(), osl::search::SimpleHashTable::getPV(), hasGreaterLowerBound(), hasLesserUpperBound(), inCheck(), osl::search::qallocate(), qsearch(), osl::search::AlphaBeta2Tree< EvalT >::quiesceExp(), osl::search::AlphaBeta2Tree< EvalT >::quiesceRoot(), resetValue(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), setAbsoluteValue(), setBestMove(), setInCheck(), setLowerBound(), setUpperBound(), osl::search::analyzer::DotWriter::showNodeQuiescence(), osl::search::AlphaBeta2Tree< EvalT >::testThreatmate(), threatmate(), threatmateNodes(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmate(), and osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain().
|
private |
CAVEAT: 32bit では 100万局面/秒で1時間ちょっと考えると溢れる
Definition at line 34 of file simpleHashRecord.h.
Referenced by addNodeCount(), and nodeCount().
|
private |
Definition at line 29 of file simpleHashRecord.h.
Referenced by makeConsistent(), setAbsoluteValue(), setUpperBound(), and upperBound().
|
private |
Definition at line 31 of file simpleHashRecord.h.
Referenced by makeConsistent(), resetValue(), setAbsoluteValue(), setUpperBound(), and upperLimit().
1.8.4