#include <ntesukiSimulationSearcher.h>
Classes | |
class | AttackHelperDisproof |
class | AttackHelperProof |
class | DefenseHelperDisproof |
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. | |
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. | |
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. | |
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. | |
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. | |
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 攻撃に関する計算 | |
template<Player P> | |
void | defenseForProof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 防御に関する計算 | |
template<Player P> | |
void | attackForDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 攻撃に関する計算 | |
template<Player P> | |
void | defenseForDisproof (NtesukiRecord *record, const NtesukiRecord *record_orig, const unsigned int passLeft, const Move last_move) |
Disproof 防御に関する計算 | |
Private Attributes | |
unsigned int | node_count |
現在までに何ノード読んだか | |
bool | verbose |
経過をどこまで表示するか | |
unsigned int | proof_count |
Simulation 結果の統計 | |
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.
Definition at line 34 of file ntesukiSimulationSearcher.cc.
References verbose.
Move osl::ntesuki::NtesukiSimulationSearcher::adjustMove | ( | Move | candidate | ) | const [inline, private] |
Definition at line 56 of file ntesukiSimulationSearcher.h.
References osl::Move::isDrop(), osl::Move::isValid(), osl::state::SimpleState::pieceOnBoard(), and osl::Move::to().
void NtesukiSimulationSearcher::attackForDisproof | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) | [private] |
Disproof 攻撃に関する計算
Definition at line 92 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, 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::ntesuki::NtesukiMove::isCheckmateFail(), osl::ntesuki::NtesukiMove::isInvalid(), osl::ntesuki::NtesukiMove::isNoPromote(), osl::ntesuki::NtesukiMove::isPass(), osl::ntesuki::NtesukiRecord::isVisited(), moves, ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiMove::setCheckmateFail(), osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
void NtesukiSimulationSearcher::attackForProof | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) | [private] |
Proof 攻撃に関する計算
Definition at line 143 of file ntesukiSimulationSearcherProof.tcc.
References CATCH_DFPN, osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isCheck(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), osl::ntesuki::NtesukiMove::isInvalid(), osl::ntesuki::NtesukiMove::isValid(), osl::Move::isValid(), osl::ntesuki::NtesukiRecord::isVisited(), ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiMove::setCheckmateSuccess(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
void NtesukiSimulationSearcher::defenseForDisproof | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) | [private] |
Disproof 防御に関する計算
Definition at line 252 of file ntesukiSimulationSearcherDisproof.tcc.
References CATCH_DFPN, osl::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValue(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isInvalid(), osl::ntesuki::NtesukiRecord::isVisited(), ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
void NtesukiSimulationSearcher::defenseForProof | ( | NtesukiRecord * | record, |
const NtesukiRecord * | record_orig, | ||
const unsigned int | passLeft, | ||
const Move | last_move | ||
) | [private] |
Disproof 防御に関する計算
Definition at line 304 of file ntesukiSimulationSearcherProof.tcc.
References CATCH_DFPN, osl::ntesuki::NtesukiRecord::generateMoves(), osl::ntesuki::NtesukiMove::getMove(), osl::ntesuki::NtesukiRecord::getValue(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiMove::isCheck(), osl::ntesuki::NtesukiMove::isCheckmateSuccess(), osl::ntesuki::NtesukiMove::isPass(), osl::ntesuki::NtesukiRecord::isVisited(), moves, ntesuki_assert, result, RETURN, osl::ntesuki::NtesukiRecord::setLoopWithPath(), osl::ntesuki::NtesukiRecord::setResult(), osl::ntesuki::NtesukiRecord::setUpNode(), and TRY_DFPN.
bool NtesukiSimulationSearcher::isSafeMove | ( | const Move | move, |
int | pass_left | ||
) | [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::ptype(), and osl::Move::to().
unsigned int osl::ntesuki::NtesukiSimulationSearcher::nodeCount | ( | ) | const [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(), 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::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiRecord::isDominatedByProofPieces(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), 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(), 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::ntesuki::NtesukiRecord::getBestMove(), osl::ntesuki::NtesukiRecord::getValueWithPath(), osl::ntesuki::NtesukiRecord::isDominatedByProofPieces(), osl::ntesuki::NtesukiMove::isImmediateCheckmate(), ntesuki_assert, result, osl::ntesuki::NtesukiRecord::setUpNode(), osl::ntesuki::OracleProverLight::startFromDefense(), and TRY_DFPN.
Definition at line 30 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::disproof_count [private] |
Definition at line 27 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::disproof_success_count [private] |
Definition at line 28 of file ntesukiSimulationSearcher.h.
Definition at line 37 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::light_proof_success_count [private] |
Definition at line 26 of file ntesukiSimulationSearcher.h.
Definition at line 34 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::node_count [private] |
現在までに何ノード読んだか
Definition at line 19 of file ntesukiSimulationSearcher.h.
Definition at line 35 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::proof_count [private] |
Simulation 結果の統計
Definition at line 24 of file ntesukiSimulationSearcher.h.
unsigned int osl::ntesuki::NtesukiSimulationSearcher::proof_success_count [private] |
Definition at line 25 of file ntesukiSimulationSearcher.h.
Definition at line 32 of file ntesukiSimulationSearcher.h.
Definition at line 33 of file ntesukiSimulationSearcher.h.
Definition at line 36 of file ntesukiSimulationSearcher.h.
bool osl::ntesuki::NtesukiSimulationSearcher::verbose [private] |
経過をどこまで表示するか
Definition at line 21 of file ntesukiSimulationSearcher.h.