クラス osl::search::SearchState2Core

#include <searchState2.h>

osl::search::SearchState2Coreに対する継承グラフ
Inheritance graph
[凡例]
osl::search::SearchState2Coreのコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

構成

struct  UpdateWrapper
struct  Updator

Public 型

enum  { MaxDepth = 64 }
typedef DualDfpn checkmate_t
typedef FixedCapacityVector
< Move, MaxDepth > 
PVVector

Public メソッド

 SearchState2Core (const NumEffectState &s, checkmate_t &checker)
virtual ~SearchState2Core ()
int curDepth () const
virtual void setState (const NumEffectState &s)
 state のコピーを行う.
void setHistory (const MoveStack &h)
bool hasLastRecord (unsigned int n=0) const
SimpleHashRecordlastRecord (unsigned int n=0)
const SimpleHashRecordlastRecord (unsigned int n=0) const
SimpleHashRecordrootRecord ()
void setCurrentRecord (SimpleHashRecord *r)
void setRootRecord (SimpleHashRecord *root)
void setKillerMove (Move best_move)
void getBigramKillerMoves (MoveVector &moves) const
void getKillerMoves (MoveVector &moves) const
const BigramKillerMovebigramKillerMove () const
void setBigramKillerMove (const BigramKillerMove &killers)
HistoryTablehistoryTable ()
const HistoryTablehistoryTable () const
void pushPass ()
void popPass ()
template<Player P, class Function >
void doUndoMoveOrPass (const HashKey &new_hash, Move move, Function &f)
 まともなdoUndo
void makeMove (Move move)
const Move lastMove (int i=1) const
const MoveStack & history () const
const RecordStack2recordHistory () const
const PathEncodingpath () const
const NumEffectState & state () const
const NumEffectState & rootState () const
void restoreRootState ()
const checkmate_tcheckmateSearcher () const
const RepetitionCounterrepetitionCounter () const
const HashKey & currentHash () const
template<Player P, class Function >
void doUndoMoveLight (Move move, Function &f)
 軽量化版 doUndo 千日手情報や, hash を更新しない
template<Player P>
bool isLosingState (int node_limit)
template<Player P>
bool isWinningState (int node_limit, Move &checkmate_move, bool parallel=false)
template<Player P>
bool isWinningStateShort (int depth, Move &checkmate_move)
 FixedDepthSearcher を呼ぶ.
template<Player P>
bool isThreatmateState (int node_limit, Move &threatmate_move, bool=false)
 P の手番でPの玉に詰めろがかかっているかどうか.
template<Player P>
bool isThreatmateStateShort (int depth, Move &threatmate_move)
bool abort () const
virtual bool abort (Move) const
bool tryThreatmate () const
void makePV (Move m)
void initPV ()
void makePV (PVVector &parent, Move m, PVVector &pv) const
int countCheckAfterThreatmate (Player turn, int depth=1) const
 turn の側が連続王手で詰ろを逃れている回数
int countCheckAfterThreatmateSacrifice (Player turn, int depth=1) const

Static Public メソッド

template<Player P>
static bool isWinningState (checkmate_t &search, NumEffectState &state, const HashKey &key, PathEncoding path, int node_limit, Move &checkmate_move, Move last_move, bool=false)
static bool isWinningState (checkmate_t &search, NumEffectState &state, const HashKey &key, PathEncoding path, int node_limit, Move &checkmate_move, Move last_move, bool parallel=false)

Public 変数

volatile bool stop_tree
 beta cut in parallel search

Static Public 変数

static CArray< int, MaxDepth > depth_node_count_quiesce

Protected 型

enum  NodeType { PvNode = 0, AllNode = 1, CutNode = -1 }

Protected 変数

NumEffectState current_state
NumEffectState root_state
checkmate_tcheckmate_searcher
PathEncoding current_path
MoveStack move_history
int root_depth
RecordStack2 record_stack
RepetitionCounter repetition_counter
boost::shared_ptr
< SearchState2Shared
shared
CArray< PVVector, MaxDepth > pv
CArray< NodeType, MaxDepth > node_type

Private メソッド

void pushBeforeApply (Move move)
 ApplyMoveの前に行うこと.
