#include <proofNumberTable.h>
Classes | |
struct | Liberty |
struct | Table |
Public Member Functions | |
ProofNumberTable () | |
const Liberty | countLiberty (Ptype ptype, Direction d, unsigned int liberty_mask) const |
dir 方向からの王手をかけた時のlibertyの予想 More... | |
const Liberty | countLibertyShortNotKnight (Player player, Square to, Ptype ptype, Square king, King8Info info) const |
8近傍へのdropまたは取れない移動後のlibertyの予測値を返す. More... | |
const Liberty | countLibertyLong (Player player, Square to, Ptype ptype, Square king, King8Info info) const |
int | countLiberty (const NumEffectState &state, int liberty_count, Move move, Square king, King8Info info) const |
move は王手である必要がある More... | |
int | countLiberty (const NumEffectState &state, Move move) const |
テスト用 More... | |
int | libertyAfterAllDrop (const NumEffectState &state) const |
drop のみ More... | |
int | libertyAfterAllDrop (const NumEffectState &state, Player attack, King8Info info) const |
int | libertyAfterAllMove (const NumEffectState &state) const |
移動 のみ More... | |
int | libertyAfterAllMove (const NumEffectState &state, Player attack, King8Info info, Square king) const |
int | libertyAfterAllCheck (const NumEffectState &state) const |
全て More... | |
int | disproofAfterAllCheck (const NumEffectState &, Player, King8Info) const |
const ProofDisproof | attackEstimation (const NumEffectState &state) const |
全て More... | |
const ProofDisproof | attackEstimation (const NumEffectState &state, Player attack, King8Info info, Square king) const |
Private Attributes | |
boost::scoped_ptr< Table > | table |
Definition at line 21 of file proofNumberTable.h.
osl::checkmate::ProofNumberTable::ProofNumberTable | ( | ) |
Definition at line 76 of file proofNumberTable.cc.
References osl::misc::BitOp::countBit(), osl::dirToMask(), osl::PtypeTable::getMoveMask(), osl::GOLD, osl::checkmate::ProofNumberTable::Liberty::has_effect, osl::isPiece(), osl::KING, osl::checkmate::ProofNumberTable::Liberty::liberty, osl::LONG_DIRECTION_MAX, osl::LONG_DIRECTION_MIN, osl::eval::max(), osl::eval::min(), osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::PTYPE_BASIC_MIN, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, osl::Ptype_Table, osl::shortToLong(), table, and osl::U.
const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation | ( | const NumEffectState & | state) | const |
全て
Definition at line 350 of file proofNumberTable.cc.
References osl::alt().
Referenced by osl::checkmate::FixedDepthSearcher2::attack(), and osl::checkmate::FixedDepthSearcher::attack().
const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation | ( | const NumEffectState & | state, |
Player | attack, | ||
King8Info | info, | ||
Square | king | ||
) | const |
Definition at line 337 of file proofNumberTable.cc.
References osl::eval::min().
|
inline |
dir 方向からの王手をかけた時のlibertyの予想
Definition at line 62 of file proofNumberTable.h.
References table, osl::UUL, and osl::UUR.
Referenced by osl::checkmate::PureLibertyEstimator::attackH(), countLibertyLong(), and countLibertyShortNotKnight().
|
inline |
move は王手である必要がある
Definition at line 112 of file proofNumberTable.h.
References osl::alt(), osl::misc::BitOp::countBit(), countLibertyLong(), countLibertyShortNotKnight(), osl::checkmate::ProofNumberTable::Liberty::has_effect, osl::effect_util::AdditionalEffect::hasEffect(), osl::Move::isDrop(), osl::Neighboring8::isNeighboring8(), osl::KNIGHT, osl::checkmate::ProofNumberTable::Liberty::liberty, osl::checkmate::King8Info::liberty(), osl::eval::max(), osl::Move::player(), osl::Move::ptype(), and osl::Move::to().
int osl::checkmate::ProofNumberTable::countLiberty | ( | const NumEffectState & | state, |
Move | move | ||
) | const |
テスト用
Definition at line 218 of file proofNumberTable.cc.
References osl::alt(), and osl::Move::player().
|
inline |
Definition at line 86 of file proofNumberTable.h.
References osl::BLACK, osl::Board_Table, countLiberty(), osl::BoardTable::getLongDirection(), osl::BoardTable::getShortOffsetNotKnight(), osl::isLong(), osl::isMajor(), osl::Neighboring8::isNeighboring8(), osl::LANCE, osl::checkmate::King8Info::liberty(), osl::unpromote(), osl::WHITE, and osl::Offset::zero().
Referenced by countLiberty().
|
inline |
8近傍へのdropまたは取れない移動後のlibertyの予測値を返す.
玉は取り返せる時でも取り返さない値. 桂馬は表をひく必要がないので呼び出し側で処理する.
Definition at line 74 of file proofNumberTable.h.
References osl::BLACK, osl::Board_Table, countLiberty(), osl::BoardTable::getShort8(), osl::Neighboring8::isNeighboring8(), osl::KNIGHT, osl::checkmate::King8Info::liberty(), and osl::WHITE.
Referenced by countLiberty().
int osl::checkmate::ProofNumberTable::disproofAfterAllCheck | ( | const NumEffectState & | state, |
Player | attack, | ||
King8Info | info | ||
) | const |
Definition at line 323 of file proofNumberTable.cc.
References osl::misc::BitOp::countBit(), osl::checkmate::King8Info::countMoveCandidate(), osl::checkmate::King8Info::dropCandidate(), osl::GOLD, osl::eval::max(), and osl::SILVER.
int osl::checkmate::ProofNumberTable::libertyAfterAllCheck | ( | const NumEffectState & | state) | const |
全て
Definition at line 359 of file proofNumberTable.cc.
int osl::checkmate::ProofNumberTable::libertyAfterAllDrop | ( | const NumEffectState & | state) | const |
int osl::checkmate::ProofNumberTable::libertyAfterAllDrop | ( | const NumEffectState & | state, |
Player | attack, | ||
King8Info | info | ||
) | const |
Definition at line 227 of file proofNumberTable.cc.
References osl::GOLD, osl::checkmate::King8Info::libertyCount(), osl::checkmate::King8Info::libertyDropMask(), result, and osl::ROOK.
int osl::checkmate::ProofNumberTable::libertyAfterAllMove | ( | const NumEffectState & | state) | const |
int osl::checkmate::ProofNumberTable::libertyAfterAllMove | ( | const NumEffectState & | state, |
Player | attack, | ||
King8Info | info, | ||
Square | king | ||
) | const |
Definition at line 256 of file proofNumberTable.cc.
References osl::alt(), osl::BLACK, osl::Board_Table, osl::Square::canPromote(), osl::BoardTable::getOffset(), osl::GOLD, osl::move_generator::addeffect8::hasEffect(), osl::isMajor(), osl::Piece::isOnBoardByOwner(), osl::isPromoted(), osl::checkmate::King8Info::liberty(), osl::checkmate::King8Info::moveCandidateMask(), osl::Piece::ptype(), osl::Piece::ptypeO(), result, osl::Piece::square(), osl::Square::squareForBlack(), osl::U, osl::WHITE, and osl::Square::y().
|
private |
Definition at line 55 of file proofNumberTable.h.
Referenced by countLiberty(), and ProofNumberTable().