#include <searchState2.h>
Public 型 | |
enum | { MaxDepth = 64 } |
typedef DualCheckmateSearcher | checkmate_t |
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 |
SimpleHashRecord * | lastRecord (unsigned int n=0) |
const SimpleHashRecord * | lastRecord (unsigned int n=0) const |
SimpleHashRecord * | rootRecord () |
void | setCurrentRecord (SimpleHashRecord *r) |
void | setRootRecord (SimpleHashRecord *root) |
void | setKillerMove (Move best_move) |
void | getBigramKillerMoves (MoveVector &moves) const |
void | getKillerMoves (MoveVector &moves) const |
const BigramKillerMove & | bigramKillerMove () const |
void | setBigramKillerMove (const BigramKillerMove &killers) |
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 RecordStack2 & | recordHistory () const |
const PathEncoding & | path () const |
const NumEffectState & | state () const |
const checkmate_t & | checkmateSearcher () const |
const RepetitionCounter & | repetitionCounter () 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, AttackOracleAges &age) |
template<Player P> | |
bool | isWinningStateShort (int depth, Move &checkmate_move) |
FixedDepthSearcher Ƥ | |
template<Player P> | |
bool | isThreatmateState (int node_limit, Move &threatmate_move, AttackOracleAges &age) |
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 () |
int | countCheckAfterThreatmate (Player turn, int depth=1) const |
turn ¦Ϣ³ǵͤƨƤ | |
int | countCheckAfterThreatmateSacrifice (Player turn, int depth=1) const |
Static Public メソッド | |
static void | makePV (PVVector &parent, Move m, PVVector &pv) |
Public 変数 | |
volatile bool | stop |
Static Public 変数 | |
static CArray< int, MaxDepth > | depth_node_count_quiesce |
Protected 型 | |
enum | NodeType { PvNode = 0, AllNode = 1, CutNode = -1 } |
typedef FixedCapacityVector < Move, MaxDepth > | PVVector |
Protected 変数 | |
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θ˹Ԥ | |
Private 変数 | |
NumEffectState | current_state |
checkmate_t * | checkmate_searcher |
PathEncoding | current_path |
MoveStack | move_history |
int | root_depth |
フレンド | |
class | AlphaBeta2Parallel |
class | Updator |
構成 | |
struct | UpdateWrapper |
struct | Updator |
searchState2.h の 85 行で定義されています。
searchState2.h の 90 行で定義されています。
typedef FixedCapacityVector<Move,MaxDepth> osl::search::SearchState2Core::PVVector [protected] |
searchState2.h の 108 行で定義されています。
anonymous enum |
enum osl::search::SearchState2Core::NodeType [protected] |
osl::search::SearchState2Core::SearchState2Core | ( | const NumEffectState & | s, | |
checkmate_t & | checker | |||
) |
osl::search::SearchState2Core::~SearchState2Core | ( | ) | [virtual] |
searchState2.cc の 60 行で定義されています。
int osl::search::SearchState2Core::curDepth | ( | ) | const [inline] |
searchState2.h の 117 行で定義されています。
参照先 history(), root_depth, と osl::container::MoveStack::size().
参照元 osl::search::AlphaBeta2Tree::alphaBetaSearch(), osl::search::AlphaBeta2Tree::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2::alphaBetaSearchRoot(), getKillerMoves(), initPV(), osl::search::AlphaBeta2Tree::makeGenerator(), osl::search::AlphaBeta2::makeMove(), makePV(), osl::search::AlphaBeta2Tree::nextMove(), pushBeforeApply(), osl::search::AlphaBeta2Tree::quiesce(), osl::search::QuiescenceSearch2< EvalT >::recordGeneration(), osl::search::AlphaBeta2Tree::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), setCurrentRecord(), setKillerMove(), osl::search::AlphaBeta2::setRoot(), setRootRecord(), osl::search::AlphaBeta2Tree::testThreatmate(), osl::search::AlphaBeta2Tree::tryCheckmate(), と tryThreatmate().
void osl::search::SearchState2Core::setState | ( | const NumEffectState & | s | ) | [virtual] |
state ΥԡԤ.
this->state õλ¸뤬õ exception ˲Ƥ
osl::search::SearchState2で再定義されています。
searchState2.cc の 65 行で定義されています。
参照先 osl::search::RecordStack2::clear(), osl::container::MoveStack::clear(), osl::RepetitionCounter::clear(), current_path, current_state, move_history, osl::RepetitionCounter::push(), record_stack, repetition_counter, root_depth, shared, と osl::container::MoveStack::size().
参照元 SearchState2Core(), と osl::search::SearchState2::setState().
void osl::search::SearchState2Core::setHistory | ( | const MoveStack & | h | ) |
searchState2.cc の 88 行で定義されています。
参照先 current_path, history(), move_history, root_depth, osl::container::MoveStack::size(), と osl::PathEncoding::turn().
bool osl::search::SearchState2Core::hasLastRecord | ( | unsigned int | n = 0 |
) | const [inline] |
searchState2.h の 127 行で定義されています。
参照先 osl::search::RecordStack2::hasLastRecord(), と record_stack.
参照元 osl::search::AlphaBeta2::alphaBetaSearchRoot(), countCheckAfterThreatmate(), countCheckAfterThreatmateSacrifice(), osl::search::AlphaBeta2Tree::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), SearchState2Core(), と osl::search::QuiescenceSearch2< EvalT >::staticValue().
SimpleHashRecord* osl::search::SearchState2Core::lastRecord | ( | unsigned int | n = 0 |
) | [inline] |
searchState2.h の 131 行で定義されています。
参照先 osl::search::RecordStack2::lastRecord(), と record_stack.
参照元 osl::search::AlphaBeta2Tree::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2::alphaBetaSearchRoot(), countCheckAfterThreatmate(), countCheckAfterThreatmateSacrifice(), osl::search::AlphaBeta2Tree::nextMove(), osl::search::AlphaBeta2Tree::quiesceExp(), osl::search::AlphaBeta2Tree::quiesceRoot(), osl::search::AlphaBeta2Tree::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), と osl::search::AlphaBeta2Tree::tryCheckmate().
const SimpleHashRecord* osl::search::SearchState2Core::lastRecord | ( | unsigned int | n = 0 |
) | const [inline] |
SimpleHashRecord* osl::search::SearchState2Core::rootRecord | ( | ) | [inline] |
void osl::search::SearchState2Core::setCurrentRecord | ( | SimpleHashRecord * | r | ) | [inline] |
void osl::search::SearchState2Core::setRootRecord | ( | SimpleHashRecord * | root | ) | [inline] |
void osl::search::SearchState2Core::setKillerMove | ( | Move | best_move | ) | [inline] |
void osl::search::SearchState2Core::getBigramKillerMoves | ( | MoveVector & | moves | ) | const [inline] |
searchState2.h の 167 行で定義されています。
参照先 osl::container::MoveStack::hasLastMove(), lastMove(), move_history, shared, と state().
参照元 getKillerMoves(), と osl::search::QuiescenceSearch2< EvalT >::searchMain().
void osl::search::SearchState2Core::getKillerMoves | ( | MoveVector & | moves | ) | const [inline] |
const BigramKillerMove& osl::search::SearchState2Core::bigramKillerMove | ( | ) | const [inline] |
void osl::search::SearchState2Core::setBigramKillerMove | ( | const BigramKillerMove & | killers | ) |
void osl::search::SearchState2Core::pushPass | ( | ) | [inline] |
void osl::search::SearchState2Core::popPass | ( | ) | [inline] |
searchState2.h の 193 行で定義されています。
参照先 osl::alt(), current_path, current_state, move_history, osl::Move::PASS(), osl::container::MoveStack::pop(), と osl::PathEncoding::popMove().
参照元 osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), と osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat().
void osl::search::SearchState2Core::pushBeforeApply | ( | Move | move | ) | [inline, private] |
ApplyMove˹Ԥ
searchState2.h の 204 行で定義されています。
参照先 curDepth(), move_history, node_type, osl::search::RecordStack2::push(), osl::container::MoveStack::push(), と record_stack.
参照元 doUndoMoveOrPass(), と makeMove().
void osl::search::SearchState2Core::updateRepetitionCounterAfterMove | ( | const HashKey & | new_hash | ) | [inline, private] |
pushBeforeApply θ塤ApplyMove桤FunctionƤ˸ƤФ
searchState2.h の 242 行で定義されています。
参照先 current_state, osl::RepetitionCounter::push(), と repetition_counter.
参照元 makeMove(), と osl::search::SearchState2Core::Updator::update().
void osl::search::SearchState2Core::popAfterApply | ( | ) | [inline, private] |
ApplyMoveθ˹Ԥ
searchState2.h の 249 行で定義されています。
参照先 move_history, osl::container::MoveStack::pop(), osl::RepetitionCounter::pop(), osl::search::RecordStack2::pop(), record_stack, と repetition_counter.
参照元 doUndoMoveOrPass().
void osl::search::SearchState2Core::doUndoMoveOrPass | ( | const HashKey & | new_hash, | |
Move | move, | |||
Function & | f | |||
) | [inline] |
ޤȤdoUndo
searchState2.h の 260 行で定義されています。
参照先 current_path, current_state, popAfterApply(), と pushBeforeApply().
参照元 osl::search::QuiescenceSearch2< EvalT >::examineMoves(), と osl::search::QuiescenceSearch2< EvalT >::passValue().
void osl::search::SearchState2Core::makeMove | ( | Move | move | ) | [inline] |
osl::search::AlphaBeta2で再定義されています。
searchState2.h の 269 行で定義されています。
参照先 current_state, currentHash(), pushBeforeApply(), と updateRepetitionCounterAfterMove().
const Move osl::search::SearchState2Core::lastMove | ( | int | i = 1 |
) | const [inline] |
searchState2.h の 277 行で定義されています。
参照先 osl::container::MoveStack::lastMove(), と move_history.
参照元 countCheckAfterThreatmateSacrifice(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), osl::search::MoveGenerator::generateTakeBack(), getBigramKillerMoves(), isLosingState(), isWinningState(), osl::search::AlphaBeta2Tree::quiesce(), osl::search::AlphaBeta2Tree::quiesceRoot(), osl::search::AlphaBeta2Tree::quiesceStable(), osl::search::AlphaBeta2Tree::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), setKillerMove(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), と tryThreatmate().
const MoveStack& osl::search::SearchState2Core::history | ( | ) | const [inline] |
const RecordStack2& osl::search::SearchState2Core::recordHistory | ( | ) | const [inline] |
const PathEncoding& osl::search::SearchState2Core::path | ( | ) | const [inline] |
const NumEffectState& osl::search::SearchState2Core::state | ( | ) | const [inline] |
searchState2.h の 281 行で定義されています。
参照先 current_state.
参照元 abort(), osl::search::AlphaBeta2Tree::alphaBetaSearch(), osl::search::AlphaBeta2Tree::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2::alphaBetaSearchRoot(), osl::search::AlphaBeta2::computeBestMoveIteratively(), countCheckAfterThreatmate(), countCheckAfterThreatmateSacrifice(), 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::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(), getBigramKillerMoves(), getKillerMoves(), osl::search::AlphaBeta2::makeMove(), osl::search::AlphaBeta2Tree::nextMove(), osl::search::AlphaBeta2Tree::quiesce(), osl::search::AlphaBeta2Tree::quiesceRoot(), osl::search::QuiescenceSearch2< EvalT >::search(), osl::search::AlphaBeta2Tree::searchAllMoves(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchIteratively(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::search::QuiescenceSearch2< EvalT >::takeBackOrChase(), osl::search::QuiescenceSearch2< EvalT >::takeBackValue(), osl::search::AlphaBeta2Tree::testThreatmate(), osl::search::AlphaBeta2Tree::tryCheckmate(), osl::search::AlphaBeta2Tree::tryCheckmateAgain(), と tryThreatmate().
const checkmate_t& osl::search::SearchState2Core::checkmateSearcher | ( | ) | const [inline] |
searchState2.h の 282 行で定義されています。
参照先 checkmate_searcher.
参照元 osl::search::AlphaBeta2::alphaBetaSearchRoot(), osl::search::AlphaBeta2::computeBestMoveIteratively(), osl::search::AlphaBeta2Tree::quiesceStable(), osl::search::AlphaBeta2Tree::testThreatmate(), osl::search::AlphaBeta2Tree::tryCheckmate(), osl::search::AlphaBeta2Tree::tryCheckmateAgain(), と osl::search::AlphaBeta2Tree::updateCheckmateCount().
const RepetitionCounter& osl::search::SearchState2Core::repetitionCounter | ( | ) | const [inline] |
searchState2.h の 283 行で定義されています。
参照先 repetition_counter.
参照元 osl::search::QuiescenceSearch2< EvalT >::examineMoves().
const HashKey& osl::search::SearchState2Core::currentHash | ( | ) | const [inline] |
searchState2.h の 286 行で定義されています。
参照先 osl::RepetitionCounter::history(), と repetition_counter.
参照元 osl::search::AlphaBeta2Tree::alphaBetaSearch(), osl::search::AlphaBeta2Tree::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2::alphaBetaSearchRoot(), osl::search::AlphaBeta2::computeBestMoveIteratively(), osl::search::QuiescenceSearch2< EvalT >::examineMoves(), isLosingState(), isThreatmateState(), isWinningState(), makeMove(), osl::search::AlphaBeta2::makeMove(), osl::search::QuiescenceSearch2< EvalT >::passValue(), osl::search::AlphaBeta2Tree::quiesceWithMove(), osl::search::QuiescenceSearch2< EvalT >::searchInternal(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::AlphaBeta2::setRoot(), osl::search::AlphaBeta2Tree::showPV(), と osl::search::QuiescenceSearch2< EvalT >::staticValue().
void osl::search::SearchState2Core::doUndoMoveLight | ( | Move | move, | |
Function & | f | |||
) | [inline] |
bool osl::search::SearchState2Core::isLosingState | ( | int | node_limit | ) | [inline] |
bool osl::search::SearchState2Core::isWinningState | ( | int | node_limit, | |
Move & | checkmate_move, | |||
AttackOracleAges & | age | |||
) | [inline] |
bool osl::search::SearchState2Core::isWinningStateShort | ( | int | depth, | |
Move & | checkmate_move | |||
) | [inline] |
FixedDepthSearcher Ƥ
searchState2.h の 324 行で定義されています。
参照先 current_state, osl::checkmate::FixedDepthSearcher::hasCheckmateMove(), と osl::checkmate::ProofDisproof::isCheckmateSuccess().
bool osl::search::SearchState2Core::isThreatmateState | ( | int | node_limit, | |
Move & | threatmate_move, | |||
AttackOracleAges & | age | |||
) | [inline] |
P μ֤Pζ̤˵ͤäƤ뤫ɤ
searchState2.h の 334 行で定義されています。
参照先 checkmate_searcher, current_state, currentHash(), path(), と search_assert.
bool osl::search::SearchState2Core::isThreatmateStateShort | ( | int | depth, | |
Move & | threatmate_move | |||
) | [inline] |
bool osl::search::SearchState2Core::abort | ( | ) | const |
bool osl::search::SearchState2Core::abort | ( | Move | best_move | ) | const [virtual] |
osl::search::SearchState2で再定義されています。
searchState2.cc の 117 行で定義されています。
参照先 osl::search::RecordStack2::dump(), osl::search::SimpleHashRecord::dump(), osl::container::MoveStack::dump(), osl::RepetitionCounter::history(), history(), osl::search::RecordStack2::lastRecord(), record_stack, repetition_counter, show(), と state().
bool osl::search::SearchState2Core::tryThreatmate | ( | ) | const [inline] |
searchState2.h の 368 行で定義されています。
参照先 curDepth(), osl::hasEffect(), osl::search::FirstMoveThreatmate::isMember(), osl::Move::isNormal(), lastMove(), osl::Move::ptypeO(), state(), と osl::Move::to().
参照元 osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), と osl::search::AlphaBeta2Tree::testThreatmate().
void osl::search::SearchState2Core::makePV | ( | Move | m | ) | [inline] |
searchState2.h の 381 行で定義されています。
参照先 curDepth(), depth, と pv.
参照元 osl::search::AlphaBeta2::alphaBetaSearchRoot(), osl::search::AlphaBeta2Tree::examineMovesRoot(), osl::search::AlphaBeta2Tree::quiesceWithMove(), osl::search::AlphaBeta2Tree::searchAllMoves(), と osl::search::QuiescenceSearch2< EvalT >::searchInternal().
void osl::search::SearchState2Core::initPV | ( | ) | [inline] |
searchState2.cc の 134 行で定義されています。
int osl::search::SearchState2Core::countCheckAfterThreatmate | ( | Player | turn, | |
int | depth = 1 | |||
) | const [inline] |
turn ¦Ϣ³ǵͤƨƤ
searchState2.h の 393 行で定義されています。
参照先 osl::search::ThreatmateState::CHECK_AFTER_THREATMATE, depth, hasLastRecord(), lastRecord(), state(), osl::search::ThreatmateState::status(), osl::search::DualThreatmateState::status(), と osl::search::SimpleHashRecord::threatmate().
参照元 osl::search::QuiescenceSearch2< EvalT >::searchMain(), と osl::search::AlphaBeta2Tree::tryCheckmateAgain().
int osl::search::SearchState2Core::countCheckAfterThreatmateSacrifice | ( | Player | turn, | |
int | depth = 1 | |||
) | const [inline] |
searchState2.h の 408 行で定義されています。
参照先 osl::Move::capturePtype(), osl::search::ThreatmateState::CHECK_AFTER_THREATMATE, depth, hasLastRecord(), lastMove(), lastRecord(), osl::PTYPE_EMPTY, state(), osl::search::ThreatmateState::status(), osl::search::DualThreatmateState::status(), と osl::search::SimpleHashRecord::threatmate().
friend class AlphaBeta2Parallel [friend] |
friend class Updator [friend] |
searchState2.h の 238 行で定義されています。
NumEffectState osl::search::SearchState2Core::current_state [private] |
searchState2.h の 93 行で定義されています。
参照元 checkmateSearcher(), isLosingState(), isThreatmateState(), と isWinningState().
searchState2.h の 101 行で定義されています。
参照元 doUndoMoveLight(), doUndoMoveOrPass(), path(), popPass(), pushPass(), setHistory(), と setState().
searchState2.h の 102 行で定義されています。
参照元 getBigramKillerMoves(), history(), lastMove(), popAfterApply(), popPass(), pushBeforeApply(), pushPass(), setHistory(), と setState().
int osl::search::SearchState2Core::root_depth [private] |
searchState2.h の 105 行で定義されています。
参照元 abort(), hasLastRecord(), lastRecord(), popAfterApply(), pushBeforeApply(), recordHistory(), rootRecord(), setCurrentRecord(), setRootRecord(), と setState().
boost::shared_ptr<SearchState2Shared> osl::search::SearchState2Core::shared [protected] |
osl::search::AlphaBeta2Treeで再定義されています。
searchState2.h の 107 行で定義されています。
参照元 bigramKillerMove(), getBigramKillerMoves(), getKillerMoves(), setBigramKillerMove(), setKillerMove(), と setState().
CArray<PVVector,MaxDepth> osl::search::SearchState2Core::pv [protected] |
CArray<NodeType,MaxDepth> osl::search::SearchState2Core::node_type [protected] |
volatile bool osl::search::SearchState2Core::stop |
searchState2.h の 113 行で定義されています。
参照元 osl::search::AlphaBeta2Tree::stopping(), と osl::search::AlphaBeta2Tree::throwStop().
osl::CArray< int, osl::search::SearchState2Core::MaxDepth > osl::search::SearchState2Core::depth_node_count_quiesce [static] |