深さ固定で,その深さまで depth first searchで読む詰将棋. [詳細]
#include <fixedDepthSearcher.h>
Public メソッド | |
FixedDepthSearcher () | |
FixedDepthSearcher (NumEffectState &s) | |
void | setState (NumEffectState &s) |
int | getCount () const |
const PieceStand | stand (Player P) const |
template<Player P, bool SetPieces, bool HasGuide> | |
const ProofDisproof | attack (int depth, Move &best_move, PieceStand &proof_pieces) |
template<Player P, bool SetPieces, bool HasGuide> | |
const ProofDisproof | attackMayUnsafe (int depth, Move &best_move, PieceStand &proof_pieces) |
template<Player P, bool SetPieces> | |
const ProofDisproof | defense (Move last_move, int depth, PieceStand &proof_pieces) |
template<Player P> | |
const ProofDisproof | hasCheckmateMove (int depth, Move &best_move, PieceStand &proof_pieces) |
stateがPから詰む局面かを返す. | |
template<Player P> | |
const ProofDisproof | hasCheckmateWithGuide (int depth, Move &guide, PieceStand &proof_pieces) |
guide を最初に試す. guide.isNormal() である必要はあるが,その局面でvalid でなくても良い | |
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, PieceStand &proof_pieces) |
stateがPによって詰んでいる局面かを返す. | |
template<Player P> | |
const ProofDisproof | hasEscapeMove (Move last_move, int depth) |
template<Player P> | |
const ProofDisproof | hasEscapeByMove (Move next_move, int depth, Move &check_move, PieceStand &proof_pieces) |
next_move を指して逃げられるかどうかを調べる | |
template<Player P> | |
const ProofDisproof | hasEscapeByMove (Move next_move, int depth) |
const ProofDisproof | hasCheckmateMoveOfTurn (int depth, Move &best_move) |
const ProofDisproof | hasCheckmateMoveOfTurn (int depth, Move &best_move, PieceStand &proof_pieces) |
const ProofDisproof | hasCheckmateWithGuideOfTurn (int depth, Move &guide, PieceStand &proof_pieces) |
const ProofDisproof | hasEscapeMoveOfTurn (Move last_move, int depth) |
const ProofDisproof | hasEscapeByMoveOfTurn (Move next_move, int depth, Move &check_move, PieceStand &proof_pieces) |
const ProofDisproof | hasEscapeByMoveOfTurn (Move next_move, int depth) |
template<Player Defense> | |
void | generateBlockingWhenLiberty0 (Piece defense_king, Position attack_from, container::MoveVector &moves) const |
無駄合をなるべく生成しない,合駒生成 | |
template<Player Defense> | |
int | blockEstimation (Position attack_from, Position defense_king) const |
template<osl::Player Defense> | |
void | generateBlockingWhenLiberty0 (Piece defense_king, Position attack_from, MoveVector &moves) const |
Private メソッド | |
void | addCount () |
template<Player P, bool SetPieces> | |
const ProofDisproof | defenseEstimation (Move last_move, PieceStand &proof_pieces, Piece attacker_piece, Position target_position) const |
move を作らずに ProofDisproof の予測を計算する | |
Private 変数 | |
NumEffectState * | state |
int | count |
深さ固定で,その深さまで depth first searchで読む詰将棋.
深さ0で詰み状態かどうか(攻め手の手番の場合),王手をかける手がないかを判定可能 深さ1で通常の一手詰みを判定(攻め手の手番の場合) 使うのは深さ3位まで? NumEffectState専用
fixedDepthSearcher.h の 26 行で定義されています。
osl::checkmate::FixedDepthSearcher::FixedDepthSearcher | ( | ) | [inline] |
fixedDepthSearcher.h の 32 行で定義されています。
osl::checkmate::FixedDepthSearcher::FixedDepthSearcher | ( | NumEffectState & | s | ) | [inline, explicit] |
fixedDepthSearcher.h の 35 行で定義されています。
void osl::checkmate::FixedDepthSearcher::addCount | ( | ) | [inline, private] |
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::attack | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
fixedDepthSearcher.tcc の 86 行で定義されています。
参照先 osl::PieceStand::add(), addCount(), osl::alt(), osl::checkmate::ProofNumberTable::attackEstimation(), osl::checkmate::ProofDisproof::Checkmate(), osl::checkmate::ProofDisproof::disproof(), osl::checkmate::Edge_Table, osl::Move::from(), osl::checkmate::ProofDisproof::isCheckmateSuccess(), osl::Move::isDrop(), osl::eval::min(), moves, osl::checkmate::ProofDisproof::NoCheckmate(), osl::checkmate::ProofDisproof::PAWN_CHECK_MATE_PROOF, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::checkmate::ProofDisproof::proof(), osl::checkmate::ProofDisproof::PROOF_MAX, osl::checkmate::Proof_Number_Table, osl::Move::ptype(), osl::checkmate::EdgeTable::resetEdgeFromLiberty(), stand(), state, と osl::Move::to().
参照元 osl::checkmate::FixedDefenseHelper< P, SetPieces, MayUnsafe >::operator()().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::attackMayUnsafe | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
int osl::checkmate::FixedDepthSearcher::blockEstimation | ( | Position | attack_from, | |
Position | defense_king | |||
) | const [inline] |
fixedDepthSearcher.tcc の 256 行で定義されています。
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::defense | ( | Move | last_move, | |
int | depth, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
直前の攻め方の手が自殺手
fixedDepthSearcher.tcc の 265 行で定義されています。
参照先 addCount(), osl::checkmate::ProofPiecesUtil::addMonopolizedPieces(), osl::alt(), osl::checkmate::ProofDisproof::disproof(), osl::checkmate::ProofDisproof::DISPROOF_MAX, osl::GOLD, osl::Move::isDrop(), osl::Piece::isEmpty(), osl::effect_util::UnblockableCheck::isMember(), osl::Position::isOnBoard(), osl::Move::isValid(), osl::checkmate::ProofPieces::leaf(), osl::PieceStand::max(), moves, osl::checkmate::ProofDisproof::NoCheckmate(), osl::checkmate::ProofDisproof::NoEscape(), osl::PAWN, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::Piece::position(), osl::checkmate::ProofDisproof::proof(), osl::Move::ptype(), osl::SILVER, stand(), state, と store().
参照元 osl::checkmate::FixedAttackHelper< P, SetPieces >::operator()().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::defenseEstimation | ( | Move | last_move, | |
PieceStand & | proof_pieces, | |||
Piece | attacker_piece, | |||
Position | target_position | |||
) | const [inline, private] |
move を作らずに ProofDisproof の予測を計算する
fixedDepthSearcher.tcc の 179 行で定義されています。
参照先 osl::alt(), count, osl::PtypeTable::getEffect(), osl::EffectContent::hasUnblockableEffect(), osl::Move::isDrop(), osl::Piece::isEmpty(), osl::Neighboring8::isNeighboring8(), osl::Move::isValid(), osl::checkmate::ProofPieces::leaf(), osl::checkmate::ProofDisproof::NoEscape(), osl::PAWN, osl::checkmate::ProofDisproof::PawnCheckmate(), osl::Piece::position(), osl::Move::ptype(), osl::Ptype_Table, osl::Piece::ptypeO(), stand(), と state.
void osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0 | ( | Piece | defense_king, | |
Position | attack_from, | |||
container::MoveVector & | moves | |||
) | const [inline] |
無駄合をなるべく生成しない,合駒生成
int osl::checkmate::FixedDepthSearcher::getCount | ( | ) | const [inline] |
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMove | ( | int | depth | ) | [inline] |
fixedDepthSearcher.h の 99 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMove | ( | int | depth, | |
Move & | best_move | |||
) | [inline] |
fixedDepthSearcher.h の 93 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMove | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
stateがPから詰む局面かを返す.
stateの手番はPと一致しているという前提
fixedDepthSearcher.h の 80 行で定義されています。
参照元 osl::ntesuki::OracleProverLight::attack(), osl::checkmate::Dfpn::attack(), osl::search::SearchState2Core::isThreatmateStateShort(), osl::search::SearchState2Core::isWinningStateShort(), main(), osl::checkmate::Dfpn::proofOracleAttack(), と osl::ntesuki::NtesukiRecord::setUpAttackNode().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMoveOfTurn | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher.cc の 9 行で定義されています。
参照先 osl::BLACK, と state.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateMoveOfTurn | ( | int | depth, | |
Move & | best_move | |||
) |
fixedDepthSearcher.cc の 19 行で定義されています。
参照先 osl::BLACK, と state.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateWithGuide | ( | int | depth, | |
Move & | guide, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
guide を最初に試す. guide.isNormal() である必要はあるが,その局面でvalid でなくても良い
fixedDepthSearcher.tcc の 448 行で定義されています。
参照先 osl::Move::from(), osl::Move::isDrop(), osl::Move::isNormal(), osl::Piece::isPtype(), osl::KING, osl::Move::newCapture(), osl::Move::ptype(), state, と osl::Move::to().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasCheckmateWithGuideOfTurn | ( | int | depth, | |
Move & | guide, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher.cc の 29 行で定義されています。
参照先 osl::BLACK, と state.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMove | ( | Move | next_move, | |
int | depth | |||
) | [inline] |
fixedDepthSearcher.tcc の 435 行で定義されています。
参照先 state.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMove | ( | Move | next_move, | |
int | depth, | |||
Move & | check_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
next_move を指して逃げられるかどうかを調べる
check_move | 詰の場合の攻撃側の指手 | |
depth | next_move を指した後からカウント |
fixedDepthSearcher.tcc の 420 行で定義されています。
参照先 state.
参照元 osl::checkmate::Dfpn::defense(), と osl::checkmate::Dfpn::proofOracleDefense().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMoveOfTurn | ( | Move | next_move, | |
int | depth | |||
) |
fixedDepthSearcher.cc の 60 行で定義されています。
参照先 osl::BLACK, と state.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMoveOfTurn | ( | Move | next_move, | |
int | depth, | |||
Move & | check_move, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher.cc の 49 行で定義されています。
参照先 osl::BLACK, と state.
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeMove | ( | Move | last_move, | |
int | depth | |||
) | [inline] |
fixedDepthSearcher.h の 119 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeMove | ( | Move | last_move, | |
int | depth, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
stateがPによって詰んでいる局面かを返す.
王手がかかっていない時には呼ばない stateの手番はalt(P)と一致しているという前提 stateはPによって王手がかかっているという前提
last_move | 打ち歩詰めの判定に必要 |
fixedDepthSearcher.h の 113 行で定義されています。
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeMoveOfTurn | ( | Move | last_move, | |
int | depth | |||
) |
fixedDepthSearcher.cc の 39 行で定義されています。
参照先 osl::BLACK, と state.
void osl::checkmate::FixedDepthSearcher::setState | ( | NumEffectState & | s | ) | [inline] |
fixedDepthSearcher.h の 39 行で定義されています。
参照先 state.
const PieceStand osl::checkmate::FixedDepthSearcher::stand | ( | Player | P | ) | const [inline] |
int osl::checkmate::FixedDepthSearcher::count [private] |
fixedDepthSearcher.h の 30 行で定義されています。
参照元 addCount(), defenseEstimation(), と getCount().
NumEffectState* osl::checkmate::FixedDepthSearcher::state [private] |
fixedDepthSearcher.h の 29 行で定義されています。
参照元 attack(), attackMayUnsafe(), defense(), defenseEstimation(), generateBlockingWhenLiberty0(), hasCheckmateMoveOfTurn(), hasCheckmateWithGuide(), hasCheckmateWithGuideOfTurn(), hasEscapeByMove(), hasEscapeByMoveOfTurn(), hasEscapeMoveOfTurn(), setState(), と stand().