#include <ptypeTable.h>
Public Member Functions | |
PtypeTable () | |
unsigned int | getShortMoveMask (Player p, PtypeO ptypeo, Direction dir) const |
mask_t | getMaskLow (Ptype ptype) const |
bool | hasLongMove (Ptype ptype) const |
遅くて良い? More... | |
bool | isBetterToPromote (Ptype ptype) const |
int | getCanDropLimit (Player player, Ptype ptype) const |
bool | canDropTo (Player pl, Ptype ptype, Square pos) const |
const char * | getName (Ptype ptype) const |
const char * | getCsaName (Ptype ptype) const |
int | getMoveMask (Ptype ptype) const |
int | getIndexMin (Ptype ptype) const |
int | getIndexLimit (Ptype ptype) const |
const EffectContent | getEffect (PtypeO ptypeo, Square from, Square to) const |
fromにいるptypeoがtoに利きを持つか? More... | |
const EffectContent & | getEffect (PtypeO ptypeo, Offset32 offset32) const |
const EffectContent | getEffectNotLongU (PtypeO ptypeo, Square from, Square to) const |
ptypeo が,自分から offset のところに効きを持つか? U除く More... | |
bool | hasUnblockableEffect (PtypeO attacker, Square from, Square to) const |
Static Public Member Functions | |
static int | getKingIndex (Player p) |
Private Member Functions | |
template<Ptype T> | |
void | initPtypeSub (Int2Type< false > isBasic) |
template<Ptype T> | |
void | initPtypeSub (Int2Type< true > isBasic) |
template<Ptype T> | |
void | initPtype () |
void | init () |
bool | canDropTo (Ptype ptype, Square pos, Int2Type< BLACK >) const |
bool | canDropTo (Ptype ptype, Square pos, Int2Type< WHITE >) const |
EffectContent & | effect (PtypeO ptypeo, Offset32 offset32) |
Private Attributes | |
CArray< mask_t, PTYPE_SIZE > | numMaskLows |
CArray< int, PTYPE_SIZE > | numIndices |
CArray< const char *, PTYPE_SIZE > | names |
CArray< const char *, PTYPE_SIZE > | csaNames |
CArray< bool, PTYPE_SIZE > | betterToPromote |
CArray< int, PTYPE_SIZE > | moveMasks |
CArray< int, PTYPE_SIZE > | indexMins |
CArray< int, PTYPE_SIZE > | indexLimits |
CArray2d< int, 2, PTYPE_SIZE > | canDropLimit |
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > | effectTable |
CArray2d< EffectContent, PTYPEO_SIZE, Offset32::SIZE > | effectTableNotLongU |
CArray2d< unsigned int, 2, SHORT_DIRECTION_SIZE > | shortMoveMask |
Definition at line 18 of file ptypeTable.h.
osl::PtypeTable::PtypeTable | ( | ) |
Definition at line 6 of file ptypeTable.cc.
References osl::BLACK, osl::EffectContent::DIRECT(), effect(), getEffect(), init(), osl::newPtypeO(), osl::PPAWN, osl::ROOK, and osl::WHITE.
Definition at line 82 of file ptypeTable.h.
References osl::BLACK, getCanDropLimit(), and osl::Square::y().
Referenced by osl::search::QuiescenceGenerator< P >::breakThreatmate(), canDropTo(), osl::effect_action::SimpleMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::search::BreakThreatmate::generate(), osl::search::BreakThreatmate::generateBreakDrop(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), and osl::state::SimpleState::isValidMoveByRule().
Definition at line 86 of file ptypeTable.h.
References getCanDropLimit(), osl::WHITE, and osl::Square::y().
Definition at line 91 of file ptypeTable.h.
References osl::BLACK, and canDropTo().
|
inlineprivate |
Definition at line 146 of file ptypeTable.h.
References effectTable, osl::Offset32Base< Width, Width2 >::index(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
Referenced by hasUnblockableEffect(), and PtypeTable().
Definition at line 75 of file ptypeTable.h.
References canDropLimit, osl::isPromoted(), osl::isValid(), and osl::playerToIndex().
Referenced by canDropTo().
|
inline |
Definition at line 103 of file ptypeTable.h.
References csaNames.
Referenced by osl::rating::AttackKing8::name(), osl::rating::Pattern::name(), osl::rating::DropPtype::name(), osl::rating::RelativeKingX::name(), osl::rating::DefenseKing8::name(), osl::rating::PinAttack::name(), osl::rating::RelativeKingY::name(), osl::rating::LongTarget::name(), osl::rating::LongTarget2::name(), osl::rating::PatternLong::name(), osl::rating::PatternLong2::name(), osl::rating::Chase::name(), osl::record::csa::show(), show(), and osl::record::csa::strToPtype().
|
inline |
fromにいるptypeoがtoに利きを持つか?
ptypeo | - 駒の種類 |
from | - 駒の位置 |
to | - 利きをチェックするマスの位置 |
Definition at line 135 of file ptypeTable.h.
References osl::Square::isOnBoard().
Referenced by osl::checkmate::Dfpn::attack(), osl::move_generator::addeffect8::canAddLongEffect(), osl::checkmate::FixedDepthSearcher2::defenseEstimation(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::search::QuiescenceSearch2< EvalT >::examineTakeBack2(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::move_generator::addeffect8::findBlocker(), osl::effect_util::Pin::findPtype(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::addeffect8::generateLongDropWithOffset(), osl::move_generator::without_effect::generateLongMove(), osl::move_generator::addeffect8::hasEffect(), osl::state::NumEffectState::hasEffectIf(), osl::effect::hasLongMove(), osl::move_generator::addeffect8::hasShortEffect(), osl::effect::hasShortMove(), osl::move_generator::addeffect8::hasUnblockableEffect(), hasUnblockableEffect(), osl::checkmate::ImmediateCheckmateTable::ImmediateCheckmateTable(), osl::state::SimpleState::isAlmostValidMove(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), osl::effect_util::UnblockableCheck::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::state::SimpleState::isValidMoveByRule(), osl::effect::Liberty8Table::Liberty8Table(), PtypeTable(), osl::effect::setBetweenMask(), osl::effect_util::SendOffSquare::Table::Table(), osl::search::StateElements::validCaptureMove(), and osl::search::StateElements::validSimpleMove().
|
inline |
Definition at line 140 of file ptypeTable.h.
References effectTable, osl::Offset32Base< Width, Width2 >::index(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
|
inline |
ptypeo が,自分から offset のところに効きを持つか? U除く
Definition at line 156 of file ptypeTable.h.
References effectTableNotLongU, osl::Square::isOnBoard(), osl::isValidPtypeO(), and osl::PTYPEO_MIN.
|
inline |
Definition at line 116 of file ptypeTable.h.
References indexLimits, and osl::isBasic().
Referenced by osl::PieceStand::canAdd(), osl::search::AlphaBeta3::generateCapture(), osl::search::AlphaBeta3::generateCaptureAll(), osl::search::BigramKillerMove::getMove(), osl::search::AlphaBeta3::quiesce(), osl::search::AlphaBeta3::quiesceRoot(), osl::eval::ml::PieceStandY::setUp(), osl::eval::ml::PtypeCountXY::setUp(), osl::eval::ml::PtypeCountXYAttack::setUp(), and show().
|
inline |
Definition at line 111 of file ptypeTable.h.
References indexMins, and osl::isBasic().
Referenced by osl::PieceStand::canAdd(), osl::eval::ml::PieceStand::eval(), osl::eval::ml::PieceStand::evalWithUpdate(), osl::search::AlphaBeta3::generateCapture(), osl::search::AlphaBeta3::generateCaptureAll(), osl::search::BigramKillerMove::getMove(), hasLongMove(), osl::eval::ml::NonPawnPieceStandTurn::index(), osl::eval::ml::PieceStandY::index(), osl::eval::ml::PtypeCount::indexBoardCount(), osl::eval::ml::PtypeCount::indexBoardCountX(), osl::eval::ml::PtypeCount::indexBoardCountY(), osl::eval::ml::PtypeCount::indexCount(), osl::eval::ml::PtypeCount::indexCountX(), osl::eval::ml::PtypeCount::indexCountY(), osl::record::MiniBoardChar50::MiniBoardChar50(), osl::progress::ml::NewProgress::NewProgress(), osl::search::AlphaBeta3::quiesce(), osl::search::AlphaBeta3::quiesceRoot(), osl::eval::ml::PieceStandY::setUp(), osl::eval::ml::PtypeCountXY::setUp(), osl::eval::ml::PtypeCountXYAttack::setUp(), show(), and osl::progress::ml::NewProgress::updateMain().
|
inlinestatic |
Definition at line 121 of file ptypeTable.h.
References osl::BLACK, and osl::isValid().
|
inline |
Definition at line 49 of file ptypeTable.h.
References numMaskLows.
Referenced by osl::state::SimpleState::countPiecesOnStandBit(), osl::rating::EscapePinGroup::findMatch(), osl::state::NumEffectState::findThreatenedPiece(), osl::rating::EscapePin::match(), osl::annotate::ThreatmateIfMorePieces::match(), and osl::state::NumEffectState::prologueDrop().
|
inline |
Definition at line 107 of file ptypeTable.h.
References moveMasks.
Referenced by osl::search::QuiescenceGenerator< P >::attackKing8(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::effect_util::UnblockableEffect::find(), osl::effect_util::VirtualPin::findDirection(), osl::effect_util::Pin::findDirection(), osl::eval::TakeBackValue::findEffectPiecesAfterMove(), osl::effect_util::EffectUtil::forEachEffectOfPtypeO(), osl::checkmate::ImmediateCheckmateTable::ImmediateCheckmateTable(), osl::effect_util::Neighboring8Direct::Table::init(), osl::effect_util::Neighboring8Effect::Table::init(), osl::move_probability::AddEffectLong::match(), osl::effect::AddMaskAction< Liberty, P, T >::operator()(), osl::checkmate::ProofNumberTable::ProofNumberTable(), and osl::move_probability::StateInfo::updatePinnedGenerals().
|
inline |
|
inline |
Definition at line 44 of file ptypeTable.h.
References osl::playerToIndex(), osl::PTYPEO_MIN, and shortMoveMask.
|
inline |
遅くて良い?
Definition at line 67 of file ptypeTable.h.
References getIndexMin(), and osl::unpromote().
Referenced by osl::checkmate::OracleAdjust::attack(), osl::effect_util::Neighboring8Direct::Table::findNearest(), osl::effect::Liberty8Table::getLongEffect(), osl::search::BigramKillerMove::getMove(), osl::effect_util::Neighboring8Direct::Table::hasEffect(), osl::effect_util::Neighboring8Effect::Table::hasEffect(), osl::effect_util::Neighboring25Direct::hasEffectNaive(), osl::effect_util::Neighboring8Effect::hasEffectNaive(), osl::effect_util::Neighboring8Direct::hasEffectNaive(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::rating::ImmediateAddSupport::index(), osl::move_generator::addeffect8::AddEffect8Table::initDropSquare(), osl::move_generator::addeffect8::AddEffect8Table::initLongDropSquare(), osl::effect::Liberty8Table::Liberty8Table(), and osl::effect::Liberty8Table::longEffectOf().
Definition at line 163 of file ptypeTable.h.
References effect(), getEffect(), and osl::EffectContent::hasUnblockableEffect().
Referenced by osl::search::QuiescenceSearch2< EvalT >::examineMoves().
|
private |
Definition at line 53 of file ptypeTable.cc.
References osl::BLACK, osl::Board_Table, osl::BOOST_STATIC_ASSERT(), osl::EffectContent::DIRECT(), osl::DIRECTION_MAX, osl::DIRECTION_MIN, osl::BoardTable::getDxForBlack(), osl::BoardTable::getDyForBlack(), osl::move_generator::addeffect8::hasEffect(), osl::Offset32Base< Width, Width2 >::index(), osl::isLong(), osl::LONG_U, osl::newOffset(), osl::newPtypeO(), osl::PTYPE_MAX, osl::PTYPE_MIN, osl::PTYPEO_MIN, osl::ROOK, and osl::WHITE.
Referenced by PtypeTable().
|
private |
Definition at line 48 of file ptypeTable.cc.
References osl::isBasic().
|
private |
Definition at line 39 of file ptypeTable.cc.
|
private |
黒
白
Definition at line 21 of file ptypeTable.cc.
References osl::canPromote(), osl::promote(), and osl::Square::reverseY().
|
inline |
Definition at line 71 of file ptypeTable.h.
References betterToPromote.
Referenced by osl::search::ShouldPromoteCut::canIgnore(), osl::effect_action::BetterToPromote< Action >::doAction(), and osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe().
|
private |
Definition at line 25 of file ptypeTable.h.
Referenced by isBetterToPromote().
|
private |
Definition at line 30 of file ptypeTable.h.
Referenced by getCanDropLimit().
|
private |
Definition at line 24 of file ptypeTable.h.
Referenced by getCsaName().
|
private |
Definition at line 32 of file ptypeTable.h.
Referenced by effect(), and getEffect().
|
private |
Definition at line 33 of file ptypeTable.h.
Referenced by getEffectNotLongU().
|
private |
Definition at line 28 of file ptypeTable.h.
Referenced by getIndexLimit().
|
private |
Definition at line 27 of file ptypeTable.h.
Referenced by getIndexMin().
|
private |
Definition at line 26 of file ptypeTable.h.
Referenced by getMoveMask().
|
private |
Definition at line 23 of file ptypeTable.h.
Referenced by getName().
|
private |
Definition at line 22 of file ptypeTable.h.
|
private |
Definition at line 21 of file ptypeTable.h.
Referenced by getMaskLow().
|
private |
Definition at line 34 of file ptypeTable.h.
Referenced by getShortMoveMask().