My Project
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
osl::checkmate::FixedDepthSearcher Class Reference

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

#include <fixedDepthSearcher.h>

Inheritance diagram for osl::checkmate::FixedDepthSearcher:
osl::checkmate::FixedDepthSolverExt

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
 無駄合をなるべく生成しない,合駒生成
 
template<Player Defense>
int blockEstimation (Square attack_from, Square defense_king) const
 

Protected Attributes

NumEffectStatestate
 
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 の予測を計算する
 

Detailed Description

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

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

Definition at line 40 of file fixedDepthSearcher.h.

Constructor & Destructor Documentation

◆ FixedDepthSearcher() [1/2]

osl::checkmate::FixedDepthSearcher::FixedDepthSearcher ( )
inline

Definition at line 46 of file fixedDepthSearcher.h.

◆ FixedDepthSearcher() [2/2]

osl::checkmate::FixedDepthSearcher::FixedDepthSearcher ( NumEffectState s)
inlineexplicit

Definition at line 49 of file fixedDepthSearcher.h.

Member Function Documentation

◆ addCount()

void osl::checkmate::FixedDepthSearcher::addCount ( )
inlineprivate

Definition at line 58 of file fixedDepthSearcher.h.

References count.

◆ attack()

template<Player P, class SetPieces , bool HasGuide>
const ProofDisproof osl::checkmate::FixedDepthSearcher::attack ( int  depth,
Move best_move,
PieceStand proof_pieces 
)

◆ attackMayUnsafe()

template<Player P, class SetPieces , bool HasGuide>
const ProofDisproof osl::checkmate::FixedDepthSearcher::attackMayUnsafe ( int  depth,
Move best_move,
PieceStand proof_pieces 
)

◆ blockEstimation()

template<Player Defense>
int osl::checkmate::FixedDepthSearcher::blockEstimation ( Square  attack_from,
Square  defense_king 
) const

◆ defense()

template<Player P, class SetPieces >
const ProofDisproof osl::checkmate::FixedDepthSearcher::defense ( Move  last_move,
int  depth,
PieceStand proof_pieces 
)

◆ defenseEstimation()

template<Player P, class SetPieces >
const ProofDisproof osl::checkmate::FixedDepthSearcher::defenseEstimation ( Move  last_move,
PieceStand proof_pieces,
Piece  attacker_piece,
Square  target_position 
) const
private

move を作らずに ProofDisproof の予測を計算する

◆ generateBlockingWhenLiberty0()

template<Player Defense>
void osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0 ( Piece  defense_king,
Square  attack_from,
CheckMoveVector moves 
) const

無駄合をなるべく生成しない,合駒生成

◆ getCount()

int osl::checkmate::FixedDepthSearcher::getCount ( ) const
inline

Definition at line 63 of file fixedDepthSearcher.h.

References count.

◆ hasCheckmateMove() [1/2]

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

Definition at line 96 of file fixedDepthSearcher.h.

References count.

◆ hasCheckmateMove() [2/2]

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

Definition at line 90 of file fixedDepthSearcher.h.

References count.

◆ hasCheckmateMoveOfTurn()

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

◆ hasEscapeByMove()

template<Player P>
const ProofDisproof osl::checkmate::FixedDepthSearcher::hasEscapeByMove ( Move  next_move,
int  depth 
)

◆ hasEscapeByMoveOfTurn()

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

Definition at line 29 of file fixedDepthSearcher.cc.

References osl::BLACK.

Referenced by osl::checkmate::CheckmateIfCapture::cannotCapture().

◆ hasEscapeMove()

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

Definition at line 103 of file fixedDepthSearcher.h.

References count.

◆ hasEscapeMoveOfTurn()

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

Definition at line 19 of file fixedDepthSearcher.cc.

References osl::BLACK.

◆ setState()

void osl::checkmate::FixedDepthSearcher::setState ( NumEffectState s)
inline

Definition at line 53 of file fixedDepthSearcher.h.

References count, and state.

◆ stand()

const PieceStand osl::checkmate::FixedDepthSearcher::stand ( Player  P) const
inline

Member Data Documentation

◆ count

int osl::checkmate::FixedDepthSearcher::count
protected

◆ state

NumEffectState* osl::checkmate::FixedDepthSearcher::state
protected

The documentation for this class was generated from the following files: