構成 | Public 型 | Public メソッド | Static Public メソッド | Private メソッド | Private 変数

クラス osl::checkmate::Dfpn

詰探索 [詳細]

#include <dfpn.h>

osl::checkmate::Dfpnのコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

構成

struct  CallAttack
struct  CallDefense
struct  CallProofOracleAttack
struct  CallProofOracleDefense
struct  DepthLimitReached
struct  Node
struct  NodeBase
struct  ProofOracle
struct  Tree

Public 型

enum  { DfpnMaxUniqMoves = CheckOrEscapeMaxUniqMoves }
typedef CheckMoveVector DfpnMoveVector
typedef DfpnTable table_t

Public メソッド

 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 DfpnTablecurrentTable () 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 &)
 合駒が詰と判った直後に、同じような合駒を詰める
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

Static Public メソッド

template<Player P>
static void generateCheck (const NumEffectState &, DfpnMoveVector &, bool &)
 Pは攻撃側.
template<Player P>
static void generateEscape (const NumEffectState &, bool need_full_width, Square grand_parent_delay_last_to, DfpnMoveVector &)
 Pは攻撃側.
template<Player Turn>
static void sort (const NumEffectState &, DfpnMoveVector &)

Private メソッド

 Dfpn (const Dfpn &)
Dfpnoperator= (const Dfpn &)
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 変数

DfpnTabletable
std::unique_ptr< Treetree
std::unique_ptr< DfpnPathTablepath_table
size_t node_count
size_t node_count_limit
DfpnSharedparallel_shared
int thread_id
bool blocking_verify

説明

詰探索

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


型定義

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

dfpn.h113 行で定義されています。


列挙型

anonymous enum
列挙型の値:
DfpnMaxUniqMoves 

dfpn.h111 行で定義されています。


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

osl::checkmate::Dfpn::Dfpn ( const Dfpn  )  [private]
osl::checkmate::Dfpn::Dfpn (  ) 

dfpn.cc1287 行で定義されています。

osl::checkmate::Dfpn::~Dfpn (  ) 

dfpn.cc1292 行で定義されています。


関数

void osl::checkmate::Dfpn::analyze ( const PathEncoding path,
const NumEffectState state,
const std::vector< Move > &  moves 
) const
template<osl::Player P>
void osl::checkmate::Dfpn::attack (  ) 

dfpn.cc1656 行で定義されています。

参照先 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(), osl::PtypeTable::getEffect(), osl::GOLD, osl::checkmate::DfpnTable::growthLimit(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMove(), osl::EffectContent::hasUnblockableEffect(), IgnoreUpwardDisproofThreshold, 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::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::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, tree, osl::unpromote(), UpwardWeight, osl::WHITE, と osl::checkmate::DfpnRecordBase::working_threads.

参照元 proofOracleAttack(), と osl::checkmate::Dfpn::Node::setCheckmateAttack().

template<osl::Player P>
void osl::checkmate::Dfpn::blockingSimulation ( int  seed,
const ProofOracle oracle 
)
void osl::checkmate::Dfpn::clear (  ) 

dfpn.cc1305 行で定義されています。

参照先 path_table.

const DfpnTable& osl::checkmate::Dfpn::currentTable (  )  const [inline]

dfpn.h153 行で定義されています。

参照先 table.

template<osl::Player P>
void osl::checkmate::Dfpn::defense (  ) 

dfpn.cc2183 行で定義されています。

参照先 AdHocSumScale, osl::checkmate::Dfpn::Node::allocate(), osl::alt(), osl::checkmate::BadAttackLoop, osl::CArray< T, Capacity >::begin(), osl::FixedCapacityVector< T, Capacity >::begin(), osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, 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::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::checkmate::Dfpn::Node::nextWhiteStand(), osl::checkmate::DfpnPathRecord::node_count, osl::checkmate::DfpnRecordBase::node_count, 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, osl::Move::to(), tree, UpwardWeight, osl::checkmate::Dfpn::Node::visit_time, osl::WHITE, osl::checkmate::Dfpn::NodeBase::white_stand, と osl::checkmate::DfpnRecordBase::working_threads.

参照元 osl::checkmate::Dfpn::Node::setNoCheckmateDefense().

int osl::checkmate::Dfpn::distance ( const HashKey &  key  )  const

dfpn.cc3131 行で定義されています。

参照先 osl::checkmate::DfpnPathRecord::distance, と path_table.

参照元 osl::checkmate::DualDfpn::distance().

void osl::checkmate::Dfpn::findDagSource (  )  [private]

dfpn.cc1647 行で定義されています。

参照先 tree.

参照元 attack(), defense(), proofOracleAttack(), と proofOracleDefense().

void osl::checkmate::Dfpn::findDagSource ( const HashKey &  terminal_key,
DfpnRecord terminal_record,
PieceStand  terminal_stand,
int  offset = 0 
) [private]
template<osl::Player P>
void osl::checkmate::Dfpn::generateCheck ( const NumEffectState state,
DfpnMoveVector moves,
bool &  has_pawn_checkmate 
) [static]
template<osl::Player P>
void osl::checkmate::Dfpn::generateEscape ( const NumEffectState state,
bool  need_full_width,
Square  grand_parent_delay_last_to,
DfpnMoveVector moves 
) [static]
template<osl::Player P>
void osl::checkmate::Dfpn::grandParentSimulation ( int  cur_move,
const Node gparent,
int  gp_move 
)
bool osl::checkmate::Dfpn::grandParentSimulationSuitable (  )  const

test suitability of simulation of grand-parent relation

dfpn.cc2162 行で定義されています。

参照先 osl::Move::from(), osl::Move::isCapture(), osl::Move::isNormal(), osl::checkmate::Dfpn::NodeBase::moved, osl::Move::to(), と tree.

参照元 defense(), と 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 
)

