23 proof_pieces = proof_pieces.
max(child);
46 template <osl::Player P>
52 typedef FixedDefenseHelper<P,SetProofPieces,true> helper_t;
55 helper_t helper(*
this, depth+1, pdp, proof_pieces);
57 check_move = helper.best_move;
66 return hasCheckmateMove<BLACK>(depth, best_move, proof_pieces);
68 return hasCheckmateMove<WHITE>(depth, best_move, proof_pieces);
76 return hasCheckmateWithGuide<BLACK>(depth, guide, proof_pieces);
78 return hasCheckmateWithGuide<WHITE>(depth, guide, proof_pieces);
87 return hasEscapeByMove<WHITE>(next_move, depth, check_move, proof_pieces);
89 return hasEscapeByMove<BLACK>(next_move, depth, check_move, proof_pieces);
92 template <osl::Player P>
104 if (
state->template isAlmostValidMove<false>(guide)
107 return attack<P,SetProofPieces,true>(depth, guide, proof_pieces);
108 return attack<P,SetProofPieces,false>(depth, guide, proof_pieces);
111 template <osl::Player P>
115 return attack<P,SetProofPieces,false>(depth, best_move, proof_pieces);
118 template <osl::Player P>
122 return defense<P,SetProofPieces>(last_move, depth, proof_pieces);
static void addMonopolizedPieces(const NumEffectState &state, Player P, PieceStand stand, PieceStand &proof_pieces)
深さ固定で,その深さまで depth first searchで読む詰将棋.
static void clear(PieceStand &proof_pieces)
void add(Ptype type, unsigned int num=1)
static void setLeaf(const NumEffectState &state, Player P, PieceStand stand, PieceStand &proof_pieces)
constexpr Player alt(Player player)
const PieceStand stand(Player P) const
void makeUnmakeMove(Move move, Function &f)
bool isNormal() const
INVALID でも PASS でもない.
const Piece pieceOnBoard(Square sq) const
static void setAttackLeaf(Move best_move, PieceStand &proof_pieces)
static const PieceStand attack(const PieceStand prev, Move move, const PieceStand max)
static ProofDisproof attackEstimation(const NumEffectState &state, Player P, King8Info info)
const ProofDisproof hasCheckmateMoveOfTurn(int depth, Move &best_move, PieceStand &proof_pieces)
Square kingSquare() const
const Square from() const
static void addMonopolizedPieces(const SimpleState &state, Player player, const PieceStand max, PieceStand &out)
alt(player) が持っていない種類の持駒を playerが持っていたら out に独占分を加算する. ...
const ProofDisproof hasEscapeMove(Move last_move, int depth, PieceStand &proof_pieces)
stateがPによって詰んでいる局面かを返す.
const ProofDisproof hasEscapeByMove(Move next_move, int depth, Move &check_move, PieceStand &proof_pieces)
next_move を指して逃げられるかどうかを調べる
const Move newCapture(Piece capture) const
const ProofDisproof attackEstimation(const NumEffectState &state) const
全て
証明数(proof number)と反証数(disproof number).
static void attack(Move best_move, PieceStand stand, PieceStand &proof_pieces)
const ProofDisproof hasCheckmateMove(int depth, Move &best_move, PieceStand &proof_pieces)
stateがPから詰む局面かを返す.
const ProofDisproof hasCheckmateWithGuide(int depth, Move &guide, PieceStand &proof_pieces)
guide を最初に試す. guide.isNormal() である必要はあるが,その局面でvalid でなくても良い ...
const PieceStand max(PieceStand other) const
種類毎に this と other の持駒の多い方を取る
ProofNumberTable Proof_Number_Table
const King8Info resetEdgeFromLiberty(Player king_player, Square king, King8Info info) const
liberty から盤の淵(xかyが1か9)を取り除く.
static void updateMax(PieceStand child, PieceStand &proof_pieces)
const ProofDisproof hasEscapeByMoveOfTurn(Move next_move, int depth, Move &check_move, PieceStand &proof_pieces)
static const PieceStand leaf(const NumEffectState &state, Player attacker, const PieceStand max)
const ProofDisproof hasCheckmateWithGuideOfTurn(int depth, Move &guide, PieceStand &proof_pieces)