All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
osl::search::SimpleHashRecord Class Reference

SimpleHashTable の中に記録するエントリ More...

#include <simpleHashRecord.h>

Collaboration diagram for osl::search::SimpleHashRecord:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimpleHashRecord ()
void addNodeCount (size_t diff)
void setAbsoluteValue (Move best_move, int value, int limit)
 値を書き込む.
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 の設定.
void setUpperBound (Player P, int limit, const MoveLogProb &best_move, int value)
 upperBound の設定.
int upperLimit () const
 upperBound を記録したときのlimit
int upperBound () const
 手番のプレイヤからみた評価値の上限
int lowerLimit () const
 lowerBound を記録したときのlimit
int lowerBound () const
 手番のプレイヤからみた評価値の下限
int checkmateNodes () const
 今までに詰将棋で探したノード数
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 するか
template<Player P>
bool hasLesserUpperBound (int limit, int threshold, int &val) const
 low fail するか
const DualThreatmateStatethreatmate () const
DualThreatmateStatethreatmate ()
void dump (std::ostream &) const
size_t nodeCount () const
bool inCheck () const
void setInCheck (bool new_value)

Public Attributes

QuiescenceRecord qrecord
 静止探索用

Private Member Functions

template<bool PreferLowerBound>
void makeConsistent (Player P)
 上限と下限に矛盾があったら調整する.

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時間ちょっと考えると溢れる

Detailed Description

SimpleHashTable の中に記録するエントリ

Definition at line 22 of file simpleHashRecord.h.


Constructor & Destructor Documentation

Definition at line 36 of file simpleHashRecord.h.


Member Function Documentation

Definition at line 196 of file simpleHashRecord.h.

References osl::BLACK, lowerBound(), and upperBound().

Definition at line 192 of file simpleHashRecord.h.

References osl::BLACK, lowerBound(), and upperBound().

void osl::search::SimpleHashRecord::addNodeCount ( size_t  diff) [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().

bool osl::search::SimpleHashRecord::hasAbsoluteLowerBound ( Player  p,
int  limit 
) const [inline]

Definition at line 188 of file simpleHashRecord.h.

References osl::BLACK, hasLowerBound(), and hasUpperBound().

bool osl::search::SimpleHashRecord::hasAbsoluteUpperBound ( Player  p,
int  limit 
) const [inline]

Definition at line 184 of file simpleHashRecord.h.

References osl::BLACK, hasLowerBound(), and hasUpperBound().

template<Player P>
bool osl::search::SimpleHashRecord::hasGreaterLowerBound ( int  limit,
int  threshold,
int &  val 
) const [inline]
template<Player P>
bool osl::search::SimpleHashRecord::hasLesserUpperBound ( int  limit,
int  threshold,
int &  val 
) const [inline]
bool osl::search::SimpleHashRecord::hasLowerBound ( int  limit) const [inline]
bool osl::search::SimpleHashRecord::hasUpperBound ( int  limit) const [inline]
bool osl::search::SimpleHashRecord::inCheck ( ) const [inline]
template<bool PreferLowerBound>
void osl::search::SimpleHashRecord::makeConsistent ( Player  P) [inline, private]

上限と下限に矛盾があったら調整する.

同じ深さだったら後から来た方を優先しないと,再々探索の結果を記録できない

Parameters:
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.

size_t osl::search::SimpleHashRecord::nodeCount ( ) const [inline]
void osl::search::SimpleHashRecord::setAbsoluteValue ( Move  best_move,
int  value,
int  limit 
) [inline]
void osl::search::SimpleHashRecord::setAbsoluteValue ( MoveLogProb  best_move,
int  value,
int  limit 
) [inline]
void osl::search::SimpleHashRecord::setBestMove ( Move  m,
int  logprob = 100 
) [inline]
void osl::search::SimpleHashRecord::setInCheck ( bool  new_value) [inline]
void osl::search::SimpleHashRecord::setLowerBound ( Player  P,
int  limit,
const MoveLogProb best_move,
int  value 
) [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().

void osl::search::SimpleHashRecord::setUpperBound ( Player  P,
int  limit,
const MoveLogProb best_move,
int  value 
) [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().

Definition at line 236 of file simpleHashRecord.h.

References qrecord, and osl::search::QuiescenceRecordBase::threatmate.

upperBound を記録したときのlimit

Definition at line 159 of file simpleHashRecord.h.

References upper_limit.

Referenced by hasLesserUpperBound(), hasUpperBound(), and osl::search::analyzer::DotWriter::showNode().


Member Data Documentation

Definition at line 28 of file simpleHashRecord.h.

Referenced by bestMove(), setAbsoluteValue(), setBestMove(), and setUpperBound().

Definition at line 30 of file simpleHashRecord.h.

Referenced by lowerBound(), makeConsistent(), setAbsoluteValue(), and setLowerBound().

CAVEAT: 32bit では 100万局面/秒で1時間ちょっと考えると溢れる

Definition at line 34 of file simpleHashRecord.h.

Referenced by addNodeCount(), and nodeCount().

Definition at line 29 of file simpleHashRecord.h.

Referenced by makeConsistent(), setAbsoluteValue(), setUpperBound(), and upperBound().


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