osl::search::QuiescenceRecord Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Friends | List of all members
osl::search::QuiescenceRecord Class Reference

QuiescenceSearch で表に保存するデータ More...

`#include <quiescenceRecord.h>`

Inheritance diagram for osl::search::QuiescenceRecord:
[legend]
Collaboration diagram for osl::search::QuiescenceRecord:
[legend]

## Public Member Functions
| QuiescenceRecord ()
| QuiescenceRecord (const QuiescenceRecord &src)
| copy constructor: copy everything except for mutex More...
QuiescenceRecord & | operator= (const QuiescenceRecord &src)
template<Player Turn>
const Square8 | sendOffSquare (const NumEffectState &state) const
const Square8 | sendOffSquare (Player turn, const NumEffectState &state) const
int | checkmateNodesLeft (int max)
int | threatmateNodesLeft (int max)
int | checkmateNodes () const
| 今までに詰将棋で探したノード数 More...
int | threatmateNodes () const
void | clear ()
void | setStaticValue (StaticValueType type, int value, int depth, const QuiescenceThreat &t1=QuiescenceThreat(), const QuiescenceThreat &t2=QuiescenceThreat())
void | setLowerBound (int depth, int bound, Move best_move)
void | setUpperBound (int depth, int bound)
void | setHistoryValue (int value)
void | setHistoryValue (Move best_move, int value)
void | addKillerMoves (const MoveVector &new_moves)
StaticValueType | staticValueType () const
bool | hasStaticValue () const
bool | hasStaticValue (int &value, int &depth, StaticValueType &type) const
int | staticValue () const
int | staticValueDepth () const
int | upperDepth () const
int | lowerDepth () const
int | upperBound () const
int | lowerBound () const
const Move | bestMove () const
int | movesEmpty () const
int | movesSizeLessThan (size_t n) const
int | moves_size () const
void | loadMoves (MoveVector &dst) const
void | dump (std::ostream &) const
const QuiescenceThreat | staticThreat (int index) const
void | updateThreatmate (Player turn, const DualThreatmateState *parent, bool in_check)

## Static Public Member Functions
static const char * | toString (StaticValueType)

## Friends
class | SimpleHashRecord

## Additional Inherited Members
Public Types inherited from osl::search::QuiescenceRecordBase
enum | { InitialDepth = -128 }
| 使えない深さ. More...
enum | StaticValueType { UNKNOWN, UPPER_BOUND, EXACT }
Public Attributes inherited from osl::search::QuiescenceRecordBase
int | upper_bound
int | lower_bound
BestMoves | best_moves
QuiescenceThreat | threat1
| static_value への脅威 More...
QuiescenceThreat | threat2
int | static_value
int | checkmate_nodes
DualThreatmateState | threatmate
int | threatmate_nodes
int8_t | upper_depth
| upper_bound, lower_bound, static_value を探索した深さ More...
int8_t | lower_depth
int8_t | static_value_depth
Protected Member Functions inherited from osl::search::QuiescenceRecordBase
| QuiescenceRecordBase ()
| ~QuiescenceRecordBase ()

## Detailed Description

QuiescenceSearch で表に保存するデータ

Definition at line 137 of file quiescenceRecord.h.

## Constructor & Destructor Documentation

osl::search::QuiescenceRecord::QuiescenceRecord | ( | ) |  |
| inline

Definition at line 147 of file quiescenceRecord.h.

osl::search::QuiescenceRecord::QuiescenceRecord | ( | const QuiescenceRecord & | src) |  |
| inline

copy constructor: copy everything except for mutex

Definition at line 153 of file quiescenceRecord.h.

## Member Function Documentation

void osl::search::QuiescenceRecord::addKillerMoves | ( | const MoveVector & | new_moves) |  |
| inline

Definition at line 293 of file quiescenceRecord.h.

References osl::search::BestMoves::addSecondary(), osl::search::QuiescenceRecordBase::best_moves, and SCOPED_LOCK_CHAR.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

const Move osl::search::QuiescenceRecord::bestMove | ( | ) |  | const
| inline

Definition at line 322 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves.

Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::SimpleHashTable::getPV(), qsearch(), osl::search::AlphaBeta2Tree< EvalT >::quiesceRoot(), and osl::search::QuiescenceSearch2< EvalT >::searchMain().

int osl::search::QuiescenceRecord::checkmateNodes | ( | ) |  | const
| inline

今までに詰将棋で探したノード数

Definition at line 224 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::checkmate_nodes.

int osl::search::QuiescenceRecord::checkmateNodesLeft | ( | int | max) |  |
| inline

Parameters

  max | このrecordで使って良いノード数

Returns
  詰将棋に使えるノード数を返す

Definition at line 193 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::checkmate_nodes, osl::eval::max(), and SCOPED_LOCK_CHAR.

Referenced by osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmate(), and osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain().

