My Project
|
証明数(proof number)と反証数(disproof number). More...
#include <proofDisproof.h>
Public Types | |
enum | { PROOF_SHIFT = 32 , DISPROOF_MASK = 0xffffffffu , PROOF_MAX = (0xffffffffu / 16) , DISPROOF_MAX = (0xffffffffu / 16) , NO_ESCAPE_DISPROOF = (DISPROOF_MAX - 1) , CHECK_MATE_DISPROOF = (DISPROOF_MAX - 2) , NO_CHECK_MATE_PROOF = (PROOF_MAX - 1) , PAWN_CHECK_MATE_PROOF = (PROOF_MAX - 2) , LOOP_DETECTION_PROOF = (PROOF_MAX - 3) , ATTACK_BACK_PROOF = (PROOF_MAX - 4) } |
enum | { DISPROOF_LIMIT = (DISPROOF_MAX - 3) , PROOF_LIMIT = (PROOF_MAX - 5) } |
Public Member Functions | |
ProofDisproof () | |
ProofDisproof (unsigned int proof, unsigned int disproof) | |
unsigned int | proof () const |
unsigned int | disproof () const |
bool | isCheckmateSuccess () const |
bool | isCheckmateFail () const |
bool | isFinal () const |
bool | isUnknown () const |
bool | isPawnDropFoul (Move move) const |
打歩詰めなら真 | |
bool | isLoopDetection () const |
unsigned long long | ulonglongValue () const |
bool | isBetterForAttack (const ProofDisproof &r) const |
this が r より攻方に都合が良い時に真 | |
bool | isBetterForDefense (const ProofDisproof &r) const |
this が r より受方に都合が良い時に真 | |
const ProofDisproof & | betterForAttack (const ProofDisproof &r) const |
攻方に都合が良い方を返す | |
const ProofDisproof & | betterForDefense (const ProofDisproof &r) const |
受方に都合が良い方を返す | |
Static Public Member Functions | |
static const ProofDisproof | makeDirect (unsigned long long value) |
static const ProofDisproof | NoEscape () |
static const ProofDisproof | Checkmate () |
static const ProofDisproof | NoCheckmate () |
static const ProofDisproof | PawnCheckmate () |
static const ProofDisproof | LoopDetection () |
static const ProofDisproof | AttackBack () |
static const ProofDisproof | Unknown () |
static const ProofDisproof | Bottom () |
攻方にも受方にも不都合な仮想的な数 | |
Static Public Attributes | |
static const unsigned int | BigProofNumber =PROOF_MAX |
Private Member Functions | |
ProofDisproof (unsigned long long value) | |
range check をしない private バージョン | |
Static Private Member Functions | |
static void | testConsistency () |
static unsigned long long | compose (unsigned long long proof, unsigned long long disproof) |
static const ProofDisproof | make (unsigned int proof, unsigned int disproof) |
Private Attributes | |
unsigned long long | pdp |
証明数(proof number)と反証数(disproof number).
詰み局面と確定した時は proofNumber=0 不詰み局面と確定した時は disproofNumber=0
Definition at line 16 of file proofDisproof.h.
anonymous enum |
Definition at line 20 of file proofDisproof.h.
anonymous enum |
Enumerator | |
---|---|
DISPROOF_LIMIT | 通常の反証数の上限 |
PROOF_LIMIT | 通常の証明数の上限 |
Definition at line 37 of file proofDisproof.h.
|
inlineprivate |
range check をしない private バージョン
Definition at line 50 of file proofDisproof.h.
|
inline |
Definition at line 59 of file proofDisproof.h.
Referenced by AttackBack(), Checkmate(), LoopDetection(), make(), makeDirect(), NoCheckmate(), NoEscape(), PawnCheckmate(), and Unknown().
|
inline |
Definition at line 62 of file proofDisproof.h.
References disproof(), DISPROOF_LIMIT, DISPROOF_MAX, proof(), PROOF_LIMIT, and PROOF_MAX.
|
inlinestatic |
Definition at line 79 of file proofDisproof.h.
References ATTACK_BACK_PROOF, and ProofDisproof().
|
inline |
|
inline |
|
inlinestatic |
攻方にも受方にも不都合な仮想的な数
Definition at line 82 of file proofDisproof.h.
References DISPROOF_MAX, make(), and PROOF_MAX.
|
inlinestatic |
Definition at line 75 of file proofDisproof.h.
References CHECK_MATE_DISPROOF, and ProofDisproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::proofOracleAttack(), and osl::checkmate::Dfpn::Node::setCheckmateDefense().
|
inlinestaticprivate |
Definition at line 45 of file proofDisproof.h.
References disproof(), proof(), and PROOF_SHIFT.
Referenced by make().
|
inline |
Definition at line 85 of file proofDisproof.h.
References DISPROOF_MASK, and pdp.
Referenced by osl::checkmate::Dfpn::attack(), compose(), osl::checkmate::Dfpn::defense(), osl::checkmate::DfpnRecord::disproof(), isBetterForAttack(), isBetterForDefense(), isCheckmateFail(), make(), osl::checkmate::operator<<(), and ProofDisproof().
|
inline |
this が r より攻方に都合が良い時に真
Definition at line 106 of file proofDisproof.h.
References disproof(), and proof().
Referenced by betterForAttack().
|
inline |
this が r より受方に都合が良い時に真
Definition at line 117 of file proofDisproof.h.
References disproof(), and proof().
Referenced by betterForDefense().
|
inline |
Definition at line 87 of file proofDisproof.h.
References disproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), isFinal(), osl::checkmate::Dfpn::proofOracleDefense(), osl::checkmate::Dfpn::Node::setNoCheckmateAttack(), and osl::checkmate::Dfpn::Node::setNoCheckmateDefense().
|
inline |
Definition at line 86 of file proofDisproof.h.
References proof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::blockingSimulation(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::checkmate::Dfpn::defense(), osl::checkmate::DualDfpn::findProof(), osl::move_probability::StateInfo::findShortThreatmate(), osl::checkmate::Dfpn::grandParentSimulation(), osl::checkmate::Dfpn::hasCheckmateMove(), isFinal(), osl::checkmate::DualDfpn::isLosingState(), osl::checkmate::DualDfpn::isWinningState(), osl::checkmate::ProofTreeDepthDfpn::orNode(), osl::checkmate::Dfpn::proofOracleAttack(), osl::checkmate::Dfpn::proofOracleDefense(), osl::checkmate::Dfpn::Node::setCheckmateAttack(), and osl::checkmate::Dfpn::Node::setCheckmateDefense().
|
inline |
Definition at line 88 of file proofDisproof.h.
References isCheckmateFail(), and isCheckmateSuccess().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::DualDfpn::findProof(), osl::move_probability::StateInfo::findShortThreatmate(), osl::checkmate::Dfpn::hasCheckmateMove(), isUnknown(), osl::checkmate::DfpnTable::List::probe(), osl::checkmate::Dfpn::proofOracleAttack(), osl::checkmate::Dfpn::Node::setLoopDetection(), osl::checkmate::DfpnTable::List::store(), and osl::checkmate::Dfpn::tryProofMain().
|
inline |
Definition at line 97 of file proofDisproof.h.
References LoopDetection(), and pdp.
Referenced by osl::checkmate::DfpnTable::addDag(), osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::DualDfpn::findProof(), osl::checkmate::Dfpn::Node::setLoopDetection(), osl::checkmate::Dfpn::Node::setNoCheckmateAttack(), osl::checkmate::Dfpn::Node::setNoCheckmateDefense(), and osl::checkmate::DfpnTable::store().
|
inline |
打歩詰めなら真
Definition at line 92 of file proofDisproof.h.
References osl::Move::isDrop(), osl::Move::isNormal(), NoEscape(), osl::PAWN, pdp, and osl::Move::ptype().
|
inline |
Definition at line 89 of file proofDisproof.h.
References isFinal().
|
inlinestatic |
Definition at line 78 of file proofDisproof.h.
References LOOP_DETECTION_PROOF, and ProofDisproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::DualDfpn::findProof(), osl::checkmate::Dfpn::hasCheckmateMove(), osl::checkmate::Dfpn::hasEscapeMove(), isLoopDetection(), and osl::checkmate::Dfpn::tryProofMain().
|
inlinestaticprivate |
Definition at line 54 of file proofDisproof.h.
References compose(), disproof(), proof(), and ProofDisproof().
Referenced by Bottom().
|
inlinestatic |
Definition at line 71 of file proofDisproof.h.
References ProofDisproof().
|
inlinestatic |
Definition at line 76 of file proofDisproof.h.
References NO_CHECK_MATE_PROOF, and ProofDisproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::hasEscapeMove(), osl::checkmate::Dfpn::proofOracleDefense(), and osl::checkmate::Dfpn::setIllegal().
|
inlinestatic |
Definition at line 74 of file proofDisproof.h.
References NO_ESCAPE_DISPROOF, and ProofDisproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::Dfpn::hasEscapeMove(), isPawnDropFoul(), osl::checkmate::Dfpn::proofOracleAttack(), and osl::checkmate::Dfpn::proofOracleDefense().
|
inlinestatic |
Definition at line 77 of file proofDisproof.h.
References PAWN_CHECK_MATE_PROOF, and ProofDisproof().
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::hasEscapeMove(), and osl::checkmate::Dfpn::proofOracleAttack().
|
inline |
Definition at line 84 of file proofDisproof.h.
References pdp, and PROOF_SHIFT.
Referenced by osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::blockingSimulation(), compose(), osl::checkmate::Dfpn::defense(), osl::checkmate::Dfpn::grandParentSimulation(), isBetterForAttack(), isBetterForDefense(), isCheckmateSuccess(), make(), osl::checkmate::operator<<(), osl::checkmate::DfpnRecord::proof(), and ProofDisproof().
|
staticprivate |
Definition at line 4 of file proofDisproof.cc.
|
inline |
Definition at line 99 of file proofDisproof.h.
References pdp.
Referenced by osl::checkmate::operator<(), and osl::checkmate::operator==().
|
inlinestatic |
Definition at line 80 of file proofDisproof.h.
References ProofDisproof().
|
static |
Definition at line 101 of file proofDisproof.h.
|
private |
Definition at line 18 of file proofDisproof.h.
Referenced by disproof(), isLoopDetection(), isPawnDropFoul(), proof(), and ulonglongValue().