All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
osl::Piece Class Reference

駒. More...

#include <piece.h>

List of all members.

Public Member Functions

int intValue () const
 Piece (Player owner, Ptype ptype, int num, Square square)
 Piece ()
Ptype ptype () const
PtypeO ptypeO () const
int number () const
const Square square () const
Pieceoperator+= (Offset offset)
void setSquare (Square square)
template<Player P>
bool isOnBoardByOwner () const
 piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true.
bool isOnBoardByOwner (Player owner) const
 isOnBoardByOwner の通常関数のバージョン.
const Piece promote () const
const Piece unpromote () const
const Piece captured () const
 取られたpieceを作成.
const Piece promoteWithMask (int promote_mask) const
const Piece checkPromote (bool promotep) const
bool isPromoted () const
 promoteした駒かどうかをチェックする
bool isOnBoardNotPromoted () const
 promoteしていないOnBoardの駒であることのチェック Lance位しか使い道がない?
bool isPromotedNotKingGold () const
bool isEmpty () const
bool isEdge () const
template<Ptype T>
bool isPtype () const
bool isPlayerPtype (Player pl, Ptype ptype) const
 あるpieceがPlayer pの持ち物でPtype ptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.
bool isPlayerBasicPtype (Player pl, Ptype ptype) const
 あるpieceがPlayer pの持ち物でBASIC typeがptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.
bool isPiece () const
bool pieceIsBlack () const
 pieceであることが分かっている時に,更にBlackかどうかをチェックする.
Player owner () const
template<Player P>
bool canMoveOn () const
 Player Pの駒が,thisの上に移動できるか?
bool canMoveOn (Player pl) const
bool isOnBoard () const

Static Public Member Functions

static const Piece makeDirect (int value)
static const Piece EMPTY ()
static const Piece EDGE ()
static const Piece makeKing (Player owner, Square square)
 玉を作る
static bool isEmptyNum (int num)
static bool isEdgeNum (int num)
static bool isPieceNum (int num)

Static Public Attributes

static const int SIZE = 40
static const int BitOffsetPtype = 16
static const int BitOffsetPromote = BitOffsetPtype+3
static const int BitOffsetMovePromote = BitOffsetPromote+4

Private Member Functions

 Piece (int p)
bool isOnBoardByOwner (Int2Type< BLACK >) const
bool isOnBoardByOwner (Int2Type< WHITE >) const
 opteronでは, return static_cast<int>((piece+0x80000000)&0x800000ff)>0; の方が速かった.
bool canMoveOn (Int2Type< BLACK >) const
 PIECE_EMPTY 0x00008000 BLACK_PIECE 0x000XxxYY X>=2, YY>0 PIECE_EDGE 0xfff14000 WHITE_PIECE 0xfffXxxYY X>=2, YY>0.
bool canMoveOn (Int2Type< WHITE >) const

Private Attributes

int piece

Detailed Description

駒.

駒はptypeo(-15 - 15), 番号(0-39), ポジション(0-0xff)からなる 上位16 bitでptypeo, 8bitで番号, 8bitでポジションとする. 空きマスは 黒,PTYPE_EMPTY, 番号 0x80, ポジション 0 盤外は 白,PTYPE_EDGE, 番号 0x40, ポジション 0

Definition at line 22 of file piece.h.


Constructor & Destructor Documentation

osl::Piece::Piece ( int  p) [inline, private]

Definition at line 25 of file piece.h.

osl::Piece::Piece ( Player  owner,
Ptype  ptype,
int  num,
Square  square 
) [inline]

Definition at line 38 of file piece.h.

osl::Piece::Piece ( ) [inline]

Member Function Documentation

bool osl::Piece::canMoveOn ( Int2Type< BLACK ) const [inline, private]

PIECE_EMPTY 0x00008000 BLACK_PIECE 0x000XxxYY X>=2, YY>0 PIECE_EDGE 0xfff14000 WHITE_PIECE 0xfffXxxYY X>=2, YY>0.

Definition at line 223 of file piece.h.

References piece.

