深さ固定で,その深さまで depth first searchで読む詰将棋. More...
#include <fixedDepthSearcher.h>
Public Member Functions | |
FixedDepthSearcher () | |
FixedDepthSearcher (NumEffectState &s) | |
void | setState (NumEffectState &s) |
int | getCount () const |
const PieceStand | stand (Player P) const |
template<Player P, class SetPieces , bool HasGuide> | |
const ProofDisproof | attack (int depth, Move &best_move, PieceStand &proof_pieces) |
template<Player P, class SetPieces , bool HasGuide> | |
const ProofDisproof | attackMayUnsafe (int depth, Move &best_move, PieceStand &proof_pieces) |
template<Player P, class SetPieces > | |
const ProofDisproof | defense (Move last_move, int depth, PieceStand &proof_pieces) |
template<Player P> | |
const ProofDisproof | hasCheckmateMove (int depth, Move &best_move) |
template<Player P> | |
const ProofDisproof | hasCheckmateMove (int depth) |
template<Player P> | |
const ProofDisproof | hasEscapeMove (Move last_move, int depth) |
template<Player P> | |
const ProofDisproof | hasEscapeByMove (Move next_move, int depth) |
const ProofDisproof | hasCheckmateMoveOfTurn (int depth, Move &best_move) |
const ProofDisproof | hasEscapeMoveOfTurn (Move last_move, int depth) |
const ProofDisproof | hasEscapeByMoveOfTurn (Move next_move, int depth) |
template<Player Defense> | |
void | generateBlockingWhenLiberty0 (Piece defense_king, Square attack_from, CheckMoveVector &moves) const |
無駄合をなるべく生成しない,合駒生成 More... | |
template<Player Defense> | |
int | blockEstimation (Square attack_from, Square defense_king) const |
Protected Attributes | |
NumEffectState * | state |
int | count |
Private Member Functions | |
void | addCount () |
template<Player P, class SetPieces > | |
const ProofDisproof | defenseEstimation (Move last_move, PieceStand &proof_pieces, Piece attacker_piece, Square target_position) const |
move を作らずに ProofDisproof の予測を計算する More... | |
深さ固定で,その深さまで depth first searchで読む詰将棋.
深さ0で詰み状態かどうか(攻め手の手番の場合),王手をかける手がないかを判定可能 深さ1で通常の一手詰みを判定(攻め手の手番の場合) 使うのは深さ3位まで? NumEffectState専用
Definition at line 40 of file fixedDepthSearcher.h.
|
inline |
Definition at line 46 of file fixedDepthSearcher.h.
|
inlineexplicit |
Definition at line 49 of file fixedDepthSearcher.h.
|
inlineprivate |
Definition at line 58 of file fixedDepthSearcher.h.
const ProofDisproof osl::checkmate::FixedDepthSearcher::attack | ( | int | depth, |
Move & | best_move, | ||
PieceStand & | proof_pieces | ||
) |
const ProofDisproof osl::checkmate::FixedDepthSearcher::attackMayUnsafe | ( | int | depth, |
Move & | best_move, | ||
PieceStand & | proof_pieces | ||
) |
int osl::checkmate::FixedDepthSearcher::blockEstimation | ( | Square | attack_from, |
Square | defense_king | ||
) | const |
const ProofDisproof osl::checkmate::FixedDepthSearcher::defense | ( | Move | last_move, |
int | depth, | ||
PieceStand & | proof_pieces | ||
) |
|
private |
move を作らずに ProofDisproof の予測を計算する
void osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0 | ( | Piece | defense_king, |
Square | attack_from, | ||
CheckMoveVector & | moves | ||
) | const |
無駄合をなるべく生成しない,合駒生成
|
inline |
Definition at line 63 of file fixedDepthSearcher.h.
|
inline |
Definition at line 90 of file fixedDepthSearcher.h.
|
inline |
Definition at line 96 of file fixedDepthSearcher.h.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMoveOfTurn | ( | int | depth, |
Move & | best_move | ||
) |
Definition at line 10 of file fixedDepthSearcher.cc.
References osl::BLACK, hasEscapeMoveOfTurn(), state, and osl::SimpleState::turn().
Referenced by osl::move_probability::StateInfo::findShortThreatmate(), and osl::checkmate::ProofTreeDepthDfpn::orNode().
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMove | ( | Move | next_move, |
int | depth | ||
) |
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMoveOfTurn | ( | Move | next_move, |
int | depth | ||
) |
Definition at line 30 of file fixedDepthSearcher.cc.
References osl::BLACK, state, and osl::SimpleState::turn().
Referenced by osl::checkmate::CheckmateIfCapture::cannotCapture(), and hasEscapeMoveOfTurn().
|
inline |
Definition at line 103 of file fixedDepthSearcher.h.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeMoveOfTurn | ( | Move | last_move, |
int | depth | ||
) |
Definition at line 20 of file fixedDepthSearcher.cc.
References osl::BLACK, hasEscapeByMoveOfTurn(), state, and osl::SimpleState::turn().
Referenced by hasCheckmateMoveOfTurn().
|
inline |
Definition at line 53 of file fixedDepthSearcher.h.
|
inline |
Definition at line 67 of file fixedDepthSearcher.h.
References osl::checkmate::NoProofPieces::attack().
|
protected |
Definition at line 44 of file fixedDepthSearcher.h.
|
protected |
Definition at line 43 of file fixedDepthSearcher.h.
Referenced by osl::checkmate::FixedDepthSolverExt::hasCheckmateMoveOfTurn(), hasCheckmateMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuide(), osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuideOfTurn(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMove(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMoveOfTurn(), hasEscapeByMoveOfTurn(), and hasEscapeMoveOfTurn().