void osl::search::QuiescenceRecord::clear | ( | ) |  |
| inline

Definition at line 227 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves, osl::search::BestMoves::clear(), osl::search::QuiescenceRecordBase::InitialDepth, osl::search::QuiescenceRecordBase::lower_depth, SCOPED_LOCK_CHAR, osl::search::QuiescenceRecordBase::static_value_depth, and osl::search::QuiescenceRecordBase::upper_depth.

void osl::search::QuiescenceRecord::dump | ( | std::ostream & | os) |  | const

Definition at line 12 of file quiescenceRecord.cc.

References osl::record::csa::show().

Referenced by osl::search::QuiescenceLog::pushMove().

bool osl::search::QuiescenceRecord::hasStaticValue | ( | ) |  | const
| inline

Definition at line 303 of file quiescenceRecord.h.

References staticValueType(), and osl::search::QuiescenceRecordBase::UNKNOWN.

Referenced by osl::search::QuiescenceSearch2< EvalT >::staticValue(), and staticValue().

bool osl::search::QuiescenceRecord::hasStaticValue | ( | int & | value,
|  | int & | depth,
|  | StaticValueType & | type
| ) |  | const
| inline

Definition at line 304 of file quiescenceRecord.h.

References SCOPED_LOCK_CHAR, osl::search::QuiescenceRecordBase::static_value, osl::search::QuiescenceRecordBase::static_value_depth, staticValueType(), and osl::search::QuiescenceRecordBase::UNKNOWN.

void osl::search::QuiescenceRecord::loadMoves | ( | MoveVector & | dst) |  | const
| inline

Definition at line 330 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves, osl::search::BestMoves::capacity(), and SCOPED_LOCK_CHAR.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

int osl::search::QuiescenceRecord::lowerBound | ( | ) |  | const
| inline

Definition at line 321 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::lower_bound.

Referenced by osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), and osl::search::analyzer::DotWriter::showNodeQuiescence().

int osl::search::QuiescenceRecord::lowerDepth | ( | ) |  | const
| inline

Definition at line 319 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::lower_depth.

Referenced by osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), and osl::search::analyzer::DotWriter::showNodeQuiescence().

int osl::search::QuiescenceRecord::moves_size | ( | ) |  | const
| inline

Definition at line 327 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves, osl::eval::max(), and osl::search::BestMoves::sizeFilled().

int osl::search::QuiescenceRecord::movesEmpty | ( | ) |  | const
| inline

Definition at line 323 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

int osl::search::QuiescenceRecord::movesSizeLessThan | ( | size_t | n) |  | const
| inline

Definition at line 324 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::best_moves, and osl::search::BestMoves::capacity().

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

QuiescenceRecord& osl::search::QuiescenceRecord::operator= | ( | const QuiescenceRecord & | src) |  |
| inline

Definition at line 157 of file quiescenceRecord.h.

template<Player Turn>

const Square8 osl::search::QuiescenceRecord::sendOffSquare | ( | const NumEffectState & | state) |  | const
| inline

Definition at line 167 of file quiescenceRecord.h.

References osl::alt(), SCOPED_LOCK_CHAR, osl::search::DualThreatmateState::sendoffs, and osl::search::QuiescenceRecordBase::threatmate.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

const Square8 osl::search::QuiescenceRecord::sendOffSquare | ( | Player | turn,
|  | const NumEffectState & | state
| ) |  | const
| inline

Definition at line 182 of file quiescenceRecord.h.

References osl::BLACK.

void osl::search::QuiescenceRecord::setHistoryValue | ( | int | value) |  |
| inline

Definition at line 279 of file quiescenceRecord.h.

References osl::search::QSearchTraits::HistorySpecialDepth, osl::search::QuiescenceRecordBase::lower_bound, osl::search::QuiescenceRecordBase::lower_depth, osl::search::QuiescenceRecordBase::upper_bound, and osl::search::QuiescenceRecordBase::upper_depth.

Referenced by setHistoryValue().

void osl::search::QuiescenceRecord::setHistoryValue | ( | Move | best_move,
|  | int | value
| ) |  |
| inline

Definition at line 284 of file quiescenceRecord.h.

References osl::search::BestMoves::add(), osl::search::QuiescenceRecordBase::best_moves, SCOPED_LOCK_CHAR, and setHistoryValue().

void osl::search::QuiescenceRecord::setLowerBound | ( | int | depth,
|  | int | bound,
|  | Move | best_move
| ) |  |
| inline

Definition at line 252 of file quiescenceRecord.h.

References osl::search::BestMoves::add(), osl::search::QuiescenceRecordBase::best_moves, osl::search::QSearchTraits::CheckmateSpecialDepth, depth, osl::search::QuiescenceRecordBase::lower_bound, osl::search::QuiescenceRecordBase::lower_depth, osl::search::QSearchTraits::MaxDepth, and SCOPED_LOCK_CHAR.