dfpn.cc1329 行で定義されています。

参照元 osl::checkmate::DualDfpn::findProof().

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 
)
const osl::checkmate::ProofDisproof osl::checkmate::Dfpn::hasEscapeMove ( const NumEffectState state,
const HashKey &  key,
const PathEncoding path,
size_t  limit,
Move  last_move 
)
size_t osl::checkmate::Dfpn::nodeCount (  )  const [inline]

dfpn.h152 行で定義されています。

参照先 node_count.

参照元 osl::checkmate::DualDfpn::findProof().

Dfpn& osl::checkmate::Dfpn::operator= ( const Dfpn  )  [private]
template<osl::Player P, bool UseTable>
void osl::checkmate::Dfpn::proofOracleAttack ( const ProofOracle oracle,
int  proof_limit 
)

dfpn.cc2746 行で定義されています。

参照先 osl::PieceStand::add(), osl::stat::Ratio::add(), osl::checkmate::Dfpn::Node::allocate(), osl::alt(), 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(), 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::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::checkmate::ProofDisproof::PawnCheckmate(), osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecord::proof(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::Move::ptype(), osl::FixedCapacityVector< T, Capacity >::push_back(), osl::PathEncoding::pushMove(), osl::checkmate::Dfpn::NodeBase::record, 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, と osl::checkmate::Dfpn::NodeBase::white_stand.

template<osl::Player P, bool UseTable>
void osl::checkmate::Dfpn::proofOracleDefense ( const ProofOracle oracle,
int  proof_limit 
)

dfpn.cc2872 行で定義されています。

参照先 osl::checkmate::Dfpn::Node::allocate(), osl::alt(), osl::checkmate::BadAttackLoop, 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::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, と osl::checkmate::Dfpn::NodeBase::white_stand.

void osl::checkmate::Dfpn::setBlockingVerify ( bool  enable = true  )  [inline]

dfpn.h131 行で定義されています。

参照先 blocking_verify.

void osl::checkmate::Dfpn::setIllegal ( const HashKey &  key,
PieceStand  white 
)
void osl::checkmate::Dfpn::setParallel ( int  id,
DfpnShared s 
) [inline]

dfpn.h132 行で定義されています。

参照先 parallel_shared, と thread_id.

void osl::checkmate::Dfpn::setTable ( DfpnTable new_table  ) 
template<osl::Player Turn>
void osl::checkmate::Dfpn::sort ( const NumEffectState state,
DfpnMoveVector moves 
) [static]
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() 
)

dfpn.cc1393 行で定義されています。

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() 
)

dfpn.cc1401 行で定義されています。

template<bool UseTable>
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 
) [private]

変数

dfpn.h125 行で定義されています。

参照元 defense(), と setBlockingVerify().

dfpn.h122 行で定義されています。

参照元 attack(), defense(), hasCheckmateMove(), hasEscapeMove(), proofOracleAttack(), と tryProofMain().

dfpn.h123 行で定義されています。

参照元 attack(), defense(), findDagSource(), hasCheckmateMove(), setParallel(), と setTable().

std::unique_ptr<DfpnPathTable> osl::checkmate::Dfpn::path_table [private]

dfpn.h124 行で定義されています。

参照元 attack(), defense(), hasCheckmateMove(), proofOracleAttack(), setParallel(), と tryProofMain().

std::unique_ptr<Tree> osl::checkmate::Dfpn::tree [private]

このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義