QuiescenceSearch で使う指手生成 More...
#include <quiescenceGenerator.h>
Public Member Functions | |
template<osl::Ptype PTYPE> | |
void | promote (const NumEffectState &state, MoveVector &moves) |
template<osl::Ptype PTYPE, size_t N> | |
void | promoteN (const NumEffectState &state, MoveVector &moves, const HistoryTable &table) |
template<osl::Ptype PTYPE, bool has_dont_capture> | |
void | capture (const NumEffectState &state, MoveVector &moves, Piece dont_capture) |
template<class EvalT > | |
void | escapeFromLastMoveOtherThanPawn (const NumEffectState &state, Move last_move, MoveVector &moves) |
template<osl::Direction DIR> | |
void | advanceBishop (const NumEffectState &state, const Square from, MoveVector &moves) |
template<class EvalT > | |
void | escapeFromLastMove (const NumEffectState &state, Move last_move, MoveVector &moves) |
Static Public Member Functions | |
template<Ptype PTYPE, bool has_dont_capture> | |
static void | capture (const NumEffectState &, MoveVector &moves, Piece dont_capture) |
P が敵の PTYPE を取る手を生成する. More... | |
static void | capture (const NumEffectState &, Square target, MoveVector &moves) |
P が敵の target を取る手を生成する. More... | |
static void | capture1 (const NumEffectState &state, Square target, MoveVector &moves) |
P が敵の target を取る手を最大1手生成する. More... | |
static void | promote (const NumEffectState &, PieceMask pins, MoveVector &moves) |
template<Ptype PTYPE> | |
static void | promote (const NumEffectState &, MoveVector &moves) |
template<Ptype PTYPE, size_t N> | |
static void | promoteN (const NumEffectState &, MoveVector &moves, const HistoryTable &table) |
static void | check (const NumEffectState &, PieceMask pins, MoveVector &moves, bool no_liberty=false) |
static void | check (const NumEffectState &, PieceMask pins, bool no_liberty, const Square8 &sendoffs, MoveVector &moves) |
static void | escapeKing (const NumEffectState &state, MoveVector &moves) |
static bool | escapeKingInTakeBack (const NumEffectState &state, MoveVector &moves, bool check_by_lance) |
static void | dropMajorPiece (const NumEffectState &state, MoveVector &moves) |
static void | dropMajorPiece3 (const NumEffectState &state, MoveVector &moves, const HistoryTable &table) |
static void | attackMajorPiece (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | escapeAll (const NumEffectState &state, MoveVector &moves) |
static void | escapeNormalPiece (const NumEffectState &state, Piece escape, MoveVector &moves, bool add_support_only=false) |
template<class EvalT > | |
static void | escapeFromLastMove (const NumEffectState &state, Move last_move, MoveVector &moves) |
直前に指手から逃げる More... | |
template<class EvalT > | |
static void | escapeFromLastMoveOtherThanPawn (const NumEffectState &state, Move last_move, MoveVector &moves) |
static bool | escapeByMoveOnly (const NumEffectState &state, Piece piece, MoveVector &moves) |
static void | attackGoldWithPawn (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | attackWithKnight (const NumEffectState &state, PieceMask pins, Square attack_from, bool has_knight, MoveVector &moves) |
static void | attackSilverWithPawn (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | attackKnightWithPawn (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | advanceBishop (const NumEffectState &state, MoveVector &moves) |
角が前に進む. More... | |
template<Direction DIR> | |
static void | advanceBishop (const NumEffectState &state, const Square from, MoveVector &moves) |
static void | attackKing8 (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | attackToPinned (const NumEffectState &state, PieceMask pins, MoveVector &moves) |
static void | utilizePromoted (const NumEffectState &state, Piece target, MoveVector &moves) |
static void | breakThreatmate (const NumEffectState &state, Move threatmate, PieceMask pins, MoveVector &moves) |
static void | kingWalk (const NumEffectState &state, MoveVector &moves) |
Static Private Member Functions | |
static void | attackMajorPieceSecondSelection (bool target_has_support, const MoveVector &src, MoveVector &out) |
static void | attackMajorPieceFirstSelection (const NumEffectState &state, PieceMask pins, const MoveVector &all_moves, MoveVector &moves, MoveVector &expensive_drops) |
static void | attackMajorPieceZerothSelection (const NumEffectState &state, const MoveVector &src, Square target, MoveVector &open_out, MoveVector &out) |
QuiescenceSearch で使う指手生成
Definition at line 28 of file quiescenceGenerator.h.
|
static |
角が前に進む.
覗いて成を受けにくい読み抜けを防ぐ
Definition at line 1408 of file quiescenceGenerator.tcc.
References osl::BISHOP, osl::Piece::isOnBoardByOwner(), moves, osl::Piece::ptype(), and osl::Piece::square().
|
static |
void osl::search::QuiescenceGenerator< P >::advanceBishop | ( | const NumEffectState & | state, |
const Square | from, | ||
MoveVector & | moves | ||
) |
Definition at line 1429 of file quiescenceGenerator.tcc.
References osl::BISHOP, and osl::PTYPE_EMPTY.
|
static |
Definition at line 1004 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Square::canPromote(), osl::Piece::isOnBoardByOwner(), osl::KNIGHT, osl::LANCE, osl::Piece::owner(), osl::PAWN, osl::Piece::ptype(), osl::PTYPE_EMPTY, osl::SILVER, osl::Piece::square(), and osl::Square::x().
|
static |
Definition at line 668 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BLACK, osl::captured(), osl::Move::capturePtype(), osl::move_generator::capture::generate(), osl::PtypeTable::getMoveMask(), osl::Move::isDrop(), osl::isMajor(), osl::isPromoted(), osl::Move::isPromotion(), osl::LANCE, osl::PAWN, osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Ptype_Table, osl::Move::to(), osl::WHITE, and osl::Square::x().
|
static |
Definition at line 1160 of file quiescenceGenerator.tcc.
References osl::alt(), osl::Square::canPromote(), osl::Piece::isOnBoard(), osl::KNIGHT, osl::Piece::owner(), osl::PAWN, osl::Piece::ptype(), osl::PTYPE_EMPTY, osl::Piece::square(), and osl::Square::x().
|
static |
Definition at line 179 of file quiescenceGenerator.tcc.
References osl::alt(), osl::isMajor(), osl::Piece::isOnBoardByOwner(), osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), target, and osl::U.
|
inlinestaticprivate |
Definition at line 64 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Square::canPromote(), osl::Move::isDrop(), osl::newPtypeO(), osl::PAWN, osl::Move::ptype(), osl::eval::Ptype_Eval_Table, osl::Piece::ptypeO(), osl::ROOK, osl::Move::to(), osl::unpromote(), and osl::eval::PtypeEvalTable::value().
|
inlinestaticprivate |
Definition at line 127 of file quiescenceGenerator.tcc.
References osl::Move::ptype(), and osl::eval::Ptype_Eval_Table.
|
staticprivate |
Definition at line 145 of file quiescenceGenerator.tcc.
References osl::BISHOP, osl::Move::from(), osl::Move::isCaptureOrPromotion(), osl::Move::isDrop(), osl::LANCE, osl::Move::ptypeO(), osl::ROOK, target, and osl::Move::to().
|
static |
Definition at line 1202 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Square::canPromote(), osl::Move::from(), osl::move_generator::capture::generate(), osl::move_generator::addeffect8::hasEffect(), osl::Piece::isOnBoardByOwner(), osl::Move::isPromotion(), osl::KNIGHT, osl::LANCE, osl::Piece::owner(), osl::PAWN, osl::Piece::ptype(), osl::PTYPE_EMPTY, osl::Piece::ptypeO(), osl::SILVER, osl::Piece::square(), and osl::Square::x().
|
static |
Definition at line 771 of file quiescenceGenerator.tcc.
References osl::alt(), osl::captured(), osl::Move::capturePtype(), osl::move_generator::capture::generate(), osl::Move::isDrop(), osl::Move::isPromotion(), osl::newPtypeO(), osl::PAWN, osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Piece::ptypeO(), and osl::Move::to().
|
static |
Definition at line 1095 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, BOOST_STATIC_ASSERT(), osl::GOLD, osl::Piece::isOnBoardByOwner(), osl::Piece::isPromoted(), osl::KNIGHT, osl::Piece::ptype(), osl::PTYPE_EMPTY, and osl::Piece::square().
|
static |
Definition at line 872 of file quiescenceGenerator.tcc.
References osl::alt(), osl::Board_Table, osl::PtypeTable::canDropTo(), osl::captured(), osl::Move::capturePtype(), osl::Move::from(), osl::move_generator::capture::generate(), osl::GOLD, osl::Move::isDrop(), osl::isMajor(), osl::Move::isNormal(), osl::Piece::isPiece(), osl::Move::isPromotion(), osl::KING, osl::KNIGHT, osl::LANCE, osl::BoardTable::nextSquare(), osl::Piece::owner(), osl::PAWN, osl::Move::ptype(), osl::PTYPE_EMPTY, osl::eval::Ptype_Eval_Table, osl::Ptype_Table, osl::SHORT8_DIRECTION_MAX, osl::SHORT8_DIRECTION_MIN, osl::SILVER, osl::Piece::square(), target, osl::Move::to(), and osl::Square::x().
void osl::search::QuiescenceGenerator< P >::capture | ( | const NumEffectState & | state, |
MoveVector & | moves, | ||
Piece | dont_capture | ||
) |
Definition at line 22 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::ntesuki::capture(), osl::move_generator::capture::generate(), osl::Piece::isPiece(), osl::KNIGHT, osl::LANCE, moves, osl::PAWN, osl::Piece::ptype(), osl::Piece::square(), and target.
|
static |
P が敵の PTYPE を取る手を生成する.
dont_capture | これを取る手は除く |
|
inlinestatic |
P が敵の target を取る手を生成する.
Definition at line 148 of file quiescenceGenerator.h.
References osl::move_generator::capture::generate().
|
inlinestatic |
P が敵の target を取る手を最大1手生成する.
Definition at line 45 of file quiescenceGenerator.h.
References osl::move_generator::GenerateCapture::generate1().
|
static |
Definition at line 505 of file quiescenceGenerator.tcc.
References osl::alt().
Referenced by main().
|
static |
Definition at line 517 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Square::canPromote(), osl::captured(), osl::Move::capturePtype(), osl::Move::from(), osl::Move::isDrop(), osl::Move::isPromotion(), osl::KNIGHT, osl::LANCE, osl::newPtypeO(), osl::PAWN, osl::Move::ptype(), osl::PTYPE_EMPTY, osl::eval::Ptype_Eval_Table, osl::Piece::ptypeO(), osl::Move::ptypeO(), osl::ROOK, osl::Move::to(), and osl::unpromote().
|
static |
Definition at line 1504 of file quiescenceGenerator.tcc.
|
static |
Definition at line 1511 of file quiescenceGenerator.tcc.
References osl::eval::min(), and osl::search::HistoryTable::value().
|
static |
Definition at line 352 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, finish, osl::GOLD, osl::Piece::isOnBoardByOwner(), osl::KNIGHT, osl::LANCE, osl::PAWN, osl::PKNIGHT, osl::Piece::ptype(), osl::ROOK, osl::SILVER, and osl::Piece::square().
|
static |
Definition at line 460 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Board_Table, osl::Move::from(), osl::move_generator::capture::generate(), osl::BoardTable::getShortOffset(), osl::move_generator::addeffect8::hasEffect(), osl::Move::isCapture(), osl::isMajor(), osl::Piece::isOnBoardByOwner(), osl::LANCE, osl::ROOK, osl::Square::square, and osl::Move::to().
Referenced by osl::search::QSearch2SafeEscape< Eval, P >::operator()().
|
static |
直前に指手から逃げる
void osl::search::QuiescenceGenerator< P >::escapeFromLastMove | ( | const NumEffectState & | state, |
Move | last_move, | ||
MoveVector & | moves | ||
) |
Definition at line 1450 of file quiescenceGenerator.tcc.
References osl::alt(), osl::Move::capturePtype(), osl::Move::from(), osl::move_generator::capture::generate(), osl::Move::isCapture(), osl::Move::isDrop(), osl::Move::isNormal(), osl::Piece::isOnBoardByOwner(), osl::Move::isPromotion(), moves, osl::PAWN, osl::Move::ptype(), target, and osl::Move::to().
|
static |
void osl::search::QuiescenceGenerator< P >::escapeFromLastMoveOtherThanPawn | ( | const NumEffectState & | state, |
Move | last_move, | ||
MoveVector & | moves | ||
) |
Definition at line 433 of file quiescenceGenerator.tcc.
References osl::Move::isNormal(), osl::KING, osl::KNIGHT, osl::PAWN, osl::Move::ptype(), osl::eval::Ptype_Eval_Table, osl::Move::ptypeO(), osl::Move::to(), and osl::eval::PtypeEvalTable::value().
|
static |
Definition at line 1319 of file quiescenceGenerator.tcc.
References osl::alt(), osl::Move::isCapture(), osl::Move::isDrop(), osl::KING, osl::PAWN, osl::Move::ptype(), and osl::Move::to().
|
static |
Definition at line 1356 of file quiescenceGenerator.tcc.
References osl::alt(), osl::move_generator::capture::generate(), osl::Move::isCapture(), osl::Move::isDrop(), osl::KING, osl::Move::ptype(), and osl::Move::to().
|
static |
escape | KING以外の駒 |
Definition at line 231 of file quiescenceGenerator.tcc.
References osl::alt(), osl::BISHOP, osl::Board_Table, osl::Move::from(), osl::BoardTable::getShortOffset(), osl::Move::isCaptureOrPromotion(), osl::Move::isDrop(), osl::KING, osl::LANCE, osl::PAWN, osl::Piece::ptype(), osl::Move::ptype(), osl::eval::Ptype_Eval_Table, osl::Piece::square(), osl::Move::to(), osl::unpromote(), and osl::eval::PtypeEvalTable::value().
|
static |
Definition at line 1303 of file quiescenceGenerator.tcc.
References osl::alt(), osl::move_generator::capture::generate(), and osl::Move::to().
|
static |
Definition at line 613 of file quiescenceGenerator.tcc.
References osl::alt(), osl::Move::from(), osl::move_generator::capture::generate(), osl::Piece::isOnBoardByOwner(), osl::LANCE, moves, osl::PPAWN, osl::PROOK, osl::Piece::ptype(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::ROOK, osl::Piece::square(), osl::Move::to(), osl::Square::x(), and osl::Square::y().
|
static |
|
inline |
Definition at line 161 of file quiescenceGenerator.h.
References moves.
|
static |
|
inline |
Definition at line 170 of file quiescenceGenerator.h.
References osl::alt(), osl::eval::min(), osl::Move::to(), and osl::search::HistoryTable::value().
|
static |
Definition at line 823 of file quiescenceGenerator.tcc.
References osl::BISHOP, osl::Move::capturePtype(), osl::Move::from(), osl::move_generator::capture::generate(), osl::Move::isCapture(), osl::Piece::isPromoted(), osl::PAWN, osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), and osl::Move::to().