Referenced by osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::AlphaBeta2Tree< EvalT >::quiesceExp(), and osl::search::QuiescenceSearch2< EvalT >::searchMain().

void osl::search::QuiescenceRecord::setStaticValue | ( | StaticValueType | type,
|  | int | value,
|  | int | depth,
|  | const QuiescenceThreat & | t1 = `QuiescenceThreat()`,
|  | const QuiescenceThreat & | t2 = `QuiescenceThreat()`
| ) |  |
| inline

Definition at line 235 of file quiescenceRecord.h.

References osl::search::QSearchTraits::CheckmateSpecialDepth, depth, osl::search::DualThreatmateState::flags, osl::search::QSearchTraits::MaxDepth, SCOPED_LOCK_CHAR, osl::search::QuiescenceRecordBase::static_value, osl::search::QuiescenceRecordBase::static_value_depth, osl::search::DualThreatmateState::Flags::static_value_type, osl::search::QuiescenceRecordBase::threat1, osl::search::QuiescenceRecordBase::threat2, and osl::search::QuiescenceRecordBase::threatmate.

Referenced by osl::search::QuiescenceSearch2< EvalT >::staticValue().

void osl::search::QuiescenceRecord::setUpperBound | ( | int | depth,
|  | int | bound
| ) |  |
| inline

Definition at line 266 of file quiescenceRecord.h.

References osl::search::QSearchTraits::CheckmateSpecialDepth, depth, osl::search::QSearchTraits::MaxDepth, SCOPED_LOCK_CHAR, osl::search::QuiescenceRecordBase::upper_bound, and osl::search::QuiescenceRecordBase::upper_depth.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain().

const QuiescenceThreat osl::search::QuiescenceRecord::staticThreat | ( | int | index) |  | const
| inline

Definition at line 339 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::threat1, and osl::search::QuiescenceRecordBase::threat2.

int osl::search::QuiescenceRecord::staticValue | ( | ) |  | const
| inline

Definition at line 316 of file quiescenceRecord.h.

References hasStaticValue(), and osl::search::QuiescenceRecordBase::static_value.

int osl::search::QuiescenceRecord::staticValueDepth | ( | ) |  | const
| inline

Definition at line 317 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::static_value_depth.

StaticValueType osl::search::QuiescenceRecord::staticValueType | ( | ) |  | const
| inline

Definition at line 300 of file quiescenceRecord.h.

References osl::search::DualThreatmateState::flags, osl::search::DualThreatmateState::Flags::static_value_type, and osl::search::QuiescenceRecordBase::threatmate.

Referenced by hasStaticValue().

int osl::search::QuiescenceRecord::threatmateNodes | ( | ) |  | const
| inline

Definition at line 225 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::threatmate_nodes.

Referenced by osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves().

int osl::search::QuiescenceRecord::threatmateNodesLeft | ( | int | max) |  |
| inline

Parameters

  max | このrecordで使って良いノード数

Returns
  詰めろ確認の詰将棋に使えるノード数を返す

Definition at line 210 of file quiescenceRecord.h.

References osl::eval::max(), SCOPED_LOCK_CHAR, and osl::search::QuiescenceRecordBase::threatmate_nodes.

Referenced by osl::search::QuiescenceSearch2< EvalT >::staticValue(), and osl::search::AlphaBeta2Tree< EvalT >::testThreatmate().

const char * osl::search::QuiescenceRecord::toString | ( | StaticValueType | type) |  |
| static

Definition at line 44 of file quiescenceRecord.cc.

void osl::search::QuiescenceRecord::updateThreatmate | ( | Player | turn,
|  | const DualThreatmateState * | parent,
|  | bool | in_check
| ) |  |
| inline

Definition at line 343 of file quiescenceRecord.h.

References SCOPED_LOCK_CHAR, osl::search::QuiescenceRecordBase::threatmate, and osl::search::DualThreatmateState::updateInLock().

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchInternal().

int osl::search::QuiescenceRecord::upperBound | ( | ) |  | const
| inline

Definition at line 320 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::upper_bound.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain(), and osl::search::analyzer::DotWriter::showNodeQuiescence().

int osl::search::QuiescenceRecord::upperDepth | ( | ) |  | const
| inline

Definition at line 318 of file quiescenceRecord.h.

References osl::search::QuiescenceRecordBase::upper_depth.

Referenced by osl::search::QuiescenceSearch2< EvalT >::searchMain(), and osl::search::analyzer::DotWriter::showNodeQuiescence().

## Friends And Related Function Documentation

friend class SimpleHashRecord
| friend

Definition at line 350 of file quiescenceRecord.h.

The documentation for this class was generated from the following files:

- quiescenceRecord.h
- quiescenceRecord.cc