void updateRepetitionCounterAfterMove (const HashKey &new_hash)
 pushBeforeApply の後,ApplyMoveの中,Functionを呼ぶ前に呼ばれる
void popAfterApply ()
 ApplyMoveの後に行うこと.
void makeMoveHook (Move)

フレンド

class AlphaBeta2ParallelCommon
class Updator

説明

searchState2.h87 行で定義されています。


型定義

osl::search::AlphaBeta2< EvalT >で再定義されています。

searchState2.h95 行で定義されています。

typedef FixedCapacityVector<Move,MaxDepth> osl::search::SearchState2Core::PVVector

searchState2.h114 行で定義されています。


列挙型

anonymous enum
列挙型の値:
MaxDepth 

searchState2.h94 行で定義されています。

列挙型の値:
PvNode 
AllNode 
CutNode 

searchState2.h117 行で定義されています。


コンストラクタとデストラクタ

osl::search::SearchState2Core::SearchState2Core ( const NumEffectState &  s,
checkmate_t checker 
)

searchState2.cc54 行で定義されています。

参照先 hasLastRecord(), と setState().

osl::search::SearchState2Core::~SearchState2Core (  )  [virtual]

searchState2.cc63 行で定義されています。


関数

bool osl::search::SearchState2Core::abort ( Move  best_move  )  const [virtual]
bool osl::search::SearchState2Core::abort (  )  const
const BigramKillerMove& osl::search::SearchState2Core::bigramKillerMove (  )  const [inline]

searchState2.h190 行で定義されています。

const checkmate_t& osl::search::SearchState2Core::checkmateSearcher (  )  const [inline]
int osl::search::SearchState2Core::countCheckAfterThreatmate ( Player  turn,
int  depth = 1 
) const [inline]

turn の側が連続王手で詰ろを逃れている回数

searchState2.h453 行で定義されています。

参照先 osl::search::ThreatmateState::CHECK_AFTER_THREATMATE, depth, と result.

参照元 osl::search::QuiescenceSearch2< EvalT >::searchMain(), と osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain().

int osl::search::SearchState2Core::countCheckAfterThreatmateSacrifice ( Player  turn,
int  depth = 1 
) const [inline]
int osl::search::SearchState2Core::curDepth (  )  const [inline]
const HashKey& osl::search::SearchState2Core::currentHash (  )  const [inline]
template<Player P, class Function >
void osl::search::SearchState2Core::doUndoMoveLight ( Move  move,
Function &  f 
) [inline]
template<Player P, class Function >
void osl::search::SearchState2Core::doUndoMoveOrPass ( const HashKey &  new_hash,
Move  move,
Function &  f 
) [inline]
void osl::search::SearchState2Core::getBigramKillerMoves ( MoveVector &  moves  )  const [inline]

searchState2.h177 行で定義されています。

参照元 osl::search::QuiescenceSearch2< EvalT >::searchMain().

void osl::search::SearchState2Core::getKillerMoves ( MoveVector &  moves  )  const [inline]

searchState2.h185 行で定義されています。

参照元 osl::search::AlphaBeta2Tree< EvalT >::nextMove().

bool osl::search::SearchState2Core::hasLastRecord ( unsigned int  n = 0  )  const [inline]
const MoveStack& osl::search::SearchState2Core::history (  )  const [inline]
const HistoryTable& osl::search::SearchState2Core::historyTable (  )  const [inline]

searchState2.h195 行で定義されています。

HistoryTable& osl::search::SearchState2Core::historyTable (  )  [inline]
void osl::search::SearchState2Core::initPV (  )  [inline]
template<Player P>
bool osl::search::SearchState2Core::isLosingState ( int  node_limit  )  [inline]

searchState2.h322 行で定義されています。

参照先 search_assert.

template<Player P>
bool osl::search::SearchState2Core::isThreatmateState ( int  node_limit,
Move threatmate_move,
bool  = false 
) [inline]

P の手番でPの玉に詰めろがかかっているかどうか.

searchState2.h383 行で定義されています。

参照先 osl::Move::PASS(), と search_assert.

参照元 osl::search::QuiescenceSearch2< EvalT >::staticValue().

