#include <mtdf.h>
Public 型 | |
typedef MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities > | mtdf_t |
typedef NullWindowSearch< Eval, MoveGenerator, Table, Recorder, Probabilities > | tester_t |
typedef base_t::eval_t | eval_t |
typedef misc::RealTime | RealTime |
typedef DualCheckmateSearcher | checkmate_t |
Public メソッド | |
MTDF (const HashEffectState &s, DualCheckmateSearcher<> &c, Table &t, Recorder &r) | |
~MTDF () | |
void | setInitialGuess (int guess) |
threshold νͤ | |
void | setInitialGuess () |
threshold νͤ | |
bool | isReasonableMove (Move move, int pawn_sacrifice=1) |
void | setHistory (const MoveStack &history) |
last_move ѤϤ餫 history ˤƤ | |
void | setRootIgnoreMoves (const MoveVector *rim) |
const Move | computeBestMove (int limit, const RealTime &timer=RealTime(60)) |
̾ƤФå | |
const Move | computeBestMoveIteratively (int limit, const int step=100, const int initialLimit=400, int nodeLimit=1600000, const misc::RealTime &timer=misc::RealTime(60)) |
computeBestMove iterative deepening version | |
const AlarmSwitch | alarmSwitch () |
const BigramKillerMove & | bigramKillerMove () |
void | setBigramKillerMove (const BigramKillerMove &killers) |
template<Player P> | |
void | examineMoves (const char *category_name, int ¤t_value, int limit, const SearchMoveVector &moves, SearchMoveSorter< P > &lower_moves, SearchMoveSorter< P > &higher_moves) |
ȥåץ٥ moves μĴ٤ lower_moves higher_moves ƥʥ ޤ threshold Ŭڤѹ | |
void | gatherMoves (const MoveLogProbVector &moves, SearchMoveSet &out) |
줿 moves out ˽ | |
const DualCheckmateSearcher * | checkmateSearcher () const |
const HistoryTable & | historyTable () const |
Private 型 | |
typedef SearchBase< Eval, Table, Recorder, Probabilities > | base_t |
Private メソッド | |
BOOST_CLASS_REQUIRE (Eval, osl::eval, Concept) | |
template<Player P> | |
const Move | computeBestMoveOfPlayer (int limit) |
ᥤõ | |
template<Player P> | |
const Move | retryByLowerF (SimpleHashRecord *record, int limit, SearchMoveSorter< P > &lower_moves, SearchMoveSorter< P > &higher_moves) |
٤٤Ƥμį | |
template<Player P> | |
const Move | selectBestMoveByHigherF (SimpleHashRecord *record, int limit, SearchMoveSorter< P > &lower_moves, SearchMoveSorter< P > &higher_moves) |
F ۤʣμǺ | |
template<Player P> | |
void | triageMovesSpeculatively (SearchMoveSorter< P > &higher_moves, int limit, int jump) |
ͤͿ higher_moves ʤ. | |
template<Player P> | |
bool | testMove (const SearchMove &move, int &val, int &max_value, int limit) |
move õmax_value (ǽʤ) | |
Private 変数 | |
int | threshold |
int | lower_bound |
int | upper_bound |
checkmate_t * | checkmate_searcher |
tester_t | memory_tester |
RealTime | timer |
const MoveVector * | root_ignore_moves |
MoveGenerator | CategoryList 㤨õʤ FWMoveGenerator ʣ generator CategoryList<A,CategoryList<B,C> > ʤɤȥꥹȤǽ | |
Eval | PieceEval or PiecePairEval | |
Probabilities | fullwidth ξ FullWidthProbability Ȥ | |
Recorder | 㤨 NullMtdfRecorder |
typedef SearchBase<Eval,Table,Recorder,Probabilities> osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::base_t [private] |
typedef MTDF<Eval,MoveGenerator,Table,Recorder,Probabilities> osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::mtdf_t |
typedef NullWindowSearch<Eval,MoveGenerator,Table,Recorder,Probabilities> osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::tester_t |
typedef base_t::eval_t osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::eval_t |
typedef misc::RealTime osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::RealTime |
typedef DualCheckmateSearcher osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::checkmate_t |
osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::MTDF | ( | const HashEffectState & | s, | |
DualCheckmateSearcher<> & | c, | |||
Table & | t, | |||
Recorder & | r | |||
) | [explicit] |
osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::~MTDF | ( | ) | [inline] |
osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::BOOST_CLASS_REQUIRE | ( | Eval | , | |
osl::eval | , | |||
Concept | ||||
) | [private] |
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setInitialGuess | ( | int | guess | ) | [inline] |
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setInitialGuess | ( | ) | [inline] |
bool osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::isReasonableMove | ( | Move | move, | |
int | pawn_sacrifice = 1 | |||
) | [inline] |
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setHistory | ( | const MoveStack & | history | ) | [inline] |
last_move ѤϤ餫 history ˤƤ
参照先 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester, と osl::search::SearchStateCore::setHistory().
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setRootIgnoreMoves | ( | const MoveVector * | rim | ) | [inline] |
const osl::Move osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMove | ( | int | limit, | |
const RealTime & | timer = RealTime(60) | |||
) | [inline] |
̾ƤФå
limit | 1400Ǻ14ޤɤ |
参照先 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::alarmSwitch(), osl::BLACK, osl::misc::RealTime::getTimeLeftInSeconds(), osl::misc::RealTime::isInvalid(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester, osl::search::parallelSearch, osl::search::SearchStateCore::resetTimeOut(), osl::search::ParallelSearch::setMasterAlarm(), osl::search::SearchStateCore::setTimeOut(), osl::search::SearchStateCore::state(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::timer, と osl::search::ParallelSearch::waitAll().
const osl::Move osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveIteratively | ( | int | limit, | |
const int | step = 100 , |
|||
const int | initialLimit = 400 , |
|||
int | nodeLimit = 1600000 , |
|||
const misc::RealTime & | timer = misc::RealTime(60) | |||
) | [inline] |
computeBestMove iterative deepening version
limit | controls search depth | |
nodeLimit | maximum number of nodes | |
step | iteration step. |
参照先 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMove(), osl::search::SearchStateCore::currentHash(), osl::search::SimpleHashRecord::dumpNodeCount(), osl::misc::RealTime::getConsumedInDouble(), osl::misc::RealTime::getTimeLeftInDouble(), osl::search::HasTimer::hasSchedule(), osl::Move::INVALID(), osl::Move::isNormal(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester, osl::search::HasTimer::nextIterationCoefficient(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recorder, osl::search::HasTimer::setStopSchedule(), osl::search::SimpleHashRecord::setSumNodeCountOfChildren(), show(), osl::search::HasTimer::stopSchedule(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, osl::search::SearchStateCore::testTimeOut(), と osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::timer.
const osl::misc::AlarmSwitch osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::alarmSwitch | ( | ) | [inline] |
const osl::search::BigramKillerMove & osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::bigramKillerMove | ( | ) | [inline] |
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setBigramKillerMove | ( | const BigramKillerMove & | killers | ) | [inline] |
const osl::Move osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveOfPlayer | ( | int | limit | ) | [inline, private] |
ᥤõ
ᥤõ.
ǽ low/high fail ȽꤷѴؿ˸Ǥ
threshold ۤȱۤʤä
ߤκɾ threshold ˤä upperbound ä lower bound äꤹΤ threshold ѹ
参照先 all_moves, osl::alt(), osl::search::SearchMoveSet::assignIfBetter(), osl::search::QuiescenceRecord::attack_oracle, osl::search::QuiescenceRecord::bestMove(), osl::search::SimpleHashRecord::bestMove(), osl::eval::betterThan(), osl::search::ShouldPromoteCut::canIgnoreAndNotDrop(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::checkmate_searcher, osl::search::QuiescenceRecord::checkmateNodesLeft(), osl::search::SearchStateCore::currentHash(), osl::eval::delta(), osl::search::SearchMoveSet::find(), osl::search::SearchMoveSet::range::first, osl::search::SearchMoveSet::front(), osl::misc::RealTime::getConsumedInDouble(), osl::search::SearchFramework< Eval, MoveGenerator, Table, Recorder, Probabilities >::getEval(), osl::MoveLogProb::getMove(), osl::search::SearchStateCore::history(), osl::search::SearchStateCore::historyTable(), osl::search::SearchMoveSorter< P >::insert(), osl::Move::INVALID(), osl::Move::isNormal(), osl::search::DualThreatmateState::isThreatmate(), osl::search::FixedEval::isWinValue(), osl::search::SearchMoveSet::range::last, osl::checkmate::limitToCheckCount(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::lower_bound, osl::eval::max(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester, osl::search::FixedEval::minusInfty(), osl::search::SearchMove::moveLogProb(), osl::search::SimpleHashRecord::moves(), osl::newPtypeO(), osl::search::SearchStateCore::path(), osl::PAWN, osl::search::SearchMoveVector::push_back(), osl::search::SimpleHashRecord::qrecord, osl::search::SearchMove::record, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recorder, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recordLoseByCheckmate(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recordWinByCheckmate(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::root_ignore_moves, osl::search::SearchStateCore::rootRecord(), osl::MoveLogProb::setLogProbAtMost(), osl::search::SearchStateCore::setRootRecord(), osl::search::DualThreatmateState::setThreatmate(), osl::search::SearchMoveVector::sortByValue(), osl::search::SearchStateCore::state(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, osl::search::SimpleHashRecord::threatmate(), osl::search::QuiescenceRecord::threatmate_oracle, osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::threshold, osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::timer, osl::checkmate::DualCheckmateSearcher< Table, HEstimator, CostEstimator >::totalNodeCount(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::validTableMove(), osl::search::FixedEval::windowMax(), と osl::search::FixedEval::winThreshold().
const osl::Move osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::retryByLowerF | ( | SimpleHashRecord * | record, | |
int | limit, | |||
SearchMoveSorter< P > & | lower_moves, | |||
SearchMoveSorter< P > & | higher_moves | |||
) | [inline, private] |
٤٤Ƥμį
ȥåץ٥ 롼 ( low fail )
threshold ʤõthreshold ꤬ۤǤ selectBestMoveByHigherF
参照先 osl::alt(), osl::search::SearchMoveSorter< P >::clear(), osl::Move::INVALID(), osl::search::SearchMoveSorter< P >::isValidAll(), osl::eval::max(), osl::search::FixedEval::minusInfty(), osl::newPtypeO(), osl::PAWN, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recorder, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recordLowerBound(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound, と osl::search::FixedEval::winThreshold().
const osl::Move osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::selectBestMoveByHigherF | ( | SimpleHashRecord * | record, | |
int | limit, | |||
SearchMoveSorter< P > & | lower_moves, | |||
SearchMoveSorter< P > & | higher_moves | |||
) | [inline, private] |
F ۤʣμǺ
ͤι⤤˸¤١夫2ܰʹߤõ 1ɤβ+delta ۤʤȤǧ롣 ۤʤ1ܤμ꤬ꡢۤΤʤ¤ľƤľ
lower_moves | F ⤤֤õΤǡߤ threshold ۤǽν | |
higher_moves | ȤF ۤν |
参照先 osl::alt(), osl::search::SimpleHashRecord::bestMove(), osl::eval::betterThan(), osl::eval::delta(), osl::MoveLogProb::getMove(), osl::search::SearchMoveSorter< P >::insert(), osl::search::SearchMoveSorter< P >::isValidAll(), osl::search::FixedEval::isWinValue(), osl::search::SimpleHashRecord::lowerBound(), osl::search::SimpleHashRecord::lowerLimit(), osl::eval::max(), osl::newPtypeO(), osl::PAWN, osl::search::SearchMoveVector::push_back(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recorder, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recordLowerBound(), osl::MoveLogProb::setLogProbAtMost(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, target, osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound, と osl::search::SimpleHashRecord::upperLimit().
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::triageMovesSpeculatively | ( | SearchMoveSorter< P > & | higher_moves, | |
int | limit, | |||
int | jump | |||
) | [inline, private] |
ͤͿ higher_moves ʤ.
ޤ̤٤Τ绨ĤͤƤ upperbound ޤäƤ鿿ܤ
参照先 osl::eval::betterThan(), osl::eval::delta(), osl::search::SearchMoveSorter< P >::insert(), osl::search::FixedEval::isWinValue(), osl::MoveLogProb::setLogProbAtMost(), osl::search::SearchMoveSorter< P >::summary(), osl::search::SearchMoveSorter< P >::swap(), osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, target, と osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound.
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::examineMoves | ( | const char * | category_name, | |
int & | current_value, | |||
int | limit, | |||
const SearchMoveVector & | moves, | |||
SearchMoveSorter< P > & | lower_moves, | |||
SearchMoveSorter< P > & | higher_moves | |||
) | [inline] |
ȥåץ٥ moves μĴ٤ lower_moves higher_moves ƥʥ ޤ threshold Ŭڤѹ
current_value | ߤκ betterThan<P>(threshold, current_value) | |
lower_moves | threshold ꤬ʤäȤƤμɤ¸ | |
higher_moves | threshold Τߤɤ¸ |
参照先 osl::alt(), osl::eval::delta(), osl::search::SearchMoveSorter< P >::insert(), osl::search::SearchMoveSorter< P >::isValidAll(), osl::search::FixedEval::isWinValue(), osl::eval::max(), osl::newPtypeO(), osl::PAWN, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::recorder, osl::search::SearchBase< Eval, Table, Recorder, Probabilities >::table, と osl::search::FixedEval::winThreshold().
void osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::gatherMoves | ( | const MoveLogProbVector & | moves, | |
SearchMoveSet & | out | |||
) |
줿 moves out ˽
bool osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::testMove | ( | const SearchMove & | move, | |
int & | val, | |||
int & | max_value, | |||
int | limit | |||
) | [inline, private] |
move õmax_value (ǽʤ)
val | move val | |
max_value | max(val,max_value) ˹ |
参照先 osl::alt(), osl::eval::betterThan(), osl::BLACK, osl::search::ParallelSearch::checkStop(), osl::MoveLogProb::getLogProb(), osl::MoveLogProb::getMove(), osl::search::SearchStateCore::historyTable(), osl::misc::RealTime::isInvalid(), osl::Move::isNormal(), osl::search::FixedEval::isWinValue(), osl::search::HistoryTable::logp(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::lower_bound, osl::eval::max(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester, osl::eval::min(), osl::newPtypeO(), osl::search::parallelSearch, osl::Move::player(), osl::search::SearchMove::record, osl::ROOK, osl::search::SearchState::setKillerMove(), osl::search::NullWindowSearch< Eval, MoveGenerator, Table, Recorder, Probabilities >::setRootBounds(), osl::search::SearchStateCore::state(), osl::misc::RealTime::timeLeft(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::timer, osl::search::SearchStateCore::timerAvailable(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound, と osl::WHITE.
const DualCheckmateSearcher* osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::checkmateSearcher | ( | ) | const [inline] |
const HistoryTable& osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::historyTable | ( | ) | const [inline] |
int osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::threshold [private] |
int osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::lower_bound [private] |
int osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::upper_bound [private] |
参照元 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveOfPlayer(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::retryByLowerF(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::selectBestMoveByHigherF(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::testMove(), と osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::triageMovesSpeculatively().
checkmate_t* osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::checkmate_searcher [private] |
tester_t osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::memory_tester [private] |
参照元 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::alarmSwitch(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::bigramKillerMove(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMove(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveIteratively(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveOfPlayer(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::historyTable(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::isReasonableMove(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setBigramKillerMove(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setHistory(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::setInitialGuess(), と osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::testMove().
RealTime osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::timer [private] |
参照元 osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMove(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveIteratively(), osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::computeBestMoveOfPlayer(), と osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::testMove().
const MoveVector* osl::search::MTDF< Eval, MoveGenerator, Table, Recorder, Probabilities >::root_ignore_moves [private] |