深さ固定で,その深さまで depth first searchで読む詰将棋. [詳細]
#include <fixedDepthSearcher2.h>
Public メソッド | |
FixedDepthSearcher2 () | |
FixedDepthSearcher2 (NumEffectState &s) | |
void | setState (NumEffectState &s) |
int | getCount () 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 (int depth, 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 (int depth, Piece defense_king, Position attack_from, MoveVector &moves) const |
Private メソッド | |
void | addCount () |
template<Player P, bool SetPieces> | |
const ProofDisproof | defenseEstimation (int depth, Move last_move, PieceStand &proof_pieces, Piece attacker_piece, Position target_position) const |
move を作らずに ProofDisproof の予測を計算する | |
Static Private メソッド | |
static void | copyState (NumEffectState *dest, NumEffectState *src) |
Private 変数 | |
NumEffectState * | original_state |
CArray< NumEffectState, MAXDEPTH > | states |
int | count |
Static Private 変数 | |
static const int | MAXDEPTH = 16 |
深さ固定で,その深さまで depth first searchで読む詰将棋.
深さ0で詰み状態かどうか(攻め手の手番の場合),王手をかける手がないかを判定可能 深さ1で通常の一手詰みを判定(攻め手の手番の場合) 使うのは深さ3位まで? 攻撃側の自殺手はmove generationはしない. NumEffectState専用
fixedDepthSearcher2.h の 30 行で定義されています。
osl::checkmate::FixedDepthSearcher2::FixedDepthSearcher2 | ( | ) | [inline] |
fixedDepthSearcher2.h の 44 行で定義されています。
osl::checkmate::FixedDepthSearcher2::FixedDepthSearcher2 | ( | NumEffectState & | s | ) | [inline, explicit] |
fixedDepthSearcher2.h の 47 行で定義されています。
void osl::checkmate::FixedDepthSearcher2::addCount | ( | ) | [inline, private] |
fixedDepthSearcher2.h の 56 行で定義されています。
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::attack | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
fixedDepthSearcher2.tcc の 40 行で定義されています。
参照先 osl::PieceStand::add(), addCount(), osl::alt(), osl::checkmate::ProofNumberTable::attackEstimation(), osl::checkmate::ProofDisproof::Checkmate(), copyState(), osl::checkmate::ProofDisproof::disproof(), 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(), states, と osl::Move::to().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::attackMayUnsafe | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
fixedDepthSearcher2.tcc の 26 行で定義されています。
int osl::checkmate::FixedDepthSearcher2::blockEstimation | ( | Position | attack_from, | |
Position | defense_king | |||
) | const [inline] |
fixedDepthSearcher2.tcc の 210 行で定義されています。
static void osl::checkmate::FixedDepthSearcher2::copyState | ( | NumEffectState * | dest, | |
NumEffectState * | src | |||
) | [inline, static, private] |
fixedDepthSearcher2.h の 35 行で定義されています。
参照先 osl::misc::FastCopier::copy().
参照元 attack(), defense(), と hasEscapeByMove().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::defense | ( | Move | last_move, | |
int | depth, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
直前の攻め方の手が自殺手
fixedDepthSearcher2.tcc の 219 行で定義されています。
参照先 addCount(), osl::checkmate::ProofPiecesUtil::addMonopolizedPieces(), osl::alt(), copyState(), 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, states, と store().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::defenseEstimation | ( | int | depth, | |
Move | last_move, | |||
PieceStand & | proof_pieces, | |||
Piece | attacker_piece, | |||
Position | target_position | |||
) | const [inline, private] |
move を作らずに ProofDisproof の予測を計算する
fixedDepthSearcher2.tcc の 132 行で定義されています。
参照先 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(), と states.
void osl::checkmate::FixedDepthSearcher2::generateBlockingWhenLiberty0 | ( | int | depth, | |
Piece | defense_king, | |||
Position | attack_from, | |||
container::MoveVector & | moves | |||
) | const [inline] |
無駄合をなるべく生成しない,合駒生成
int osl::checkmate::FixedDepthSearcher2::getCount | ( | ) | const [inline] |
fixedDepthSearcher2.h の 61 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove | ( | int | depth | ) | [inline] |
fixedDepthSearcher2.h の 109 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove | ( | int | depth, | |
Move & | best_move | |||
) | [inline] |
fixedDepthSearcher2.h の 102 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMoveOfTurn | ( | int | depth, | |
Move & | best_move, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher2.cc の 9 行で定義されています。
参照先 osl::BLACK, と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMoveOfTurn | ( | int | depth, | |
Move & | best_move | |||
) |
fixedDepthSearcher2.cc の 20 行で定義されています。
参照先 osl::BLACK, と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateWithGuide | ( | int | depth, | |
Move & | guide, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
guide を最初に試す. guide.isNormal() である必要はあるが,その局面でvalid でなくても良い
fixedDepthSearcher2.tcc の 397 行で定義されています。
参照先 osl::Move::from(), osl::Move::isDrop(), osl::Move::isNormal(), osl::Piece::isPtype(), osl::KING, osl::Move::newCapture(), osl::Move::ptype(), states, と osl::Move::to().
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateWithGuideOfTurn | ( | int | depth, | |
Move & | guide, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher2.cc の 31 行で定義されています。
参照先 osl::BLACK, と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMove | ( | Move | next_move, | |
int | depth | |||
) | [inline] |
fixedDepthSearcher2.tcc の 384 行で定義されています。
参照先 copyState(), と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMove | ( | Move | next_move, | |
int | depth, | |||
Move & | check_move, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
next_move を指して逃げられるかどうかを調べる
check_move | 詰の場合の攻撃側の指手 | |
depth | next_move を指した後からカウント |
fixedDepthSearcher2.tcc の 370 行で定義されています。
参照先 copyState(), と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMoveOfTurn | ( | Move | next_move, | |
int | depth | |||
) |
fixedDepthSearcher2.cc の 65 行で定義されています。
参照先 osl::BLACK, と states.
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMoveOfTurn | ( | Move | next_move, | |
int | depth, | |||
Move & | check_move, | |||
PieceStand & | proof_pieces | |||
) |
fixedDepthSearcher2.cc の 53 行で定義されています。
参照先 osl::BLACK, と states.
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeMove | ( | Move | last_move, | |
int | depth | |||
) | [inline] |
fixedDepthSearcher2.h の 129 行で定義されています。
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeMove | ( | Move | last_move, | |
int | depth, | |||
PieceStand & | proof_pieces | |||
) | [inline] |
stateがPによって詰んでいる局面かを返す.
王手がかかっていない時には呼ばない stateの手番はalt(P)と一致しているという前提 stateはPによって王手がかかっているという前提
last_move | 打ち歩詰めの判定に必要 |
fixedDepthSearcher2.h の 123 行で定義されています。
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeMoveOfTurn | ( | Move | last_move, | |
int | depth | |||
) |
fixedDepthSearcher2.cc の 42 行で定義されています。
参照先 osl::BLACK, と states.
void osl::checkmate::FixedDepthSearcher2::setState | ( | NumEffectState & | s | ) | [inline] |
fixedDepthSearcher2.h の 51 行で定義されています。
int osl::checkmate::FixedDepthSearcher2::count [private] |
fixedDepthSearcher2.h の 42 行で定義されています。
参照元 defenseEstimation().
const int osl::checkmate::FixedDepthSearcher2::MAXDEPTH = 16 [static, private] |
fixedDepthSearcher2.h の 39 行で定義されています。
NumEffectState* osl::checkmate::FixedDepthSearcher2::original_state [private] |
fixedDepthSearcher2.h の 40 行で定義されています。
CArray<NumEffectState,MAXDEPTH> osl::checkmate::FixedDepthSearcher2::states [private] |