詰探索 More...
#include <dfpn.h>
Classes | |
struct | CallAttack |
struct | CallDefense |
struct | CallProofOracleAttack |
struct | CallProofOracleDefense |
struct | DepthLimitReached |
struct | Node |
struct | NodeBase |
struct | ProofOracle |
struct | Tree |
Public Types | |
enum | { DfpnMaxUniqMoves = CheckOrEscapeMaxUniqMoves } |
typedef CheckMoveVector | DfpnMoveVector |
typedef DfpnTable | table_t |
Public Member Functions | |
Dfpn () | |
~Dfpn () | |
void | setTable (DfpnTable *new_table) |
void | setIllegal (const HashKey &key, PieceStand white) |
void | setBlockingVerify (bool enable=true) |
void | setParallel (int id, DfpnShared *s) |
const ProofDisproof | hasCheckmateMove (const NumEffectState &state, const HashKey &key, const PathEncoding &path, size_t limit, Move &best_move, Move last_move=Move::INVALID(), std::vector< Move > *pv=0) |
const ProofDisproof | hasCheckmateMove (const NumEffectState &state, const HashKey &key, const PathEncoding &path, size_t limit, Move &best_move, PieceStand &proof, Move last_move=Move::INVALID(), std::vector< Move > *pv=0) |
const ProofDisproof | hasEscapeMove (const NumEffectState &state, const HashKey &key, const PathEncoding &path, size_t limit, Move last_move) |
size_t | nodeCount () const |
const DfpnTable & | currentTable () const |
void | analyze (const PathEncoding &path, const NumEffectState &state, const std::vector< Move > &moves) const |
void | clear () |
template<Player P> | |
void | attack () |
template<Player P> | |
void | defense () |
template<Player P, bool UseTable> | |
void | proofOracleAttack (const ProofOracle &oracle, int proof_limit) |
template<Player P, bool UseTable> | |
void | proofOracleDefense (const ProofOracle &oracle, int proof_limit) |
template<Player P> | |
void | blockingSimulation (int seed, const ProofOracle &) |
合駒が詰と判った直後に、同じような合駒を詰める More... | |
template<Player P> | |
void | grandParentSimulation (int cur_move, const Node &gparent, int gp_move) |
const ProofDisproof | tryProof (const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move=Move::INVALID()) |
const ProofDisproof | tryProofLight (const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move=Move::INVALID()) |
int | distance (const HashKey &) const |
bool | grandParentSimulationSuitable () const |
test suitability of simulation of grand-parent relation More... | |
template<bool UseTable> | |
const osl::checkmate::ProofDisproof | tryProofMain (const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &oracle, size_t oracle_id, Move &best_move, Move last_move) |
Static Public Member Functions | |
template<Player P> | |
static void | generateCheck (const NumEffectState &, DfpnMoveVector &, bool &) |
Pは攻撃側 More... | |
template<Player P> | |
static void | generateEscape (const NumEffectState &, bool need_full_width, Square grand_parent_delay_last_to, DfpnMoveVector &) |
Pは攻撃側 More... | |
template<Player Turn> | |
static void | sort (const NumEffectState &, DfpnMoveVector &) |
Private Member Functions | |
Dfpn (const Dfpn &)=delete | |
Dfpn & | operator= (const Dfpn &)=delete |
template<bool UseTable> | |
const ProofDisproof | tryProofMain (const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move) |
void | findDagSource () |
void | findDagSource (const HashKey &terminal_key, DfpnRecord &terminal_record, PieceStand terminal_stand, int offset=0) |
Private Attributes | |
DfpnTable * | table |
std::unique_ptr< Tree > | tree |
std::unique_ptr< DfpnPathTable > | path_table |
size_t | node_count |
size_t | node_count_limit |
DfpnShared * | parallel_shared |
int | thread_id |
bool | blocking_verify |
|
privatedelete |
void osl::checkmate::Dfpn::analyze | ( | const PathEncoding & | path, |
const NumEffectState & | state, | ||
const std::vector< Move > & | moves | ||
) | const |
Definition at line 2651 of file dfpn.cc.
References osl::checkmate::DfpnTable::attack(), osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, osl::checkmate::DfpnRecordBase::dag_moves, osl::checkmate::DfpnPathRecord::distance, osl::NumEffectState::isAlmostValidMove(), osl::SimpleState::kingSquare(), osl::checkmate::DfpnRecordBase::last_to, osl::NumEffectState::makeMove(), osl::hash::HashKey::newMakeMove(), osl::PieceStand::nextStand(), osl::checkmate::DfpnRecordBase::node_count, path_table, osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::PathEncoding::pushMove(), osl::csa::show(), osl::FixedCapacityVector< T, Capacity >::size(), table, osl::SimpleState::turn(), osl::checkmate::DfpnPathRecord::twin_list, and osl::WHITE.
Referenced by defense().
void osl::checkmate::Dfpn::attack | ( | ) |
Definition at line 1656 of file dfpn.cc.
References osl::stat::Ratio::add(), osl::PieceStand::add(), AdHocSumScale, osl::alt(), osl::checkmate::LibertyEstimator::attackH(), osl::checkmate::attackProofCost(), osl::checkmate::BadAttackLoop, osl::checkmate::DfpnRecordBase::best_move, osl::BISHOP, osl::BLACK, osl::checkmate::ProofDisproof::Checkmate(), CHECKMATE_A3_GOLD, osl::misc::BitOp::countBit(), osl::checkmate::DfpnRecordBase::dag_moves, DagFindThreshold, DagFindThreshold2, osl::checkmate::DfpnShared::data, debug_time_start, osl::checkmate::DfpnRecord::disproof(), osl::checkmate::Edge_Table, EnableGCDepth, findDagSource(), generateEscape(), osl::PtypeTable::getEffect(), osl::GOLD, osl::checkmate::DfpnTable::growthLimit(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMove(), osl::EffectContent::hasUnblockableEffect(), IgnoreUpwardDisproofThreshold, osl::hash::HashRandomPair::initialized(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::Move::isDrop(), osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::ProofDisproof::isLoopDetection(), osl::isMajor(), osl::Move::isNormal(), osl::isPromoted(), osl::checkmate::DfpnRecordBase::last_move, osl::checkmate::DisproofPieces::leaf(), osl::checkmate::DfpnTable::leaveWorking(), LongDropCount, osl::checkmate::ProofDisproof::LOOP_DETECTION_PROOF, osl::checkmate::ProofDisproof::LoopDetection(), osl::eval::max(), osl::eval::min(), osl::checkmate::DfpnRecordBase::min_pdp, osl::checkmate::Dfpn::NodeBase::moved, osl::checkmate::King8Info::moves(), osl::hash::HashKey::newHashWithMove(), osl::checkmate::ProofDisproof::NoCheckmate(), osl::checkmate::DfpnRecordBase::node_count, node_count, node_count_limit, osl::checkmate::ProofDisproof::NoEscape(), NoPromoeIgnoreDisproofThreshold, NoPromoeIgnoreProofThreshold, parallel_shared, osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::PAWN, osl::checkmate::ProofDisproof::PAWN_CHECK_MATE_PROOF, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecord::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::checkmate::ProofDisproof::PROOF_LIMIT, osl::Move::ptype(), osl::Ptype_Table, osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::EdgeTable::resetEdgeFromLiberty(), osl::checkmate::DfpnShared::restartThreads(), osl::ROOK, osl::checkmate::DfpnTable::runGC(), osl::checkmate::DfpnRecord::setDisproofPieces(), osl::checkmate::DfpnRecord::setProofPieces(), osl::checkmate::DfpnTable::setWorking(), osl::csa::show(), osl::checkmate::slow_increase(), osl::checkmate::DfpnRecordBase::solved, osl::checkmate::DfpnRecord::stands, osl::checkmate::DfpnShared::stop_all, osl::checkmate::DfpnTable::store(), table, thread_id, osl::checkmate::Dfpn::NodeBase::threshold, timer, tree, osl::unpromote(), UpwardWeight, osl::hash::HashRandomPair::value(), osl::WHITE, and osl::checkmate::DfpnRecordBase::working_threads.
Referenced by findDagSource(), and osl::checkmate::Dfpn::CallAttack< P >::operator()().
void osl::checkmate::Dfpn::blockingSimulation | ( | int | seed, |
const ProofOracle & | oracle | ||
) |
合駒が詰と判った直後に、同じような合駒を詰める
Definition at line 3046 of file dfpn.cc.
References osl::alt(), osl::checkmate::Dfpn::Node::children, osl::checkmate::Dfpn::Node::children_path, grandParentSimulation(), osl::checkmate::Dfpn::Node::hashes, osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::checkmate::Dfpn::Node::isLoop(), osl::checkmate::Dfpn::Node::moves, osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, osl::checkmate::ProofDisproof::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::Dfpn::Node::setCheckmateChildInDefense(), osl::FixedCapacityVector< T, Capacity >::size(), osl::checkmate::DfpnRecordBase::solved, table, osl::checkmate::Dfpn::NodeBase::threshold, osl::Move::to(), osl::checkmate::Dfpn::ProofOracle::traceable(), and tree.
Referenced by proofOracleDefense().
void osl::checkmate::Dfpn::clear | ( | ) |
Definition at line 1305 of file dfpn.cc.
References path_table.
|
inline |
Definition at line 153 of file dfpn.h.
References osl::checkmate::DfpnTable::attack(), osl::checkmate::DfpnTable::clear(), and osl::checkmate::DfpnTable::table.
void osl::checkmate::Dfpn::defense | ( | ) |
Definition at line 2183 of file dfpn.cc.
References AdHocSumScale, osl::checkmate::Dfpn::Node::allocate(), osl::alt(), analyze(), osl::checkmate::BadAttackLoop, osl::CArray< T, Capacity >::begin(), osl::FixedCapacityVector< T, Capacity >::begin(), osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, osl::hash::HashKey128::blackStand(), blocking_verify, osl::checkmate::Dfpn::Node::children, osl::checkmate::Dfpn::Node::children_path, osl::misc::BitOp::countBit(), osl::checkmate::DfpnRecordBase::dag_moves, DagFindThreshold, DagFindThreshold2, osl::checkmate::DfpnShared::data, debug_time_start, osl::checkmate::DfpnRecord::disproof(), osl::checkmate::ProofDisproof::disproof(), osl::checkmate::ProofDisproof::DISPROOF_LIMIT, osl::checkmate::ProofDisproof::DISPROOF_MAX, osl::checkmate::DfpnPathRecord::distance, osl::FixedCapacityVector< T, Capacity >::empty(), osl::FixedCapacityVector< T, Capacity >::end(), osl::checkmate::DfpnRecordBase::false_branch, findDagSource(), osl::PathEncoding::getDepth(), grandParentSimulationSuitable(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMove(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::Dfpn::Node::hashes, IgnoreUpwardProofThreshold, osl::hash::HashRandomPair::initialized(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::Move::isDrop(), osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::Dfpn::Node::isLoop(), osl::checkmate::ProofDisproof::isLoopDetection(), osl::Move::isNormal(), osl::KING, osl::checkmate::DfpnRecordBase::last_move, osl::checkmate::DfpnRecordBase::last_to, osl::checkmate::ProofPieces::leaf(), osl::checkmate::DfpnTable::leaveWorking(), osl::eval::max(), MEMORIZE_SOLVED_IN_BITSET, osl::eval::min(), osl::checkmate::DfpnRecordBase::min_pdp, osl::checkmate::Dfpn::NodeBase::moved, osl::checkmate::Dfpn::Node::moves, osl::checkmate::DfpnRecordBase::need_full_width, osl::hash::HashKey::newHashWithMove(), osl::checkmate::Dfpn::Node::nextWhiteStand(), osl::checkmate::DfpnRecordBase::node_count, node_count, osl::checkmate::DfpnPathRecord::node_count, node_count_limit, osl::checkmate::ProofDisproof::NoEscape(), parallel_shared, osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::FixedCapacityVector< T, Capacity >::pop_back(), osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecord::proof(), osl::checkmate::ProofDisproof::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::DfpnShared::restartThreads(), SacrificeBlockCount, osl::checkmate::Dfpn::Node::setCheckmateChildInDefense(), osl::checkmate::Dfpn::Node::setCheckmateDefense(), osl::checkmate::Dfpn::Node::setLoopDetection(), osl::checkmate::DfpnRecord::setProofPieces(), osl::checkmate::DfpnTable::setWorking(), osl::FixedCapacityVector< T, Capacity >::size(), osl::checkmate::slow_increase(), osl::checkmate::DfpnRecordBase::solved, osl::checkmate::DfpnRecord::stands, osl::checkmate::DfpnShared::stop_all, osl::checkmate::DfpnTable::store(), table, thread_id, osl::checkmate::Dfpn::NodeBase::threshold, timer, osl::Move::to(), tree, UpwardWeight, osl::hash::HashRandomPair::value(), osl::checkmate::Dfpn::Node::visit_time, osl::WHITE, osl::checkmate::Dfpn::NodeBase::white_stand, and osl::checkmate::DfpnRecordBase::working_threads.
Referenced by grandParentSimulationSuitable(), and osl::checkmate::Dfpn::CallDefense< P >::operator()().
int osl::checkmate::Dfpn::distance | ( | const HashKey & | key | ) | const |
Definition at line 3131 of file dfpn.cc.
References osl::checkmate::DfpnPathRecord::distance, and path_table.
Referenced by osl::checkmate::DualDfpn::distance(), and grandParentSimulation().
|
private |
Definition at line 1647 of file dfpn.cc.
References attack(), and tree.
Referenced by attack(), defense(), findDagSource(), generateCheck(), proofOracleAttack(), and proofOracleDefense().
|
private |
Definition at line 1606 of file dfpn.cc.
References osl::checkmate::DfpnTable::addDag(), osl::alt(), osl::checkmate::DfpnRecordBase::dag_terminal, findDagSource(), osl::Move::isNormal(), osl::checkmate::DfpnRecordBase::last_move, MaxDagTraceDepth, osl::eval::min(), osl::hash::HashKey::newUnmakeMove(), parallel_shared, osl::Move::player(), osl::PieceStand::previousStand(), osl::checkmate::DfpnTable::probe(), table, tree, osl::hash::HashKey128::turn(), and osl::WHITE.
|
static |
Pは攻撃側
Definition at line 1573 of file dfpn.cc.
References osl::alt(), osl::FixedCapacityVector< T, Capacity >::empty(), osl::usi::escape(), findDagSource(), osl::move_generator::GenerateEscape< P >::generateKingEscape(), osl::PtypeTable::getEffect(), osl::NumEffectState::inCheck(), osl::SimpleState::kingSquare(), osl::SimpleState::pieceAt(), osl::NumEffectState::pinOrOpen(), osl::Ptype_Table, osl::FixedCapacityVector< T, Capacity >::push_back(), osl::PieceMask::test(), and osl::unpromote().
Referenced by sort().
|
static |
Pは攻撃側
Definition at line 2105 of file dfpn.cc.
References osl::alt(), osl::FixedCapacityVector< T, Capacity >::begin(), osl::FixedCapacityVector< T, Capacity >::empty(), osl::move_generator::GenerateEscape< P >::generateCheapKingEscape(), osl::move_generator::GenerateEscape< P >::generateKingEscape(), grandParentSimulationSuitable(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectNotBy(), osl::SimpleState::kingPiece(), osl::FixedCapacityVector< T, Capacity >::push_back(), and osl::FixedCapacityVector< T, Capacity >::size().
Referenced by attack().
void osl::checkmate::Dfpn::grandParentSimulation | ( | int | cur_move, |
const Node & | gparent, | ||
int | gp_move | ||
) |
Definition at line 3096 of file dfpn.cc.
References osl::alt(), osl::checkmate::Dfpn::Node::children, osl::checkmate::Dfpn::Node::children_path, distance(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::Dfpn::Node::hashes, osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::checkmate::Dfpn::Node::moves, osl::hash::HashKey::newHashWithMove(), osl::checkmate::Dfpn::Node::nextWhiteStand(), osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, osl::checkmate::ProofDisproof::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::DfpnRecordBase::solved, table, osl::checkmate::Dfpn::NodeBase::threshold, and tree.
Referenced by blockingSimulation().
bool osl::checkmate::Dfpn::grandParentSimulationSuitable | ( | ) | const |
test suitability of simulation of grand-parent relation
Definition at line 2162 of file dfpn.cc.
References defense(), osl::Move::from(), osl::Move::isCapture(), osl::Move::isNormal(), osl::checkmate::Dfpn::NodeBase::moved, osl::Move::to(), and tree.
Referenced by defense(), generateEscape(), and proofOracleDefense().
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::hasCheckmateMove | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
size_t | limit, | ||
Move & | best_move, | ||
Move | last_move = Move::INVALID() , |
||
std::vector< Move > * | pv = 0 |
||
) |
Definition at line 1329 of file dfpn.cc.
Referenced by osl::checkmate::DualDfpn::findProof(), and setIllegal().
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::hasCheckmateMove | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
size_t | limit, | ||
Move & | best_move, | ||
PieceStand & | proof, | ||
Move | last_move = Move::INVALID() , |
||
std::vector< Move > * | pv = 0 |
||
) |
Definition at line 1339 of file dfpn.cc.
References osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, osl::checkmate::Dfpn::Node::clear(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::DfpnTable::leaveWorking(), osl::checkmate::ProofDisproof::LoopDetection(), osl::checkmate::Dfpn::NodeBase::moved, node_count, node_count_limit, parallel_shared, osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::checkmate::DfpnRecordBase::proof_disproof, osl::checkmate::DfpnRecord::proofPieces(), osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::ProofTreeDepthDfpn::retrievePV(), ROOT_DISPROOF_TOL, ROOT_PROOF_TOL, osl::checkmate::DfpnShared::stop_all, table, thread_id, osl::checkmate::Dfpn::NodeBase::threshold, tree, tryProof(), osl::SimpleState::turn(), osl::checkmate::DfpnPathRecord::twin_list, osl::WHITE, and osl::checkmate::Dfpn::NodeBase::white_stand.
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::hasEscapeMove | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
size_t | limit, | ||
Move | last_move | ||
) |
Definition at line 1469 of file dfpn.cc.
References osl::alt(), osl::BLACK, osl::checkmate::Dfpn::Node::clear(), osl::eval::convert(), osl::NumEffectState::countEffect(), osl::Move::from(), osl::NumEffectState::hasEffectAt(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::Square::index(), osl::Move::isDrop(), osl::Move::isNormal(), osl::Move::isPromotion(), osl::SimpleState::kingSquare(), osl::checkmate::ProofDisproof::LoopDetection(), osl::checkmate::Dfpn::NodeBase::moved, osl::checkmate::DfpnRecordBase::need_full_width, osl::checkmate::ProofDisproof::NoCheckmate(), node_count, node_count_limit, osl::checkmate::ProofDisproof::NoEscape(), osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::PAWN, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::Move::ptype(), osl::checkmate::Dfpn::NodeBase::record, ROOT_DISPROOF_TOL, ROOT_PROOF_TOL, osl::sign(), sort(), table, osl::checkmate::Dfpn::NodeBase::threshold, osl::Move::to(), tree, osl::SimpleState::turn(), osl::checkmate::DfpnPathRecord::twin_list, osl::WHITE, osl::checkmate::Dfpn::NodeBase::white_stand, osl::Square::x(), and osl::Square::y().
Referenced by tryProofMain().
|
inline |
Definition at line 152 of file dfpn.h.
Referenced by osl::checkmate::DualDfpn::findProof().
void osl::checkmate::Dfpn::proofOracleAttack | ( | const ProofOracle & | oracle, |
int | proof_limit | ||
) |
Definition at line 2746 of file dfpn.cc.
References osl::stat::Ratio::add(), osl::PieceStand::add(), osl::checkmate::Dfpn::Node::allocate(), osl::alt(), osl::checkmate::OracleAdjust::attack(), osl::checkmate::BadAttackLoop, osl::checkmate::DfpnRecordBase::best_move, osl::checkmate::ProofDisproof::Checkmate(), osl::checkmate::Dfpn::Node::children, osl::checkmate::Dfpn::Node::children_path, osl::FixedCapacityVector< T, Capacity >::clear(), osl::checkmate::DfpnRecord::disproof(), osl::hash::HashKey::dumpContents(), findDagSource(), osl::checkmate::DfpnTable::findProofOracle(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMove(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::Move::isDrop(), osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::Dfpn::Node::isLoop(), osl::Move::isNormal(), osl::checkmate::Dfpn::ProofOracle::key, osl::checkmate::DfpnRecordBase::last_move, osl::eval::max(), osl::checkmate::Dfpn::NodeBase::moved, osl::checkmate::Dfpn::Node::moves, osl::hash::HashKey::newHashWithMove(), osl::checkmate::Dfpn::ProofOracle::newOracle(), osl::checkmate::Dfpn::Node::nextWhiteStand(), osl::checkmate::DfpnRecordBase::node_count, node_count, node_count_limit, osl::checkmate::ProofDisproof::NoEscape(), osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::PAWN, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecord::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, proofOracleDefense(), osl::Move::ptype(), osl::FixedCapacityVector< T, Capacity >::push_back(), osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, root_proof_simulation_limit, osl::checkmate::Dfpn::Node::setCheckmateAttack(), osl::checkmate::Dfpn::Node::setLoopDetection(), osl::checkmate::DfpnRecord::setProofPieces(), osl::checkmate::DfpnTable::showProofOracles(), osl::checkmate::DfpnTable::store(), table, thread_id, osl::checkmate::Dfpn::ProofOracle::traceable(), tree, osl::WHITE, osl::checkmate::Dfpn::ProofOracle::white_stand, and osl::checkmate::Dfpn::NodeBase::white_stand.
Referenced by osl::checkmate::Dfpn::CallProofOracleAttack< P, UseTable >::operator()(), and osl::checkmate::Dfpn::CallProofOracleDefense< P, UseTable >::operator()().
void osl::checkmate::Dfpn::proofOracleDefense | ( | const ProofOracle & | oracle, |
int | proof_limit | ||
) |
Definition at line 2872 of file dfpn.cc.
References osl::checkmate::Dfpn::Node::allocate(), osl::alt(), osl::checkmate::BadAttackLoop, blockingSimulation(), osl::checkmate::Dfpn::Node::children, osl::checkmate::Dfpn::Node::children_path, osl::checkmate::DfpnRecord::disproof(), osl::FixedCapacityVector< T, Capacity >::empty(), findDagSource(), grandParentSimulationSuitable(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMove(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::Dfpn::Node::hashes, osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::Dfpn::Node::isLoop(), osl::checkmate::ProofDisproof::isLoopDetection(), osl::Move::isNormal(), osl::checkmate::DfpnRecordBase::last_move, osl::checkmate::DfpnRecordBase::last_to, osl::checkmate::ProofPieces::leaf(), osl::eval::max(), osl::eval::min(), osl::checkmate::DfpnRecordBase::min_pdp, osl::checkmate::Dfpn::NodeBase::moved, osl::checkmate::Dfpn::Node::moves, osl::hash::HashKey::newHashWithMove(), osl::checkmate::Dfpn::ProofOracle::newOracle(), osl::checkmate::Dfpn::Node::nextWhiteStand(), osl::checkmate::ProofDisproof::NoCheckmate(), osl::checkmate::DfpnRecordBase::node_count, node_count, osl::checkmate::ProofDisproof::NoEscape(), osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecord::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, ProofSimulationTolerance, osl::checkmate::Dfpn::NodeBase::record, osl::checkmate::Dfpn::Node::setCheckmateChildInDefense(), osl::checkmate::Dfpn::Node::setCheckmateDefense(), osl::checkmate::Dfpn::Node::setLoopDetection(), osl::checkmate::DfpnRecord::setProofPieces(), osl::FixedCapacityVector< T, Capacity >::size(), osl::checkmate::DfpnRecordBase::solved, osl::checkmate::DfpnRecord::stands, osl::checkmate::DfpnTable::store(), table, osl::Move::to(), osl::checkmate::Dfpn::ProofOracle::traceable(), tree, osl::WHITE, and osl::checkmate::Dfpn::NodeBase::white_stand.
Referenced by osl::checkmate::Dfpn::CallProofOracleDefense< P, UseTable >::operator()(), and proofOracleAttack().
|
inline |
void osl::checkmate::Dfpn::setIllegal | ( | const HashKey & | key, |
PieceStand | white | ||
) |
Definition at line 1311 of file dfpn.cc.
References osl::checkmate::DfpnTable::attack(), osl::BLACK, hasCheckmateMove(), osl::checkmate::ProofDisproof::NoCheckmate(), path_table, osl::checkmate::DfpnRecordBase::proof_disproof, osl::checkmate::DfpnTable::store(), table, osl::checkmate::DfpnPathRecord::visiting, and osl::WHITE.
Referenced by osl::checkmate::DualDfpn::writeRootHistory().
|
inline |
Definition at line 132 of file dfpn.h.
References osl::Move::INVALID().
void osl::checkmate::Dfpn::setTable | ( | DfpnTable * | new_table | ) |
Definition at line 1296 of file dfpn.cc.
References EnableGCDepth, osl::checkmate::DfpnTable::growthLimit(), GrowthLimitInfty, parallel_shared, path_table, osl::checkmate::DfpnTable::setMaxDepth(), table, and tree.
|
static |
Definition at line 1555 of file dfpn.cc.
References osl::FixedCapacityVector< T, Capacity >::begin(), generateCheck(), osl::PTYPE_EMPTY, and osl::FixedCapacityVector< T, Capacity >::size().
Referenced by hasEscapeMove().
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::tryProof | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
const ProofOracle & | oracle, | ||
size_t | oracle_id, | ||
Move & | best_move, | ||
Move | last_move = Move::INVALID() |
||
) |
Definition at line 1393 of file dfpn.cc.
References tryProofLight().
Referenced by hasCheckmateMove().
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::tryProofLight | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
const ProofOracle & | oracle, | ||
size_t | oracle_id, | ||
Move & | best_move, | ||
Move | last_move = Move::INVALID() |
||
) |
Definition at line 1401 of file dfpn.cc.
Referenced by tryProof().
|
private |
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::tryProofMain | ( | const NumEffectState & | state, |
const HashKey & | key, | ||
const PathEncoding & | path, | ||
const ProofOracle & | oracle, | ||
size_t | oracle_id, | ||
Move & | best_move, | ||
Move | last_move | ||
) |
Definition at line 1413 of file dfpn.cc.
References osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, osl::checkmate::Dfpn::Node::clear(), hasEscapeMove(), osl::checkmate::Dfpn::NodeBase::hash_key, osl::checkmate::ProofDisproof::isFinal(), osl::checkmate::DfpnRecordBase::last_move, osl::checkmate::DfpnTable::leaveWorking(), osl::checkmate::ProofDisproof::LoopDetection(), osl::checkmate::Dfpn::NodeBase::moved, node_count, node_count_limit, osl::checkmate::Dfpn::NodeBase::path, osl::checkmate::Dfpn::NodeBase::path_record, path_table, osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecordBase::proof_disproof, ProofSimulationTolerance, osl::checkmate::Dfpn::NodeBase::record, ROOT_DISPROOF_TOL, root_proof_simulation_limit, ROOT_PROOF_TOL, osl::checkmate::DfpnTable::store(), table, thread_id, osl::checkmate::Dfpn::NodeBase::threshold, tree, osl::checkmate::DfpnRecordBase::tried_oracle, osl::SimpleState::turn(), osl::checkmate::DfpnPathRecord::twin_list, osl::WHITE, and osl::checkmate::Dfpn::NodeBase::white_stand.
|
private |
|
private |
Definition at line 121 of file dfpn.h.
Referenced by attack(), defense(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), proofOracleDefense(), and tryProofMain().
|
private |
Definition at line 122 of file dfpn.h.
Referenced by attack(), defense(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), and tryProofMain().
|
private |
Definition at line 123 of file dfpn.h.
Referenced by attack(), defense(), findDagSource(), hasCheckmateMove(), and setTable().
|
private |
Definition at line 120 of file dfpn.h.
Referenced by analyze(), attack(), clear(), defense(), distance(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), proofOracleDefense(), setIllegal(), setTable(), and tryProofMain().
|
private |
Definition at line 115 of file dfpn.h.
Referenced by analyze(), attack(), blockingSimulation(), defense(), findDagSource(), grandParentSimulation(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), proofOracleDefense(), setIllegal(), setTable(), and tryProofMain().
|
private |
Definition at line 124 of file dfpn.h.
Referenced by attack(), defense(), hasCheckmateMove(), proofOracleAttack(), and tryProofMain().
|
private |
Definition at line 118 of file dfpn.h.
Referenced by attack(), blockingSimulation(), defense(), findDagSource(), grandParentSimulation(), grandParentSimulationSuitable(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), proofOracleDefense(), setTable(), and tryProofMain().