クラス osl::checkmate::FixedDepthSearcher2

深さ固定で,その深さまで depth first searchで読む詰将棋. [詳細]

#include <fixedDepthSearcher2.h>

osl::checkmate::FixedDepthSearcher2のコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

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, MAXDEPTHstates
int count

Static Private 変数

static const int MAXDEPTH = 16

説明

深さ固定で,その深さまで depth first searchで読む詰将棋.

深さ0で詰み状態かどうか(攻め手の手番の場合),王手をかける手がないかを判定可能 深さ1で通常の一手詰みを判定(攻め手の手番の場合) 使うのは深さ3位まで? 攻撃側の自殺手はmove generationはしない. NumEffectState専用

fixedDepthSearcher2.h30 行で定義されています。


コンストラクタとデストラクタ

osl::checkmate::FixedDepthSearcher2::FixedDepthSearcher2 (  )  [inline]

fixedDepthSearcher2.h44 行で定義されています。

osl::checkmate::FixedDepthSearcher2::FixedDepthSearcher2 ( NumEffectState &  s  )  [inline, explicit]

fixedDepthSearcher2.h47 行で定義されています。


関数

void osl::checkmate::FixedDepthSearcher2::addCount (  )  [inline, private]

fixedDepthSearcher2.h56 行で定義されています。

参照元 attack(), と defense().

template<osl::Player P, bool SetPieces, bool HasGuide>
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::attack ( int  depth,
Move best_move,
PieceStand proof_pieces 
) [inline]
template<osl::Player P, bool SetPieces, bool HasGuide>
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::attackMayUnsafe ( int  depth,
Move best_move,
PieceStand proof_pieces 
) [inline]

fixedDepthSearcher2.tcc26 行で定義されています。

参照先 osl::checkmate::ProofDisproof::NoEscape(), と states.

template<osl::Player Defense>
int osl::checkmate::FixedDepthSearcher2::blockEstimation ( Position  attack_from,
Position  defense_king 
) const [inline]

fixedDepthSearcher2.tcc210 行で定義されています。

static void osl::checkmate::FixedDepthSearcher2::copyState ( NumEffectState *  dest,
NumEffectState *  src 
) [inline, static, private]

fixedDepthSearcher2.h35 行で定義されています。

参照先 osl::misc::FastCopier::copy().

参照元 attack(), defense(), と hasEscapeByMove().

template<osl::Player P, bool SetPieces>
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::defense ( Move  last_move,
int  depth,
PieceStand proof_pieces 
) [inline]
template<osl::Player P, bool SetPieces>
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]
template<osl::Player Defense>
void osl::checkmate::FixedDepthSearcher2::generateBlockingWhenLiberty0 ( int  depth,
Piece  defense_king,
Position  attack_from,
MoveVector &  moves 
) const [inline]
template<Player Defense>
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.h61 行で定義されています。

template<Player P>
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove ( int  depth  )  [inline]

fixedDepthSearcher2.h109 行で定義されています。

template<Player P>
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove ( int  depth,
Move best_move 
) [inline]

fixedDepthSearcher2.h102 行で定義されています。

template<Player P>
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMove ( int  depth,
Move best_move,
PieceStand proof_pieces 
) [inline]

stateがPから詰む局面かを返す.

stateの手番はPと一致しているという前提

fixedDepthSearcher2.h88 行で定義されています。

const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMoveOfTurn ( int  depth,
Move best_move,
PieceStand proof_pieces 
)

fixedDepthSearcher2.cc9 行で定義されています。

参照先 osl::BLACK, と states.

const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateMoveOfTurn ( int  depth,
Move best_move 
)

fixedDepthSearcher2.cc20 行で定義されています。

参照先 osl::BLACK, と states.

template<osl::Player P>
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasCheckmateWithGuide ( int  depth,
Move guide,
PieceStand proof_pieces 
) [inline]

guide を最初に試す. guide.isNormal() である必要はあるが,その局面でvalid でなくても良い

fixedDepthSearcher2.tcc397 行で定義されています。

参照先 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.cc31 行で定義されています。

参照先 osl::BLACK, と states.

template<osl::Player P>
const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMove ( Move  next_move,
int  depth 
) [inline]

fixedDepthSearcher2.tcc384 行で定義されています。

参照先 copyState(), と states.

template<osl::Player P>
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.tcc370 行で定義されています。

参照先 copyState(), と states.

const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMoveOfTurn ( Move  next_move,
int  depth 
)

fixedDepthSearcher2.cc65 行で定義されています。

参照先 osl::BLACK, と states.

const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeByMoveOfTurn ( Move  next_move,
int  depth,
Move check_move,
PieceStand proof_pieces 
)

fixedDepthSearcher2.cc53 行で定義されています。

参照先 osl::BLACK, と states.

template<Player P>
const ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeMove ( Move  last_move,
int  depth 
) [inline]

fixedDepthSearcher2.h129 行で定義されています。

template<Player P>
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.h123 行で定義されています。

const osl::checkmate::ProofDisproof osl::checkmate::FixedDepthSearcher2::hasEscapeMoveOfTurn ( Move  last_move,
int  depth 
)

fixedDepthSearcher2.cc42 行で定義されています。

参照先 osl::BLACK, と states.

void osl::checkmate::FixedDepthSearcher2::setState ( NumEffectState &  s  )  [inline]

fixedDepthSearcher2.h51 行で定義されています。


変数

fixedDepthSearcher2.h42 行で定義されています。

参照元 defenseEstimation().

const int osl::checkmate::FixedDepthSearcher2::MAXDEPTH = 16 [static, private]

fixedDepthSearcher2.h39 行で定義されています。

fixedDepthSearcher2.h40 行で定義されています。

CArray<NumEffectState,MAXDEPTH> osl::checkmate::FixedDepthSearcher2::states [private]

このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義
Sun May 16 09:57:55 2010に生成されました。  doxygen 1.6.3