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