osl::checkmate::FixedDepthSearcher Class Reference

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

`#include <fixedDepthSearcher.h>`

Inheritance diagram for osl::checkmate::FixedDepthSearcher:

## 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

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

## 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.

References count, and state.

Referenced by osl::checkmate::FixedDepthSolverExt::FixedDepthSolverExt().

## FixedDepthSearcher() [2/2]

osl::checkmate::FixedDepthSearcher::FixedDepthSearcher | ( | NumEffectState & | s | ) |

inline explicit

Definition at line 49 of file fixedDepthSearcher.h.

References count, and state.

## Member Function Documentation

## addCount()

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

inline private

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 )

Referenced by hasCheckmateMove(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMove(), and osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuide().

## 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 )

Referenced by hasEscapeMove(), and osl::checkmate::FixedDepthSolverExt::hasEscapeMove().

## 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 hasCheckmateMove().

## 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 attack().

Referenced by hasCheckmateMove(), and hasCheckmateMoveOfTurn().

## hasCheckmateMoveOfTurn()

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

Definition at line 9 of file fixedDepthSearcher.cc.

References osl::BLACK, hasCheckmateMove(), and state.

Referenced by osl::move_probability::StateInfo::findShortThreatmate(), and osl::checkmate::ProofTreeDepthDfpn::orNode().

## hasEscapeByMove()

template<Player P>

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

Referenced by hasEscapeByMoveOfTurn().

## 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, hasEscapeByMove(), and state.

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 defense().

Referenced by hasEscapeMoveOfTurn().

## 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, hasEscapeMove(), and state.

## setState()

void osl::checkmate::FixedDepthSearcher::setState | ( | NumEffectState & | s | ) |

inline

Definition at line 53 of file fixedDepthSearcher.h.

References state.

## stand()

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

inline

Definition at line 67 of file fixedDepthSearcher.h.

References state.

Referenced by osl::checkmate::FixedDepthSolverExt::SetProofPieces::addMonopolizedPieces(), osl::checkmate::FixedDepthSolverExt::SetProofPieces::attack(), and osl::checkmate::FixedDepthSolverExt::SetProofPieces::setLeaf().

## Member Data Documentation

## count

int osl::checkmate::FixedDepthSearcher::count

protected

Definition at line 44 of file fixedDepthSearcher.h.

Referenced by addCount(), FixedDepthSearcher(), FixedDepthSearcher(), and getCount().

## state

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

protected

Definition at line 43 of file fixedDepthSearcher.h.

Referenced by osl::checkmate::FixedDepthSolverExt::SetProofPieces::addMonopolizedPieces(), osl::checkmate::FixedDepthSolverExt::SetProofPieces::attackEstimation(), FixedDepthSearcher(), FixedDepthSearcher(), hasCheckmateMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuide(), osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuideOfTurn(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMove(), hasEscapeByMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMoveOfTurn(), hasEscapeMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::SetProofPieces::setLeaf(), setState(), and stand().

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

- fixedDepthSearcher.h
- fixedDepthSearcher.cc