template<Player P>
bool osl::search::SearchState2Core::isThreatmateStateShort ( int  depth,
Move threatmate_move 
) [inline]
template<Player P>
bool osl::search::SearchState2Core::isWinningState ( int  node_limit,
Move checkmate_move,
bool  parallel = false 
) [inline]

searchState2.h365 行で定義されています。

参照先 search_assert.

static bool osl::search::SearchState2Core::isWinningState ( checkmate_t search,
NumEffectState &  state,
const HashKey &  key,
PathEncoding  path,
int  node_limit,
Move checkmate_move,
Move  last_move,
bool  parallel = false 
) [inline, static]

searchState2.h352 行で定義されています。

参照先 osl::BLACK.

template<Player P>
static bool osl::search::SearchState2Core::isWinningState ( checkmate_t search,
NumEffectState &  state,
const HashKey &  key,
PathEncoding  path,
int  node_limit,
Move checkmate_move,
Move  last_move,
bool  = false 
) [inline, static]
template<Player P>
bool osl::search::SearchState2Core::isWinningStateShort ( int  depth,
Move checkmate_move 
) [inline]

FixedDepthSearcher を呼ぶ.

searchState2.h373 行で定義されています。

参照先 osl::checkmate::FixedDepthSearcher::hasCheckmateMove().

参照元 osl::search::QuiescenceSearch2< EvalT >::searchMain().

const Move osl::search::SearchState2Core::lastMove ( int  i = 1  )  const [inline]
const SimpleHashRecord* osl::search::SearchState2Core::lastRecord ( unsigned int  n = 0  )  const [inline]

searchState2.h145 行で定義されています。

参照先 osl::search::RecordStack2::lastRecord().

SimpleHashRecord* osl::search::SearchState2Core::lastRecord ( unsigned int  n = 0  )  [inline]
void osl::search::SearchState2Core::makeMove ( Move  move  )  [inline]

osl::search::AlphaBeta2< EvalT >で再定義されています。

searchState2.h286 行で定義されています。

void osl::search::SearchState2Core::makeMoveHook ( Move   )  [private]

searchState2.cc170 行で定義されています。

void osl::search::SearchState2Core::makePV ( PVVector parent,
Move  m,
PVVector pv 
) const

searchState2.cc146 行で定義されています。

参照先 abort(), osl::Move::isPass(), と state().

void osl::search::SearchState2Core::makePV ( Move  m  )  [inline]
const PathEncoding& osl::search::SearchState2Core::path (  )  const [inline]
void osl::search::SearchState2Core::popAfterApply (  )  [inline, private]

ApplyMoveの後に行うこと.

searchState2.h260 行で定義されています。

参照先 osl::RepetitionCounter::pop(), と osl::search::RecordStack2::pop().

void osl::search::SearchState2Core::popPass (  )  [inline]
void osl::search::SearchState2Core::pushBeforeApply ( Move  move  )  [inline, private]

ApplyMoveの前に行うこと.

searchState2.h215 行で定義されています。

参照先 osl::search::RecordStack2::push().

void osl::search::SearchState2Core::pushPass (  )  [inline]
const RecordStack2& osl::search::SearchState2Core::recordHistory (  )  const [inline]

searchState2.h296 行で定義されています。

参照元 osl::search::SearchState2::countSacrificeCheck2().

const RepetitionCounter& osl::search::SearchState2Core::repetitionCounter (  )  const [inline]
void osl::search::SearchState2Core::restoreRootState (  ) 
SimpleHashRecord* osl::search::SearchState2Core::rootRecord (  )  [inline]
const NumEffectState& osl::search::SearchState2Core::rootState (  )  const [inline]

searchState2.h299 行で定義されています。

void osl::search::SearchState2Core::setBigramKillerMove ( const BigramKillerMove killers  ) 

searchState2.cc106 行で定義されています。

参照先 shared.

void osl::search::SearchState2Core::setCurrentRecord ( SimpleHashRecord r  )  [inline]
void osl::search::SearchState2Core::setHistory ( const MoveStack &  h  ) 

searchState2.cc98 行で定義されています。

参照先 current_path, history(), move_history, root_depth, と osl::PathEncoding::turn().

void osl::search::SearchState2Core::setKillerMove ( Move  best_move  )  [inline]
void osl::search::SearchState2Core::setRootRecord ( SimpleHashRecord root  )  [inline]
void osl::search::SearchState2Core::setState ( const NumEffectState &  s  )  [virtual]

state のコピーを行う.

this->state は探索終了後も保存されるが,探索中に exception が起こると 破壊されている

osl::search::SearchState2で再定義されています。

searchState2.cc68 行で定義されています。

参照先 restoreRootState(), root_state, と shared.

参照元 SearchState2Core().

const NumEffectState& osl::search::SearchState2Core::state (  )  const [inline]

searchState2.h298 行で定義されています。

参照元 abort(), osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearch(), osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively(), osl::search::QuiescenceSearch2< EvalT >::currentState(), osl::search::QuiescenceSearch2< EvalT >::currentValueWithLastThreat(), osl::search::QuiescenceSearch2< EvalT >::examineCapture(), osl::search::QuiescenceSearch2< EvalT >::examineMoves(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), osl::search::AlphaBeta2< EvalT >::findCheckmateInPV(), osl::search::MoveGenerator::generateAll(), osl::search::QuiescenceSearch2< EvalT >::generateAndExamineTakeBack2(), osl::search::MoveGenerator::generateBreakThreatmate(), osl::search::MoveGenerator::generateCapture(), osl::search::MoveGenerator::generateKingEscape(), osl::search::MoveGenerator::generateTakeBack(), osl::search::MoveGenerator::generateTesuji(), osl::search::AlphaBeta2< EvalT >::makeMove(), makePV(), osl::search::AlphaBeta2Tree< EvalT >::nextMove(), osl::search::AlphaBeta2Tree< EvalT >::quiesce(), osl::search::AlphaBeta2Tree< EvalT >::quiesceRoot(), osl::search::QuiescenceSearch2< EvalT >::search(), osl::search::AlphaBeta2Tree< EvalT >::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchIteratively(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::AlphaBeta2Tree< EvalT >::showPV(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::search::QuiescenceSearch2< EvalT >::takeBackOrChase(), osl::search::QuiescenceSearch2< EvalT >::takeBackValue(), osl::search::AlphaBeta2Tree< EvalT >::testThreatmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmate(), osl::search::AlphaBeta2Tree< EvalT >::tryCheckmateAgain(), と osl::search::AlphaBeta2Tree< EvalT >::updateRootPV().

bool osl::search::SearchState2Core::tryThreatmate (  )  const [inline]
void osl::search::SearchState2Core::updateRepetitionCounterAfterMove ( const HashKey &  new_hash  )  [inline, private]

pushBeforeApply の後,ApplyMoveの中,Functionを呼ぶ前に呼ばれる

searchState2.h253 行で定義されています。

参照先 osl::RepetitionCounter::push().


フレンドと関連する関数

friend class AlphaBeta2ParallelCommon [friend]

searchState2.h92 行で定義されています。

friend class Updator [friend]

searchState2.h249 行で定義されています。


変数

searchState2.h106 行で定義されています。

参照元 restoreRootState(), と setHistory().

searchState2.h97 行で定義されています。

参照元 restoreRootState().

osl::CArray< int, osl::search::SearchState2Core::MaxDepth > osl::search::SearchState2Core::depth_node_count_quiesce [static]

searchState2.h107 行で定義されています。

参照元 restoreRootState(), と setHistory().

CArray<NodeType,MaxDepth> osl::search::SearchState2Core::node_type [protected]
CArray<PVVector,MaxDepth> osl::search::SearchState2Core::pv [protected]

searchState2.h110 行で定義されています。

参照元 abort(), と restoreRootState().

searchState2.h108 行で定義されています。

参照元 restoreRootState(), と setHistory().

NumEffectState osl::search::SearchState2Core::root_state [protected]

searchState2.h97 行で定義されています。

参照元 restoreRootState(), と setState().

osl::search::AlphaBeta2Tree< EvalT >で再定義されています。

searchState2.h112 行で定義されています。

参照元 setBigramKillerMove(), と setState().

beta cut in parallel search

searchState2.h121 行で定義されています。

参照元 osl::search::AlphaBeta2Tree< EvalT >::stopping(), と osl::search::AlphaBeta2Tree< EvalT >::testStop().


このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義
Sun May 16 09:58:56 2010に生成されました。  doxygen 1.6.3