Referenced by osl::checkmate::detail::blockingDiagonalAttack(), osl::move_generator::detail::blockingU(), osl::checkmate::detail::blockingVerticalAttack(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::rating::Threatmate::captureForKnightCheck(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::RookPromoteDefense::eval(), osl::move_generator::detail::generateBishopLongMove(), osl::move_generator::detail::generateBishopLongMoveNotKing(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::promote::AllPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::promote::MayPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::piece_on_board::generateKingDir(), osl::move_generator::detail::generateKnightDir(), osl::move_generator::piece_on_board::generateLance(), osl::move_generator::piece_on_board::generateLong(), osl::move_generator::without_effect::generateLongMove(), osl::move_generator::piece_on_board::generatePawn(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::move_generator::piece_on_board::generateShort(), osl::checkmate::King8Info::hasEffectMask(), osl::checkmate::detail::hasKnightCheckmate(), osl::move_classifier::TrapRook< P >::isMember(), osl::container::NearMask::make(), osl::eval::ml::SilverFork::matchGold(), and osl::move_classifier::TrapRook< P >::testDirection().

bool osl::Piece::canMoveOn ( Int2Type< WHITE ) const [inline, private]

Definition at line 226 of file piece.h.

References piece.

template<Player P>
bool osl::Piece::canMoveOn ( ) const [inline]

Player Pの駒が,thisの上に移動できるか?

Returns:
thisが相手の駒かEMPTYならtrue
Parameters:
P手番

Definition at line 235 of file piece.h.

References canMoveOn().

Referenced by canMoveOn().

bool osl::Piece::canMoveOn ( Player  pl) const [inline]

Definition at line 237 of file piece.h.

References osl::BLACK.

const Piece osl::Piece::captured ( ) const [inline]

取られたpieceを作成.

unpromoteして,Squareは0に 相手の持ちものにする

Definition at line 126 of file piece.h.

References piece, and Piece().

Referenced by osl::state::NumEffectState::prologueCapture(), and osl::eval::endgame::AttackDefense::updateKingMove().

const Piece osl::Piece::checkPromote ( bool  promotep) const [inline]

Definition at line 138 of file piece.h.

References piece, and Piece().

static const Piece osl::Piece::EDGE ( ) [inline, static]

Definition at line 33 of file piece.h.

References osl::EDGE_NUM, Piece(), osl::PTYPE_EDGE, osl::Square::STAND(), and osl::WHITE.

Referenced by osl::rating::PatternBlock::find().

static const Piece osl::Piece::EMPTY ( ) [inline, static]

Definition at line 32 of file piece.h.

References osl::BLACK, osl::EMPTY_NUM, Piece(), osl::PTYPE_EMPTY, and osl::Square::STAND().

Referenced by osl::move_generator::escape::blockByMoveOne(), osl::state::NumEffectState::epilogueDrop(), osl::state::NumEffectState::epilogueSimple(), osl::eval::ppair::PiecePairEval< Eval, Table >::expect(), osl::state::NumEffectState::findAttackAt(), osl::state::NumEffectState::findAttackAtStrict(), osl::state::NumEffectState::findAttackNotBy(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::effect_util::Pin::findLance(), osl::state::NumEffectState::findLongAttackAt(), osl::rating::PatternGroup::findMatch(), osl::move_action::EscapeFilter< P, OrigAction >::findThreat(), osl::state::NumEffectState::findThreatenedPiece(), osl::search::BreakThreatmate::generate(), osl::move_generator::OpenKingRoad< P >::generateDir(), osl::move_generator::detail::generateDir(), osl::move_generator::addeffect8::generateLongMove(), osl::move_generator::Escape< Action >::generateMovesBy(), osl::move_generator::detail::generateOpenOrCapture(), osl::state::NumEffectState::hasEffectAt(), osl::effect_util::UnblockableCheck::isMember(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::state::NumEffectState::makeMove(), osl::state::NumEffectState::makeUnmakeMove(), osl::rating::Pattern::match(), osl::state::SimpleState::nextPiece(), osl::rating::PatternLong::nextPieceOrEnd(), osl::threatmate::RichPredictor::predict(), osl::state::NumEffectState::prologueCapture(), osl::state::NumEffectState::prologueSimple(), and osl::state::NumEffectState::selectCheapPiece().

int osl::Piece::intValue ( ) const [inline]
bool osl::Piece::isEdge ( ) const [inline]
static bool osl::Piece::isEdgeNum ( int  num) [inline, static]
bool osl::Piece::isEmpty ( ) const [inline]

Definition at line 160 of file piece.h.

References piece.

Referenced by osl::checkmate::detail::blockingVerticalAttack(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackBonusOne(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateEnterKingBonus(), osl::move_generator::addeffect8::canAddLongEffect(), osl::eval::ml::KnightCheck::canCheck(), osl::rating::Threatmate::captureForKnightCheck(), osl::record::KisenUtils::convertMove(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::FixedDepthSearcher2::defense(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::checkmate::FixedDepthSearcher2::defenseEstimation(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::move_generator::addeffect8::findBlocker(), osl::search::BreakThreatmate::findBlockLong(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::move_action::EscapeFilter< P, OrigAction >::findThreat(), osl::state::NumEffectState::forEachEffectOfPieceLongDir(), osl::move_generator::AdditionalLance< P >::generate(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::promote::AllPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::promote::MayPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::piece_on_board::generateKingDir(), osl::move_generator::detail::generateKnightDir(), osl::move_generator::without_effect::generateLongMove(), osl::move_generator::piece_on_board::generatePawn(), osl::move_generator::piece_on_board::generateShort(), osl::move_generator::addeffect8::generateShortMove(), osl::move_generator::drop::generateX(), osl::checkmate::King8Info::hasEffectMask(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::checkmate::detail::hasKnightCheckmate(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::state::SimpleState::isAlmostValidDrop(), osl::state::SimpleState::isConsistent(), osl::state::SimpleState::isEmptyBetween(), osl::move_classifier::TrapRook< P >::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::container::NearMask::make(), osl::rating::LongTarget2::match(), osl::record::csa::show(), osl::container::PieceValues::showValues(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::move_action::EscapeFilter< P, OrigAction >::suitable(), osl::eval::ml::BishopRookFork::testCenter(), osl::move_classifier::TrapRook< P >::testDirection(), osl::effect_util::TestEffectOfMove< P, InterestEmpty, Dir >::testLong(), osl::effect_util::TestEffectOfMove< P, InterestEmpty, Dir >::testShort(), osl::state::SimpleState::testValidityOtherThanEffect(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::search::StateElements::validCaptureMove(), and osl::search::StateElements::validSimpleMove().

static bool osl::Piece::isEmptyNum ( int  num) [inline, static]
bool osl::Piece::isOnBoard ( ) const [inline]

Definition at line 244 of file piece.h.

References osl::Square::isPieceStand(), osl::isValid(), and square().

Referenced by osl::eval::ppair::PiecePairEvalTableBase< Table >::adjustPairs(), osl::eval::ppair::PiecePairEvalTableBase< Table >::adjustPairsAfterMove(), osl::search::QuiescenceGenerator< P >::attackKnightWithPawn(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackBonusOne(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackRooks(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateGoldPenalty(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateRookRankBonus(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateSilverPenalty(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::GoldFeatures::canRetreat(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::LanceMobility::countBoth(), osl::mobility::BishopMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::LanceMobility::countSafe(), osl::mobility::BishopMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::state::SimpleState::emulateHandPiece(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::MajorY< true, ROOK >::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::PiecePair::index(), osl::eval::ml::RookRook::index(), osl::state::NumEffectState::isConsistent(), osl::state::SimpleState::isConsistent(), osl::state::SimpleState::isOnBoard(), make1(), make2(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::annotate::ThreatmateIfMorePieces::match(), osl::state::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::eval::ppair::PiecePairWithStand< Table >::setValues(), osl::record::myshogi::show(), show(), osl::eval::ppair::PiecePairWithStand< Table >::standBonus(), osl::move_probability::BlockLong::updateCache(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), and osl::eval::ml::PiecePair::value().

bool osl::Piece::isOnBoardByOwner ( Int2Type< BLACK ) const [inline, private]

Definition at line 80 of file piece.h.

References piece.

Referenced by osl::eval::ml::KnightFork::accumulate(), osl::search::QuiescenceGenerator< P >::advanceBishop(), osl::search::QuiescenceGenerator< P >::attackGoldWithPawn(), osl::search::QuiescenceGenerator< P >::attackMajorPiece(), osl::search::QuiescenceGenerator< P >::attackSilverWithPawn(), osl::search::QuiescenceGenerator< P >::attackWithKnight(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusBishop(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusLance(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusRook(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateRookRankBonus(), osl::move_generator::addeffect8::canAddLongEffect(), osl::eval::ml::KnightCheck::canCheck(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canRetreat(), osl::rating::ImmediateAddSupport::Test::doAction(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8EffectAll::effectState(), osl::search::QuiescenceGenerator< P >::escapeAll(), osl::search::QuiescenceGenerator< P >::escapeByMoveOnly(), osl::search::QuiescenceGenerator< P >::escapeFromLastMove(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::effect_util::UnblockableEffect::find(), osl::move_generator::addeffect8::findBlocker(), osl::effect_util::Pin::findDirection(), osl::eval::TakeBackValue::findEffectPiecesAfterMove(), osl::effect_util::Pin::findLance(), osl::effect_util::Pin::findPtype(), osl::move_probability::StateInfo::finishUpdate(), osl::search::QuiescenceSearch2< EvalT >::generateAndExamineTakeBack2(), osl::search::AlphaBeta3::generateCapture(), osl::search::AlphaBeta3::generateCaptureAll(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateKing(), osl::move_generator::addeffect8::generateLongDrop(), osl::move_generator::addeffect8::generateLongDropWithOffset(), osl::move_generator::without_effect::generateLongMove(), osl::move_generator::detail::generateMovePiecePtypeMask(), osl::move_generator::detail::generateNotKing(), osl::move_generator::all_moves::generatePtype(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::checkmate::King8Info::hasEffectMask(), osl::move_classifier::TrapRook< P >::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::makeCapture(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::effect_util::SendOffSquare::onlyOneSupport(), osl::search::QuiescenceGenerator< P >::promote(), osl::search::AlphaBeta3::quiesce(), osl::search::AlphaBeta3::quiesceRoot(), osl::record::ki2::show(), osl::move_classifier::TrapRook< P >::testDirection(), and osl::move_probability::StateInfo::updatePinnedGenerals().

bool osl::Piece::isOnBoardByOwner ( Int2Type< WHITE ) const [inline, private]

opteronでは, return static_cast<int>((piece+0x80000000)&0x800000ff)>0; の方が速かった.

Definition at line 88 of file piece.h.

References piece.

template<Player P>
bool osl::Piece::isOnBoardByOwner ( ) const [inline]

piece がプレイヤーPの持ち物でかつボード上にある駒の場合は true.

敵の駒だったり,駒台の駒だったり,Piece::EMPTY(), PIECE_EDGEの場合は false

Parameters:
P(template)- プレイヤー
piece-

Definition at line 99 of file piece.h.

References isOnBoardByOwner().

Referenced by isOnBoardByOwner().

bool osl::Piece::isOnBoardByOwner ( Player  owner) const [inline]

isOnBoardByOwner の通常関数のバージョン.

Definition at line 103 of file piece.h.

References osl::BLACK.

bool osl::Piece::isOnBoardNotPromoted ( ) const [inline]

promoteしていないOnBoardの駒であることのチェック Lance位しか使い道がない?

Definition at line 151 of file piece.h.

References piece.

Referenced by osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::RookPromoteDefense::eval(), and osl::eval::ml::BishopHead::eval().

bool osl::Piece::isPiece ( ) const [inline]

Definition at line 200 of file piece.h.

References piece.

Referenced by osl::move_probability::MoveInfo::adhocAdjustAttackCheckmateDefender(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::checkmate::OracleAdjust::attack(), osl::search::QuiescenceGenerator< P >::breakThreatmate(), osl::search::QuiescenceGenerator< P >::capture(), osl::rating::Threatmate::captureForKnightCheck(), osl::record::KisenUtils::convertMove(), osl::search::QuiescenceSearch2< EvalT >::currentValueWithLastThreat(), osl::move_action::EscapeFilter< P, OrigAction >::EscapeFilter(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::effect_util::AdditionalEffect::find(), osl::rating::PatternLong2::find(), osl::rating::PatternBlock::find(), osl::eval::See::findAdditionalPieces(), osl::effect_util::VirtualPin::findDirection(), osl::state::NumEffectState::findLongAttackAt(), osl::rating::PatternLongGroup2::findMatch(), osl::effect_util::Pin::findOffset(), osl::move_generator::Capture< Action >::generate1(), osl::move_generator::detail::generateOpenOrCapture(), osl::search::BreakThreatmate::generateOpenRoad(), osl::state::NumEffectState::hasEffectByPiece(), osl::state::NumEffectState::hasEffectByWithRemove(), osl::eval::ml::PiecePair::index(), osl::state::SimpleState::isConsistent(), osl::move_classifier::BlockLongEffect< P, T >::isMember(), osl::annotate::Vision3::match(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::EscapeThreatened::match(), osl::effect_util::EffectUtil::FindThreat< EvalT >::operator()(), osl::operator<<(), owner(), pieceIsBlack(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::effect_util::EffectUtil::safeCaptureNotByKing(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::ntesuki::NtesukiMoveGenerator::setOrder(), osl::record::csa::show(), osl::move_probability::PawnAttack::squareStatus(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::effect_util::TestEffectOfMove< P, InterestEmpty, Dir >::testLong(), and osl::move_probability::PatternCommon::updateCacheOne().

static bool osl::Piece::isPieceNum ( int  num) [inline, static]
bool osl::Piece::isPlayerBasicPtype ( Player  pl,
Ptype  ptype 
) const [inline]

あるpieceがPlayer pの持ち物でBASIC typeがptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.

Definition at line 192 of file piece.h.

References BitOffsetPtype, osl::canPromote(), osl::isBasic(), isPlayerPtype(), piece, promote(), osl::PTYPE_MAX, and osl::PTYPE_PIECE_MIN.

bool osl::Piece::isPlayerPtype ( Player  pl,
Ptype  ptype 
) const [inline]

あるpieceがPlayer pの持ち物でPtype ptypeであるかどうかをチェックする. TはEMPTY, EDGEではない.

Definition at line 184 of file piece.h.

References BitOffsetPtype, piece, ptype(), osl::PTYPE_MAX, and osl::PTYPE_PIECE_MIN.

Referenced by osl::eval::ml::AttackMajorsInBase::addOne(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), and isPlayerBasicPtype().

bool osl::Piece::isPromoted ( ) const [inline]

promoteした駒かどうかをチェックする

Definition at line 145 of file piece.h.

References piece.

Referenced by osl::search::QuiescenceGenerator< P >::attackWithKnight(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusBishop(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusLance(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateMobilityBonusRook(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateSilverPenalty(), osl::eval::ml::SilverFeatures::canRetreat(), osl::effect_action::Promote< Action >::doAction(), osl::effect_action::Promote< Action >::doActionPtype(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::move_generator::detail::generateKing(), osl::move_generator::detail::generateNotKing(), osl::move_generator::all_moves::generatePtype(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::record::MiniBoard::getState(), osl::eval::ml::MajorY< true, ROOK >::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::RookRook::index(), osl::eval::ml::RookPawnY::indexY(), osl::state::NumEffectState::isConsistent(), osl::state::SimpleState::isConsistent(), isPromotedNotKingGold(), osl::move_probability::PromotionBySacrifice::match(), osl::eval::ml::SilverFork::matchRook(), osl::record::MiniBoardChar50::MiniBoardChar50(), osl::state::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::move_generator::promote::EachOnBoard< Action, P, T, noCapture >::operator()(), osl::record::OPSquare::OPSquare(), promoteWithMask(), osl::move_probability::BlockLong::updateCache(), and osl::search::QuiescenceGenerator< P >::utilizePromoted().

bool osl::Piece::isPromotedNotKingGold ( ) const [inline]
template<Ptype T>
bool osl::Piece::isPtype ( ) const [inline]
static const Piece osl::Piece::makeDirect ( int  value) [inline, static]

Definition at line 30 of file piece.h.

References Piece().

Referenced by main(), and square().

const osl::Piece osl::Piece::makeKing ( Player  owner,
Square  square 
) [static]

玉を作る

Definition at line 27 of file piece.cc.

References osl::BLACK, osl::KING, number(), and Piece().

int osl::Piece::number ( ) const [inline]

Definition at line 63 of file piece.h.

References piece.

Referenced by osl::move_probability::BlockLong::addPiece(), osl::effect_util::AdditionalOrShadow::count(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::RookMobility::countHorizontalAll(), osl::mobility::RookMobility::countVerticalAll(), osl::effect::NumSimpleEffectTable::doEffect(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::move_generator::Capture< Action >::escapeByCapture(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::effect_util::VirtualPin::findDirection(), osl::effect_util::Pin::findDirection(), osl::eval::See::findEffectPiecesAfterMove(), osl::effect_util::Pin::findLance(), osl::state::NumEffectState::findLongAttackAt(), osl::effect_util::Pin::findOffset(), osl::move_action::EscapeFilter< P, OrigAction >::findThreat(), osl::state::NumEffectState::forEachEffectNotBy(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::promote::AllPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::promote::MayPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::piece_on_board::generateLance(), osl::move_generator::piece_on_board::generateLong(), osl::move_generator::addeffect8::generateLongMove(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtype(), osl::move_generator::addeffect8::generateShortMove(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece(), osl::state::NumEffectState::hasEffectByPiece(), osl::state::NumEffectState::hasEffectByWithRemove(), osl::state::NumEffectState::hasEffectNotBy(), osl::state::SimpleState::isConsistent(), make1(), makeKing(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::annotate::Vision3::match(), osl::state::NumEffectState::mobilityOf(), osl::move_generator::without_effect::LongPieceAction< P, T, Action, isAttackToKing >::operator()(), osl::operator<<(), osl::state::NumEffectState::pinnedDir(), osl::state::NumEffectState::prologueCapture(), osl::state::NumEffectState::prologueSimple(), osl::state::NumEffectState::recalcPinOpen(), osl::effect_util::EffectUtil::safeCaptureNotByKing(), osl::record::csa::show(), show(), osl::container::PieceValues::showValues(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::move_action::EscapeFilter< P, OrigAction >::suitable(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), and osl::state::NumEffectState::wasCheckEvasion().

Piece& osl::Piece::operator+= ( Offset  offset) [inline]

Definition at line 71 of file piece.h.

References osl::Offset::intValue(), and piece.

Player osl::Piece::owner ( ) const [inline]

Definition at line 210 of file piece.h.

References isPiece(), and piece.

Referenced by osl::eval::endgame::AttackDefense::addValue(), osl::search::QuiescenceGenerator< P >::attackGoldWithPawn(), osl::search::QuiescenceGenerator< P >::attackKnightWithPawn(), osl::search::QuiescenceGenerator< P >::attackSilverWithPawn(), osl::search::QuiescenceGenerator< P >::breakThreatmate(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackBonusOne(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackRooks(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateEnterKingBonus(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateGoldPenalty(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateRookRankBonus(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateSilverPenalty(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::record::KisenUtils::convertMove(), count(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::BishopMobility::countBoth(), osl::mobility::LanceMobility::countBoth(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::LanceMobility::countSafe(), osl::mobility::BishopMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::search::QuiescenceSearch2< EvalT >::currentValueWithLastThreat(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::state::SimpleState::emulateCapture(), osl::state::SimpleState::emulateHandPiece(), osl::move_action::EscapeFilter< P, OrigAction >::EscapeFilter(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::MajorY< true, ROOK >::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::effect_util::AdditionalEffect::find(), osl::eval::See::findAdditionalPieces(), osl::effect_util::VirtualPin::findDirection(), osl::state::NumEffectState::findLongAttackAt(), osl::rating::AttackKing8Group::findMatch(), osl::rating::PatternGroup::findMatch(), osl::rating::PatternLongGroup2::findMatch(), osl::effect_util::Pin::findOffset(), osl::move_action::EscapeFilter< P, OrigAction >::findThreat(), osl::state::SimpleState::flipHorizontal(), osl::move_generator::Escape< Action >::generate(), osl::move_generator::OpenKingRoad< P >::generateDir(), osl::move_generator::Escape< Action >::generateEscape(), osl::search::BreakThreatmate::generateOpenRoad(), osl::search::BigramKillerMove::getMove(), osl::state::NumEffectState::hasEffectByWithRemove(), osl::state::NumEffectState::hasEffectNotBy(), osl::eval::ml::MajorY< true, ROOK >::index(), osl::eval::ml::Pin::index(), osl::eval::ml::KingPieceRelative::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::King25EffectEach< Stage >::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::eval::ml::PawnDropBoth::indexX(), osl::eval::ml::King8Effect::indexY(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::state::SimpleState::initPawnMask(), osl::state::SimpleState::isConsistent(), osl::move_classifier::BlockLongEffect< P, T >::isMember(), make1(), make2(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::rating::AttackKing8::match(), osl::rating::Pattern::match(), osl::rating::LongTarget2::match(), osl::rating::RookDefense::match(), osl::move_probability::AttackToOpposingSliders::match(), osl::move_probability::LureDefender::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::record::MiniBoardChar50::MiniBoardChar50(), osl::eval::MinorPieceBonus::MinorPieceBonus(), osl::state::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::effect_util::EffectUtil::FindThreat< EvalT >::operator()(), osl::operator<<(), osl::record::OPiece::OPiece(), osl::record::OSquare::OSquare(), osl::state::NumEffectState::pinnedCanMoveTo(), osl::state::NumEffectState::pinnedDir(), osl::threatmate::RichPredictor::predict(), osl::state::SimpleState::rotate180(), osl::effect_util::EffectUtil::safeCaptureNotByKing(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::ntesuki::NtesukiMoveGenerator::setOrder(), osl::eval::ppair::PiecePairWithStand< Table >::setValues(), osl::record::myshogi::show(), osl::record::csa::show(), show(), osl::container::PieceValues::showValues(), osl::move_probability::PawnAttack::squareStatus(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::eval::See::FindEffectMore::store(), osl::annotate::ThreatmateIfMorePieces::suitable(), osl::state::SimpleState::testValidityOtherThanEffect(), osl::move_probability::BlockLong::updateCache(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::eval::endgame::AttackDefense::updateKingMove(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), osl::eval::endgame::DefenseKing::valueOf(), osl::eval::endgame::AttackKing::valueOf(), osl::eval::endgame::AttackDefense::valueOf(), and osl::state::NumEffectState::wasCheckEvasion().

bool osl::Piece::pieceIsBlack ( ) const [inline]

pieceであることが分かっている時に,更にBlackかどうかをチェックする.

Definition at line 206 of file piece.h.

References isPiece(), and piece.

Referenced by osl::eval::ml::LanceMobilityAll::eval(), and osl::move_generator::detail::generateOpenOrCapture().

const Piece osl::Piece::promote ( ) const [inline]

Definition at line 112 of file piece.h.

References osl::canPromote(), piece, Piece(), and ptype().

Referenced by isPlayerBasicPtype().

const Piece osl::Piece::promoteWithMask ( int  promote_mask) const [inline]
Ptype osl::Piece::ptype ( ) const [inline]

Definition at line 56 of file piece.h.

References BitOffsetPtype, and piece.

Referenced by osl::eval::ml::KnightFork::accumulate(), osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::PiecePairKing::addSub(), osl::eval::endgame::AttackDefense::addValue(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::search::QuiescenceGenerator< P >::advanceBishop(), osl::checkmate::OracleAdjust::attack(), osl::search::QuiescenceGenerator< P >::attackGoldWithPawn(), osl::search::QuiescenceGenerator< P >::attackKnightWithPawn(), osl::search::QuiescenceGenerator< P >::attackMajorPiece(), osl::search::QuiescenceGenerator< P >::attackSilverWithPawn(), osl::search::QuiescenceGenerator< P >::attackWithKnight(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateRookRankBonus(), osl::search::QuiescenceGenerator< P >::capture(), osl::record::KisenUtils::convertMove(), count(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::mobility::LanceMobility::countBoth(), osl::mobility::BishopMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::LanceMobility::countSafe(), osl::mobility::BishopMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::effect_action::SimpleBetterToPromote< Action >::doAction(), osl::effect_action::Promote< Action >::doAction(), osl::effect_action::SimpleMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_util::EffectUtil::SafeCapture::doAction(), osl::effect_action::SimpleBetterToPromote< Action >::doActionPtype(), osl::effect_action::SimpleMove< Action >::doActionPtype(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::state::NumEffectState::doCaptureMove(), osl::state::NumEffectState::doUndoCaptureMove(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::state::SimpleState::emulateCapture(), osl::state::SimpleState::emulateHandPiece(), osl::search::QuiescenceGenerator< P >::escapeAll(), osl::move_action::EscapeFilter< P, OrigAction >::EscapeFilter(), osl::search::QuiescenceGenerator< P >::escapeNormalPiece(), osl::eval::ml::SimplePin::eval(), osl::eval::ml::Pin::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::endgame::AttackDefense::expect(), osl::rating::PatternBlock::find(), osl::effect_util::VirtualPin::findDirection(), osl::effect_util::Pin::findDirection(), osl::eval::TakeBackValue::findEffectPiecesAfterMove(), osl::rating::AttackKing8Group::findMatch(), osl::rating::PatternGroup::findMatch(), osl::rating::PatternLongGroup2::findMatch(), osl::state::SimpleState::flipHorizontal(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generate(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::Escape< Action >::generateEscape(), osl::move_generator::detail::generateMovePiecePtypeMask(), osl::move_generator::Escape< Action >::generateMoves(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::move_generator::piece_on_board::generatePtypePromote(), osl::search::BigramKillerMove::getMove(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece(), osl::checkmate::detail::hasKnightCheckmate(), osl::rating::PinAttack::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::index(), osl::rating::ImmediateAddSupport::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::progress::ml::NewProgress::indexRelative(), osl::state::SimpleState::isConsistent(), osl::move_classifier::BlockLongEffect< P, T >::isMember(), isPlayerPtype(), isPromotedNotKingGold(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), make1(), make2(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::rating::PinAttack::match(), osl::rating::AttackKing8::match(), osl::rating::Pattern::match(), osl::annotate::ThreatmateIfMorePieces::match(), osl::rating::LongTarget2::match(), osl::move_probability::AttackFromOpposingSliders::match(), osl::move_probability::AttackToOpposingSliders::match(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::LureDefender::match(), osl::move_probability::AttackKing8Long::match(), osl::move_probability::CoverFork::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::EscapeThreatened::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::record::MiniBoardChar50::MiniBoardChar50(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::PieceBasicLessThan::operator()(), osl::effect::AddMaskAction< Liberty, P, T >::operator()(), osl::operator<<(), osl::record::OPiece::OPiece(), osl::search::QuiescenceGenerator< P >::promote(), promote(), osl::state::SimpleState::rotate180(), osl::effect_util::EffectUtil::safeCaptureNotByKing(), osl::ntesuki::NtesukiMoveGenerator::setOrder(), osl::eval::ppair::PiecePairWithStand< Table >::setValues(), osl::record::myshogi::show(), osl::record::csa::show(), osl::record::ki2::show(), show(), osl::container::PieceValues::showValues(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::move_probability::PawnAttack::squareStatus(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::eval::ml::PiecePairKing::sub(), osl::move_action::EscapeFilter< P, OrigAction >::suitable(), osl::move_probability::ToEffect::supportAttack(), osl::state::SimpleState::testValidityOtherThanEffect(), osl::move_action::NoAddEffectFilter< OrigAction >::unknownMove(), osl::move_action::NoEffectFilter< P, OrigAction >::unknownMove(), osl::move_action::Store::unknownMove(), osl::move_action::NotKingOpenFilter< P, OrigAction >::unknownMove(), osl::move_action::ToAroundKing8Filter< P, OrigAction >::unknownMove(), osl::move_action::ToAroundKing24Filter< P, OrigAction >::unknownMove(), osl::move_action::unknownMove(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::endgame::AttackDefense::updateKingMove(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::search::QuiescenceGenerator< P >::utilizePromoted(), osl::eval::endgame::DefenseKing::valueOf(), and osl::eval::endgame::AttackKing::valueOf().

PtypeO osl::Piece::ptypeO ( ) const [inline]

Definition at line 59 of file piece.h.

References BitOffsetPtype, and piece.

Referenced by osl::checkmate::DualDfpn::OraclePool::addKey(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::eval::ml::PiecePair::adjust12One(), osl::search::QuiescenceGenerator< P >::attackMajorPieceFirstSelection(), osl::search::QuiescenceGenerator< P >::attackSilverWithPawn(), osl::search::QuiescenceGenerator< P >::attackToPinned(), osl::move_generator::addeffect8::canAddLongEffect(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::search::QuiescenceGenerator< P >::check(), osl::search::QuiescenceSearch2< EvalT >::currentValueWithLastThreat(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::checkmate::FixedDepthSearcher2::defenseEstimation(), osl::eval::ppair::PiecePairWithStand< PiecePairPieceTable >::diffAfterCaptureMove(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffAfterCaptureMove(), osl::eval::ppair::PiecePairWithStand< PiecePairPieceTable >::diffAfterSimpleMove(), osl::eval::ppair::PiecePairEvalTableBase< PiecePairPieceTable >::diffAfterSimpleMove(), osl::effect::NumSimpleEffectTable::doEffect(), osl::effect::ApplyDoUndoCaptureMove< P, SignatureEffect< BaseState > >::doUndoCaptureMove(), osl::effect::ApplyDoUndoSimpleMove< P, SignatureEffect< BaseState > >::doUndoSimpleMove(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::PieceEval::eval(), osl::eval::endgame::AttackDefense::expect(), osl::effect_util::AdditionalEffect::find(), osl::effect_util::UnblockableEffect::find(), osl::eval::See::findAdditionalPieces(), osl::move_generator::addeffect8::findBlocker(), osl::state::NumEffectState::forEachEffectOfPiece(), osl::move_generator::addeffect8::generateLongDropWithOffset(), osl::hash::HashKey::HashKey(), osl::eval::ml::PiecePair::index(), osl::eval::ml::PtypeYY::index(), osl::eval::ml::King25EffectEachBoth::index(), osl::eval::ppair::PiecePairIndex::indexOf(), osl::state::SimpleState::isAlmostValidMove(), osl::move_probability::BreakThreatmate::isDefendingKing8(), osl::effect_util::UnblockableCheck::isMember(), osl::move_classifier::TrapRook< P >::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::PromotionBySacrifice::match(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::PiecePtypeMoreThan::operator()(), osl::effect_util::EffectUtil::FindThreat< EvalT >::operator()(), osl::state::operator==(), osl::eval::ppair::PiecePairWithStand< Table >::PiecePairWithStand(), osl::state::NumEffectState::pinnedCanMoveTo(), osl::record::KanjiPrint::print(), osl::state::NumEffectState::prologueCapture(), osl::state::NumEffectState::prologueDrop(), osl::state::NumEffectState::prologueSimple(), osl::eval::ppair::PiecePairWithStand< Table >::setValues(), osl::record::usi::show(), osl::eval::ppair::PiecePairWithStand< Table >::standBonus(), osl::search::QuiescenceSearch2< EvalT >::staticValue(), osl::eval::See::FindEffectMore::store(), osl::effect_action::StorePtypeOSquare::store(), osl::annotate::ThreatmateIfMorePieces::suitable(), osl::eval::ml::PiecePair::sum12One(), osl::move_probability::PatternCommon::updateCacheOne(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::eval::ml::PiecePair::value(), osl::eval::ml::PiecePair::valueCompiled(), osl::eval::endgame::DefenseKing::valueOf(), osl::eval::endgame::AttackKing::valueOf(), and osl::eval::endgame::AttackDefense::valueOf().

void osl::Piece::setSquare ( Square  square) [inline]

Definition at line 76 of file piece.h.

References piece, and osl::Square::uintValue().

const Square osl::Piece::square ( ) const [inline]

Definition at line 67 of file piece.h.

References makeDirect(), and piece.

Referenced by osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::BlockLong::addPiece(), osl::eval::ml::PiecePairKing::addSub(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::move_probability::MoveInfo::adhocAdjustSlider(), osl::search::QuiescenceGenerator< P >::advanceBishop(), osl::checkmate::OracleAdjust::attack(), osl::search::QuiescenceGenerator< P >::attackGoldWithPawn(), osl::search::QuiescenceGenerator< P >::attackKnightWithPawn(), osl::search::QuiescenceGenerator< P >::attackMajorPiece(), osl::search::QuiescenceGenerator< P >::attackSilverWithPawn(), osl::search::QuiescenceGenerator< P >::attackWithKnight(), osl::search::QuiescenceGenerator< P >::breakThreatmate(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateAttackRooks(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateGoldPenalty(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateRookRankBonus(), osl::eval::ProgressEvalGeneral< OpeningEval >::calculateSilverPenalty(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::search::QuiescenceGenerator< P >::capture(), osl::effect_util::AdditionalOrShadow::count(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::mobility::LanceMobility::countBoth(), osl::mobility::BishopMobility::countBoth(), osl::mobility::RookMobility::countHorizontalBoth(), osl::mobility::RookMobility::countHorizontalSafe(), osl::mobility::LanceMobility::countSafe(), osl::mobility::BishopMobility::countSafe(), osl::mobility::RookMobility::countVerticalBoth(), osl::mobility::RookMobility::countVerticalSafe(), osl::search::QuiescenceSearch2< EvalT >::currentValueWithLastThreat(), osl::move_probability::CoverFork::defending(), osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::FixedDepthSearcher2::defense(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::checkmate::FixedDepthSearcher2::defenseEstimation(), osl::effect_action::SimpleBetterToPromote< Action >::doAction(), osl::effect_action::Promote< Action >::doAction(), osl::move_action::CaptureFrom< P, OrigAction >::doAction(), osl::effect_action::SimpleMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_util::EffectUtil::SafeCapture::doAction(), osl::effect_action::SimpleBetterToPromote< Action >::doActionPtype(), osl::effect_action::SimpleMove< Action >::doActionPtype(), osl::effect_action::Promote< Action >::doActionPtype(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::NumSimpleEffectTable::doEffect(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::state::SimpleState::emulateCapture(), osl::state::SimpleState::emulateHandPiece(), osl::search::QuiescenceGenerator< P >::escapeAll(), osl::search::QuiescenceGenerator< P >::escapeNormalPiece(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), osl::search::QuiescenceSearch2< EvalT >::examineCapture(), osl::effect_util::AdditionalEffect::find(), osl::rating::PatternLong2::find(), osl::rating::PatternBlock::find(), osl::eval::See::findAdditionalPieces(), osl::move_generator::addeffect8::findBlocker(), osl::effect_util::VirtualPin::findDirection(), osl::effect_util::Pin::findDirection(), osl::eval::See::findEffectPiecesAfterMove(), osl::effect_util::Pin::findPtype(), osl::move_action::EscapeFilter< P, OrigAction >::findThreat(), osl::state::SimpleState::flipHorizontal(), osl::state::NumEffectState::forEachEffectOfPiece(), osl::search::BreakThreatmate::generate(), osl::move_generator::Escape< Action >::generate(), osl::search::QuiescenceSearch2< EvalT >::generateAndExamineTakeBack2(), osl::move_generator::detail::generateBishopLongMove(), osl::move_generator::detail::generateBishopLongMoveNotKing(), osl::move_generator::Escape< Action >::generateBlockingKing(), osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0(), osl::checkmate::FixedDepthSearcher2::generateBlockingWhenLiberty0(), osl::search::AlphaBeta3::generateCapture(), osl::search::AlphaBeta3::generateCaptureAll(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::Escape< Action >::generateEscape(), osl::move_generator::promote::AllPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::promote::MayPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::search::MoveGenerator::generateKingEscape(), osl::move_generator::detail::generateKnightDir(), osl::move_generator::addeffect8::generateLongMove(), osl::move_generator::detail::generateMovePiecePtypeMask(), osl::move_generator::Escape< Action >::generateMovesBy(), osl::move_generator::detail::generateMoveToPtypeMaskWithPieceMask(), osl::move_generator::detail::generateOpenOrCapture(), osl::move_generator::piece_on_board::generatePawn(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtypeUnsafe(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::move_generator::addeffect8::generateShortMove(), osl::search::BigramKillerMove::getMove(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece(), osl::state::NumEffectState::hasEffectInDirection(), osl::effect_util::Pin::hasEffectWithOffset(), osl::hash::HashKey::HashKey(), osl::checkmate::detail::hasKnightCheckmate(), osl::eval::ml::MajorY< true, ROOK >::index(), osl::eval::ml::Pin::index(), osl::eval::ml::PiecePair::index(), osl::rating::PinAttack::index(), osl::eval::ml::KingPieceRelative::index(), osl::eval::ml::KingPieceRelativeNoSupport::index(), osl::eval::ml::RookPawnY::index(), osl::eval::ml::PtypeYY::index(), osl::rating::ImmediateAddSupport::index(), osl::eval::ml::KingRookBishop::index(), osl::eval::ml::RookRook::index(), osl::eval::ml::PtypeY::index(), osl::eval::ml::PtypeX::index(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), osl::eval::ml::NonPawnAttacked::indexK(), osl::eval::ppair::PiecePairIndex::indexOf(), osl::progress::ml::NewProgress::indexRelative(), osl::eval::ml::PawnDropBoth::indexX(), osl::eval::ml::King8Effect::indexY(), osl::eval::ml::PawnDropBoth::indexY(), osl::eval::ml::RookPawnY::indexY(), osl::state::SimpleState::initPawnMask(), osl::state::NumEffectState::isConsistent(), osl::state::SimpleState::isConsistent(), osl::move_probability::BreakThreatmate::isDefendingKing8(), osl::effect_util::UnblockableCheck::isMember(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::move_classifier::BlockLongEffect< P, T >::isMember(), isOnBoard(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::checkmate::King8Info::make(), osl::makeCapture(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::rating::PinAttack::match(), osl::rating::RookDefense::match(), osl::move_probability::AttackToOpposingSliders::match(), osl::move_probability::LongRecapture::match(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::LureDefender::match(), osl::move_probability::AttackKing8Long::match(), osl::move_probability::CoverFork::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::EscapeThreatened::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::record::MiniBoardChar50::MiniBoardChar50(), osl::state::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::effect::AddMaskAction< Liberty, P, T >::operator()(), osl::ntesuki::CaptureHelper< P >::operator()(), osl::move_generator::promote::EachOnBoard< Action, P, T, noCapture >::operator()(), osl::move_generator::without_effect::GoldKingAction< P, T, Action >::operator()(), osl::move_generator::without_effect::ShortPieceAction< P, T, Action >::operator()(), osl::move_generator::without_effect::LongPieceAction< P, T, Action, isAttackToKing >::operator()(), osl::operator<<(), osl::record::OPiece::OPiece(), osl::record::OSquare::OSquare(), osl::eval::ml::PinPtypeAll::pawnAttack(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::state::NumEffectState::pinnedCanMoveTo(), osl::state::NumEffectState::pinnedDir(), osl::search::QuiescenceGenerator< P >::promote(), osl::search::AlphaBeta3::quiesce(), osl::search::AlphaBeta3::quiesceRoot(), osl::state::SimpleState::rotate180(), osl::search::QuiescenceSearch2< EvalT >::searchMain(), osl::record::myshogi::show(), osl::record::ki2::show(), show(), osl::container::PieceValues::showValues(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::search::QuiescenceSearch2< EvalT >::staticValueWithThreat(), osl::eval::See::FindEffectMore::store(), osl::effect_action::StorePtypeOSquare::store(), osl::eval::ml::PiecePairKing::sub(), osl::move_action::EscapeFilter< P, OrigAction >::suitable(), osl::annotate::ThreatmateIfMorePieces::suitable(), osl::search::QuiescenceSearch2< EvalT >::takeBackValue(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updatePawnFacing(), osl::move_probability::StateInfo::updatePinnedGenerals(), osl::search::QuiescenceGenerator< P >::utilizePromoted(), osl::eval::ml::PiecePair::value(), osl::eval::ml::PiecePair::valueCompiled(), osl::eval::endgame::DefenseKing::valueOf(), osl::eval::endgame::AttackKing::valueOf(), and osl::eval::endgame::AttackDefense::valueOf().

const Piece osl::Piece::unpromote ( ) const [inline]

Definition at line 118 of file piece.h.

References piece, and Piece().


Member Data Documentation

Definition at line 36 of file piece.h.

Referenced by promoteWithMask().

Definition at line 35 of file piece.h.

Referenced by promoteWithMask().

const int osl::Piece::BitOffsetPtype = 16 [static]

Definition at line 34 of file piece.h.

Referenced by isPlayerBasicPtype(), isPlayerPtype(), isPtype(), osl::Move::newCapture(), ptype(), and ptypeO().

int osl::Piece::piece [private]
const int osl::Piece::SIZE = 40 [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines