#include <ntesukiSimulationSearcher.h>
Classes | |
class | AttackHelperDisproof |
class | AttackHelperDisproof |
class | AttackHelperProof |
class | AttackHelperProof |
class | DefenseHelperDisproof |
class | DefenseHelperDisproof |
class | DefenseHelperProof |
class | DefenseHelperProof |
Public Member Functions | |
NtesukiSimulationSearcher (state_t &state, NtesukiMoveGenerator *mg, PathEncoding &path, NtesukiTable &table, NtesukiRecord::ISScheme isscheme, bool verbose=false) | |
~NtesukiSimulationSearcher () | |
template<Player P> | |
bool | startFromAttackProof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Start simulation to proof, P as Attacker. More... | |
template<Player P> | |
bool | startFromDefenseProof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Start simulation to proof, P as Defender. More... | |
template<Player P> | |
bool | startFromAttackDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Start simulation to disproof, P as Attacker. More... | |
template<Player P> | |
bool | startFromDefenseDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Start simulation to disproof, P as Defender. More... | |
unsigned int | nodeCount () const |
Public Attributes | |
bool | debug |
Private Member Functions | |
template<Player P> | |
bool | isSafeMove (const Move move, int pass_left) |
Still cannot see if is safe move. More... | |
template<Player P> | |
Move | adjustMove (Move candidate) const |
template<Player P> | |
void | attackForProof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Proof 攻撃に関する計算 More... | |
template<Player P> | |
void | defenseForProof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 防御に関する計算 More... | |
template<Player P> | |
void | attackForDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 攻撃に関する計算 More... | |
template<Player P> | |
void | defenseForDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 防御に関する計算 More... | |
Private Attributes | |
unsigned int | node_count |
現在までに何ノード読んだか More... | |
bool | verbose |
経過をどこまで表示するか More... | |
unsigned int | proof_count |
Simulation 結果の統計 More... | |
unsigned int | proof_success_count |
unsigned int | light_proof_success_count |
unsigned int | disproof_count |
unsigned int | disproof_success_count |
NtesukiResult | result |
state_t & | state |
NtesukiMoveGenerator * | mg |
PathEncoding & | path |
NtesukiTable & | table |
NtesukiRecord::ISScheme | isscheme |
Definition at line 15 of file ntesukiSimulationSearcher.h.
osl::ntesuki::NtesukiSimulationSearcher::NtesukiSimulationSearcher | ( | state_t & | state, |
NtesukiMoveGenerator * | mg, | ||
PathEncoding & | path, | ||
NtesukiTable & | table, | ||
NtesukiRecord::ISScheme | isscheme, | ||
bool | verbose = false |
||
) |
Definition at line 10 of file ntesukiSimulationSearcher.cc.
osl::ntesuki::NtesukiSimulationSearcher::~NtesukiSimulationSearcher | ( | ) |
Definition at line 34 of file ntesukiSimulationSearcher.cc.
References verbose.
|
inlineprivate |
Definition at line 56 of file ntesukiSimulationSearcher.h.
References osl::Move::isDrop(), osl::Move::isValid(), osl::state::SimpleState::pieceOnBoard(), and osl::Move::to().
|
private |
Disproof 攻撃に関する計算
Definition at line 92 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::generateMoves(), osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getValue(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isCheck(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::ntesuki::NtesukiMove::isCheckmateFail(), osl::checkmate::ProofDisproof::isFinal(), osl::ntesuki::NtesukiMove::isInvalid(), osl::ntesuki::NtesukiMove::isNoPromote(), osl::ntesuki::NtesukiMove::isPass(), osl::ntesuki::NtesukiRecord::isVisited(), osl::checkmate::ProofDisproof::LoopDetection(), moves, osl::checkmate::ProofDisproof::NoCheckmate(), ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiMove::setCheckmateFail(), osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
|
private |
Proof 攻撃に関する計算
Definition at line 143 of file ntesukiSimulationSearcherProof.tcc.
References CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isCheck(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::checkmate::ProofDisproof::isFinal(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), osl::ntesuki::NtesukiMove::isInvalid(), osl::move_classifier::PlayerMoveAdaptor< Classifier >::isMember(), osl::ntesuki::NtesukiMove::isValid(), osl::Move::isValid(), osl::ntesuki::NtesukiRecord::isVisited(), osl::checkmate::ProofDisproof::LoopDetection(), osl::checkmate::ProofDisproof::NoCheckmate(), ntesuki_assert, osl::checkmate::ProofDisproof::PawnCheckmate(), result, RETURN, osl::ntesuki::NtesukiMove::setCheckmateSuccess(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
|
private |
Disproof 防御に関する計算
Definition at line 252 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValue(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isFinal(), osl::ntesuki::NtesukiMove::isInvalid(), osl::ntesuki::NtesukiRecord::isVisited(), osl::checkmate::ProofDisproof::LoopDetection(), ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
|
private |
Disproof 防御に関する計算
Definition at line 304 of file ntesukiSimulationSearcherProof.tcc.
References osl::checkmate::ProofDisproof::AttackBack(), CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::generateMoves(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getValue(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isCheck(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::ntesuki::NtesukiMove::isCheckmateSuccess(), osl::checkmate::ProofDisproof::isFinal(), osl::ntesuki::NtesukiMove::isPass(), osl::ntesuki::NtesukiRecord::isVisited(), osl::checkmate::ProofDisproof::LoopDetection(), moves, osl::checkmate::ProofDisproof::NoCheckmate(), osl::checkmate::ProofDisproof::NoEscape(), ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
|
private |
Still cannot see if is safe move.
Definition at line 130 of file ntesukiSimulationSearcherProof.tcc.
References osl::Move::from(), osl::Move::isDrop(), osl::move_classifier::SafeMove< P >::isMember(), osl::Move::ptype(), and osl::Move::to().
|
inline |
Definition at line 153 of file ntesukiSimulationSearcher.h.
template bool osl::ntesuki::NtesukiSimulationSearcher::startFromAttackDisproof< WHITE > | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) |
Start simulation to disproof, P as Attacker.
Definition at line 396 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, osl::ntesuki::NtesukiRecord::getValue(), osl::checkmate::ProofDisproof::isCheckmateFail(), ntesuki_assert, result, and TRY_DFPN.
template bool osl::ntesuki::NtesukiSimulationSearcher::startFromAttackProof< WHITE > | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) |
Start simulation to proof, P as Attacker.
Definition at line 494 of file ntesukiSimulationSearcherProof.tcc.
References CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::ntesuki::NtesukiRecord::isDominatedByProofPieces(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), osl::checkmate::ProofDisproof::NoCheckmate(), ntesuki_assert, result, osl::ntesuki::NtesukiRecord::setUpNode(), osl::ntesuki::OracleProverLight::startFromAttack(), and TRY_DFPN.
template bool osl::ntesuki::NtesukiSimulationSearcher::startFromDefenseDisproof< WHITE > | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) |
Start simulation to disproof, P as Defender.
Definition at line 424 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, osl::ntesuki::NtesukiRecord::getValue(), osl::checkmate::ProofDisproof::isCheckmateFail(), ntesuki_assert, result, and TRY_DFPN.
template bool osl::ntesuki::NtesukiSimulationSearcher::startFromDefenseProof< WHITE > | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) |
Start simulation to proof, P as Defender.
Definition at line 573 of file ntesukiSimulationSearcherProof.tcc.
References CATCH_DFPN, osl::checkmate::ProofDisproof::Checkmate(), osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::checkmate::ProofDisproof::isCheckmateFail(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::ntesuki::NtesukiRecord::isDominatedByProofPieces(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), osl::checkmate::ProofDisproof::NoCheckmate(), ntesuki_assert, result, osl::ntesuki::NtesukiRecord::setUpNode(), osl::ntesuki::OracleProverLight::startFromDefense(), and TRY_DFPN.
bool osl::ntesuki::NtesukiSimulationSearcher::debug |
Definition at line 30 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 27 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 28 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 37 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 26 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 34 of file ntesukiSimulationSearcher.h.
|
private |
現在までに何ノード読んだか
Definition at line 19 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 35 of file ntesukiSimulationSearcher.h.
|
private |
Simulation 結果の統計
Definition at line 24 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 25 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 32 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 33 of file ntesukiSimulationSearcher.h.
|
private |
Definition at line 36 of file ntesukiSimulationSearcher.h.
|
private |
経過をどこまで表示するか
Definition at line 21 of file ntesukiSimulationSearcher.h.