Public メソッド | Static Public メソッド | Static Public 変数 | Protected メソッド | Protected 変数 | Private 型 | Private メソッド | フレンド

クラス osl::SimpleState

#include <simpleState.h>

osl::SimpleStateに対する継承グラフ
Inheritance graph
[凡例]
osl::SimpleStateのコラボレーション図
Collaboration graph
[凡例]

すべてのメンバ一覧

Public メソッド

 SimpleState ()
 SimpleState (Handicap h)
virtual ~SimpleState ()
void init ()
 盤面が空の状態に初期化
void init (Handicap h)
 ハンディに応じた初期状態に初期化
void initPawnMask ()
const Piece pieceOf (int num) const
void setPieceOf (int num, Piece p)
template<Player P>
const Piece kingPiece () const
const Piece kingPiece (Player P) const
template<Player P>
Square kingSquare () const
Square kingSquare (Player player) const
template<Ptype PTYPE>
const Piece nth (int n) const
 unpromote(PTYPE)のn番目の駒を帰す.
void setBoard (Square sq, Piece piece)
const PieceMaskstandMask (Player p) const
const PieceMaskusedMask () const
bool isOffBoard (int num) const
void clearPawn (Player pl, Square sq)
 (internal)
void setPawn (Player pl, Square sq)
 (internal)
bool isPawnMaskSet (Player player, int x) const
template<Player P>
bool isPawnMaskSet (int x) const
bool canDropPawnTo (Player player, int x) const
 xの筋に歩を打てる
void setPiece (Player player, Square sq, Ptype ptype)
void setPieceAll (Player player)
const Piece pieceAt (Square sq) const
const Piece operator[] (Square sq) const
const PiecegetPiecePtr (Square sq) const
const Piece pieceOnBoard (Square sq) const
bool isOnBoard (int num) const
int countPiecesOnStand (Player pl, Ptype ptype) const
 持駒の枚数を数える
template<Ptype Type>
int countPiecesOnStand (Player pl) const
 後方互換
bool hasPieceOnStand (Player player, Ptype ptype) const
template<Ptype T>
bool hasPieceOnStand (Player P) const
Piece nextPiece (Square cur, Offset diff) const
 diff方向にあるPiece を求める.
void setTurn (Player player)
Player turn () const
void changeTurn ()
 手番を変更する
bool isConsistent (bool show_error=true) const
template<bool show_error>
bool isAlmostValidMove (Move move) const
 エラー表示をするかどうかをtemplateパラメータにした高速化版
bool isAlmostValidMove (Move move, bool show_error=true) const
 合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
bool isValidMove (Move move, bool show_error=true) const
 合法手かどうかを検査する. isValidMoveByRule, isAlmostValidMove をおこなう. 玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.
bool isEmptyBetween (Square from, Square to, Offset offset, bool pieceExistsAtTo=false) const
bool isEmptyBetween (Square from, Square to, bool noSpaceAtTo=false) const
bool dump () const
 dump: 自分を cerr に表示する。abort 前などにデバッグに使う
const SimpleState emulateCapture (Piece from, Player new_owner) const
 from で表現されたPieceをnew_ownerの持駒にした局面を作る.
const SimpleState emulateHandPiece (Player from, Player to, Ptype ptype) const
 from からto に ptypeの持駒を一枚渡した局面を作る.
const SimpleState rotate180 () const
const SimpleState flipHorizontal () const

Static Public メソッド

template<Ptype PTYPE>
static int nthLimit ()
static bool isValidMoveByRule (Move move, bool show_error)
 盤面以外の部分の反則のチェック

Static Public 変数

static const bool hasPawnMask = true

Protected メソッド

PieceMaskstandMask (Player p)
template<bool show_error>
bool isAlmostValidDrop (Move move) const
template<bool show_error>
bool testValidityOtherThanEffect (Move move) const

Protected 変数

CArray< Piece, Square::SIZE > board
CArray< Piece, Piece::SIZEpieces
 全てのpieceが登録されている
CArray< PieceMask, 2 > stand_mask
CArray< BitXmask, 2 > pawnMask
CArray< CArray< char,
PTYPE_SIZE-PTYPE_BASIC_MIN >, 2 > 
stand_count
Player player_to_move
 手番
PieceMask used_mask

Private 型

typedef SimpleState state_t

Private メソッド

int countPiecesOnStandBit (Player pl, Ptype ptype) const

フレンド

std::ostream & operator<< (std::ostream &os, const SimpleState &state)
bool operator== (const SimpleState &st1, const SimpleState &st2)
 盤上の駒のみを比較する(持ち駒は見ない).

説明

simpleState.h34 行で定義されています。


型定義

osl::NumEffectStateで再定義されています。

simpleState.h39 行で定義されています。


コンストラクタとデストラクタ

osl::SimpleState::SimpleState (  )  [explicit]

simpleState.cc12 行で定義されています。

参照先 init().

osl::SimpleState::SimpleState ( Handicap  h  )  [explicit]

simpleState.cc16 行で定義されています。

参照先 init().

osl::SimpleState::~SimpleState (  )  [virtual]

simpleState.cc112 行で定義されています。


関数

bool osl::SimpleState::canDropPawnTo ( Player  player,
int  x 
) const [inline]

xの筋に歩を打てる

simpleState.h155 行で定義されています。

参照先 isPawnMaskSet().

参照元 osl::move_probability::LanceAttack::match(), と osl::move_probability::PawnAttack::match().

void osl::SimpleState::changeTurn (  )  [inline]
void osl::SimpleState::clearPawn ( Player  pl,
Square  sq 
) [inline]
int osl::SimpleState::countPiecesOnStand ( Player  pl,
Ptype  ptype 
) const [inline]
template<Ptype Type>
int osl::SimpleState::countPiecesOnStand ( Player  pl  )  const [inline]

後方互換

simpleState.h188 行で定義されています。

参照先 countPiecesOnStand().

int osl::SimpleState::countPiecesOnStandBit ( Player  pl,
Ptype  ptype 
) const [inline, private]

simpleState.h199 行で定義されています。

参照先 osl::PtypeTable::getMaskLow(), osl::Ptype_Table, と standMask().

参照元 initPawnMask(), と isConsistent().

bool osl::SimpleState::dump (  )  const

dump: 自分を cerr に表示する。abort 前などにデバッグに使う

simpleState.cc450 行で定義されています。

const osl::SimpleState osl::SimpleState::emulateCapture ( Piece  from,
Player  new_owner 
) const

from で表現されたPieceをnew_ownerの持駒にした局面を作る.

simpleState.cc460 行で定義されています。

参照先 initPawnMask(), osl::Piece::owner(), pieceOf(), osl::Piece::ptype(), setPiece(), setTurn(), osl::Piece::square(), osl::Square::STAND(), turn(), と osl::unpromote().

const osl::SimpleState osl::SimpleState::emulateHandPiece ( Player  from,
Player  to,
Ptype  ptype 
) const

from からto に ptypeの持駒を一枚渡した局面を作る.

simpleState.cc480 行で定義されています。

参照先 osl::alt(), hasPieceOnStand(), initPawnMask(), osl::Piece::isOnBoard(), osl::Piece::owner(), pieceOf(), osl::Piece::ptype(), setPiece(), setTurn(), osl::Piece::square(), osl::Square::STAND(), turn(), と usedMask().

const osl::SimpleState osl::SimpleState::flipHorizontal (  )  const
const Piece* osl::SimpleState::getPiecePtr ( Square  sq  )  const [inline]
template<Ptype T>
bool osl::SimpleState::hasPieceOnStand ( Player  P  )  const [inline]

simpleState.h195 行で定義されています。

参照先 countPiecesOnStand().

bool osl::SimpleState::hasPieceOnStand ( Player  player,
Ptype  ptype 
) const [inline]

simpleState.h191 行で定義されています。

参照先 countPiecesOnStand().

参照元 osl::checkmate::ProofPiecesUtil::addMonopolizedPieces(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::rating::BadLance::basicMatch(), osl::eval::ml::KnightCheck::canCheck(), osl::rating::Threatmate::captureForKnightCheck(), osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::ProofNumberTable::disproofAfterAllCheck(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), emulateHandPiece(), osl::eval::ml::NoPawnOnStand::eval(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::SilverFork::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnDropBoth::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::PieceStandCombinationBoth::eval(), osl::eval::ml::BishopRookFork::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::PawnDropBoth::evalWithUpdate(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::move_probability::StateInfo::findShortThreatmate(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateDropGold(), osl::move_generator::detail::generateDropSilver(), osl::move_generator::detail::generateKnightAll(), osl::checkmate::ImmediateCheckmate::hasCheckmateDrop(), osl::checkmate::detail::hasCheckmateMoveKnight(), isAlmostValidDrop(), osl::rating::Threatmate::isCandidate(), osl::checkmate::ProofNumberTable::libertyAfterAllDrop(), osl::move_probability::CoverPawn::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::OpposingPawn::match(), osl::move_probability::CheckmateIfCapture::match(), osl::eval::ml::OpenMidEndingEval::suggestMove(), と osl::progress::ml::NewProgress::updatePieceStand7().

void osl::SimpleState::init ( Handicap  h  ) 

ハンディに応じた初期状態に初期化

simpleState.cc67 行で定義されています。

参照先 osl::BISHOP, osl::BLACK, osl::GOLD, osl::HIRATE, init(), initPawnMask(), osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, setPiece(), osl::SILVER, と osl::WHITE.

void osl::SimpleState::init (  ) 
void osl::SimpleState::initPawnMask (  ) 
template<bool show_error>
bool osl::SimpleState::isAlmostValidDrop ( Move  move  )  const [protected]
template<bool show_error>
bool osl::SimpleState::isAlmostValidMove ( Move  move  )  const
bool osl::SimpleState::isAlmostValidMove ( Move  move,
bool  show_error = true 
) const

合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.

局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.

osl::NumEffectStateで再定義されています。

simpleState.cc318 行で定義されています。

bool osl::SimpleState::isConsistent ( bool  show_error = true  )  const
bool osl::SimpleState::isEmptyBetween ( Square  from,
Square  to,
bool  noSpaceAtTo = false 
) const [inline]
引数:
from - マスの位置
to - マスの位置 fromとtoがクイーンで利きがある位置関係にあるという前提 で,間が全部空白かをチェック

simpleState.h293 行で定義されています。

参照先 osl::Board_Table, osl::BoardTable::getShortOffset(), isEmptyBetween(), と osl::Square::isOnBoard().

bool osl::SimpleState::isEmptyBetween ( Square  from,
Square  to,
Offset  offset,
bool  pieceExistsAtTo = false 
) const [inline]
引数:
from - マスの位置
to - マスの位置
offset - fromからtoへのshort offset fromとtoがクイーンで利きがある位置関係にあるという前提 で,間が全部空白かをチェック
pieceExistsAtTo - toに必ず駒がある (toが空白でも動く)

simpleState.h267 行で定義されています。

参照先 osl::Board_Table, osl::BoardTable::getShortOffset(), osl::Piece::isEmpty(), osl::Square::isOnBoard(), pieceAt(), と osl::Offset::zero().

参照元 osl::effect_util::Neighboring8Direct::Table::findNearest(), osl::effect_util::Neighboring8Direct::Table::hasEffect(), osl::NumEffectState::hasEffectIf(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), isEmptyBetween(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), と osl::eval::ml::BishopRookFork::testCenter().

bool osl::SimpleState::isOffBoard ( int  num  )  const [inline]

simpleState.h132 行で定義されています。

参照先 osl::BLACK, standMask(), osl::PieceMask::test(), と osl::WHITE.

bool osl::SimpleState::isOnBoard ( int  num  )  const [inline]
bool osl::SimpleState::isPawnMaskSet ( Player  player,
int  x 
) const [inline]
template<Player P>
bool osl::SimpleState::isPawnMaskSet ( int  x  )  const [inline]

simpleState.h152 行で定義されています。

参照先 isPawnMaskSet().

参照元 isPawnMaskSet().

bool osl::SimpleState::isValidMove ( Move  move,
bool  show_error = true 
) const

合法手かどうかを検査する. isValidMoveByRule, isAlmostValidMove をおこなう. 玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.

simpleState.cc435 行で定義されています。

参照先 isAlmostValidMove(), osl::Move::isValid(), isValidMoveByRule(), osl::Move::player(), と turn().

参照元 osl::record::KisenUtils::convertMove(), main(), osl::record::CsaFile::makeInfo(), osl::usi::parse(), osl::kakinoki::KakinokiFile::parseLine(), と osl::csa::CsaFileMinimal::parseLine().

bool osl::SimpleState::isValidMoveByRule ( Move  move,
bool  show_error 
) [static]
template<Player P>
const Piece osl::SimpleState::kingPiece (  )  const [inline]
const Piece osl::SimpleState::kingPiece ( Player  P  )  const [inline]

simpleState.h86 行で定義されています。

参照先 osl::BLACK, と osl::isValid().

template<Player P>
Square osl::SimpleState::kingSquare (  )  const [inline]

simpleState.h94 行で定義されています。

参照元 osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::PiecePairKing::addSub(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::eval::ml::RookMobilityAll::adjust(), osl::checkmate::Dfpn::analyze(), osl::progress::ml::NewProgress::attack5x5Value(), osl::checkmate::ProofNumberTable::attackEstimation(), osl::checkmate::FixedDepthSolverExt::SetProofPieces::attackEstimation(), osl::eval::ml::KnightCheck::canCheck(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::rating::DefenseKing8::count(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::checkmate::ProofNumberTable::countLiberty(), osl::checkmate::King8Info::countMoveCandidate(), osl::progress::Effect5x3::Effect5x3(), osl::progress::Effect5x3WithBonus::Effect5x3WithBonus(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::King8Effect::effectState(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::PtypeCount::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::KnightCheck::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::PawnDropBoth::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::King25EffectY2::eval(), osl::eval::ml::King25EffectY::eval(), osl::eval::ml::King25EffectYDefense::eval(), osl::eval::ml::King25EffectYAttack::eval(), osl::eval::ml::King25Mobility::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::KingXBlockedYBase::eval(), osl::eval::ml::KingXBlockedBase::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::eval::ml::Pin::eval(), osl::eval::ml::PieceStandY::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::GoldAndSilverNearKing::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::BishopExchangeSilverKing::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25BothSide::evalOne(), osl::eval::ml::KingMobilitySum::evalOne(), osl::eval::ml::KingMobility::evalOne(), osl::eval::ml::King3Pieces::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::King25EffectEachBoth::evalOne(), osl::eval::ml::King25EffectEach< Stage >::evalOne(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::PawnDropBoth::evalWithUpdate(), osl::eval::ml::King3Pieces::evalWithUpdate(), osl::eval::ml::King25EmptyAbs< Opening >::evalWithUpdate(), osl::eval::ml::King25EffectEachBoth::evalWithUpdate(), osl::eval::ml::King25EmptySquareNoEffect::evalWithUpdate(), osl::eval::ml::PtypeYY::evalWithUpdate(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::PieceStandY::evalWithUpdate(), osl::eval::ml::PiecePairKing::evalWithUpdateBang(), osl::eval::ml::PtypeCount::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::KingXBlockedYBase::evalWithUpdateBang(), osl::eval::ml::King8EffectBase::evalWithUpdateCommon(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::NumEffectState::findCheckPiece(), osl::rating::AttackKing8Group::findMatch(), osl::move_probability::StateInfo::findShortThreatmate(), osl::move_probability::StateInfo::finishUpdate(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateKing(), osl::move_generator::detail::generateMoveToPtypeMaskWithPieceMask(), osl::move_generator::detail::generateRookLongMove(), osl::checkmate::ImmediateCheckmate::hasCheckmateMove(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::checkmate::Dfpn::hasEscapeMove(), osl::checkmate::King8Info::hasMoveCandidate(), osl::NumEffectState::inCheck(), osl::eval::ml::KingPieceRelative::index(), osl::rating::Karanari::index(), osl::rating::BigramAttack::index(), osl::NumEffectState::inUnblockableCheck(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::rating::Threatmate::isCandidate(), osl::NumEffectState::isConsistent(), osl::move_classifier::KingOpenMove< P >::isMember(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::rating::RatingEnv::make(), osl::checkmate::King8Info::make(), osl::progress::Effect5x3WithBonus::makeEffectMask(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::rating::RelativeKingX::makeOldX(), osl::rating::RelativeKingY::makeOldY(), osl::NumEffectState::makePinOpen(), osl::progress::Effect5x3d::makeProgress(), osl::progress::Effect5x3::makeProgress(), osl::checkmate::King8Info::makeWithPin(), osl::rating::RelativeKingX::makeX(), osl::rating::RelativeKingY::makeY(), osl::rating::AttackKing8::match(), osl::rating::Karanari::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::KingBlockade::match(), osl::move_probability::King5x5Ptype::match(), osl::move_probability::SacrificeAttack::match(), osl::move_probability::DropAfterOpposingPawn::match(), osl::move_probability::OpposingPawn::match(), osl::move_probability::CheckmateIfCapture::match(), osl::move_probability::LureDefender::match(), osl::move_probability::BreakThreatmate::match(), osl::move_probability::LanceAttack::match(), osl::move_probability::KingRelativeX::match(), osl::move_probability::KingRelativeY::match(), osl::rating::DefenseKing8::matchDrop(), osl::rating::Karanari::matchGeneral(), osl::rating::DefenseKing8::matchMove(), osl::checkmate::King8Info::moveCandidateMask(), osl::eval::ml::King8EffectBase::MakeEffectStateDefense::operator()(), osl::eval::ml::King8EffectBase::MakeEffectStateSimple::operator()(), osl::progress::ml::NewProgress::progressOne(), osl::NumEffectState::recalcPinOpen(), osl::move_probability::CheckFeature::sign(), osl::eval::ml::PiecePairKing::sub(), osl::progress::Effect5x3d::update(), osl::progress::Effect5x3WithBonus::update(), osl::progress::Effect5x3::update(), osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(), osl::move_probability::PatternCommon::updateCacheOne(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updateMain(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), osl::progress::ml::NewProgress::updateSub(), osl::eval::ml::OpenMidEndingEval::updateSub(), と osl::NumEffectState::wasCheckEvasion().

Square osl::SimpleState::kingSquare ( Player  player  )  const [inline]

simpleState.h97 行で定義されています。

参照先 osl::BLACK, と osl::isValid().

Piece osl::SimpleState::nextPiece ( Square  cur,
Offset  diff 
) const [inline]

diff方向にあるPiece を求める.

戻り値:
盤外ならPTYPE_EDGE

simpleState.h208 行で定義されています。

参照先 osl::Piece::EMPTY(), pieceAt(), と osl::Offset::zero().

参照元 osl::rating::PatternLong2::find(), osl::effect_util::AdditionalEffect::find(), と osl::eval::See::findAdditionalPieces().

template<Ptype PTYPE>
const Piece osl::SimpleState::nth ( int  n  )  const [inline]

unpromote(PTYPE)のn番目の駒を帰す.

駒番号に依存するので順番は不定.

simpleState.h114 行で定義されています。

参照先 pieceOf().

参照元 osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), と osl::eval::ml::BishopExchangeSilverKing::evalOne().

template<Ptype PTYPE>
static int osl::SimpleState::nthLimit (  )  [inline, static]
const Piece osl::SimpleState::operator[] ( Square  sq  )  const [inline]

simpleState.h168 行で定義されています。

参照先 pieceAt().

const Piece osl::SimpleState::pieceAt ( Square  sq  )  const [inline]
引数:
sq は isOnboardを満たす Square の12近傍(8近傍+桂馬の利き) ! isOnBoard(sq) の場合は PIECE_EDGE を返す

simpleState.h167 行で定義されています。

参照先 board, と osl::Square::index().

参照元 osl::move_probability::BishopAttack::addOne(), osl::move_probability::AddEffectLong::addOne(), osl::move_probability::PatternCommon::addOne(), osl::move_probability::MoveInfo::adhocAdjustSlider(), osl::progress::Effect5x3WithBonus::attackEffect3(), osl::checkmate::detail::blockingDiagonalAttack(), osl::move_generator::detail::blockingU(), osl::checkmate::detail::blockingVerticalAttack(), osl::eval::ml::KnightCheck::canCheck(), osl::move_classifier::PawnDropCheckmate< P >::canEscape(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::eval::ml::PawnAdvanceUtil::cantAdvance(), osl::eval::ml::KnightAdvance::cantAdvance(), osl::rating::Threatmate::captureForKnightCheck(), osl::eval::See::computeValue(), osl::record::KisenUtils::convertMove(), osl::rating::DefenseKing8::count(), osl::mobility::LanceMobility::countAll(), osl::mobility::BishopMobility::countAll(), osl::mobility::BishopMobility::countAllDir(), osl::eval::ml::NumPiecesBetweenBishopAndKing::countBetween(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::mobility::RookMobility::countHorizontalAll(), osl::mobility::countMobilityBoth(), osl::mobility::RookMobility::countVerticalAll(), osl::effect_action::BetterToPromote< Action >::doAction(), osl::effect_action::AlwaysMove< Action >::doAction(), osl::effect_action::BetterToPromote< Action >::doActionPtype(), osl::effect_action::AlwaysMove< Action >::doActionPtype(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::NumSimpleEffectTable::doEffectLong(), osl::effect::NumSimpleEffectTable::doEffectShort(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::King8Effect::effectState(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::SilverFeatures::evalOne(), osl::eval::ml::BishopEffectBase::evalOne(), osl::eval::ml::RookEffectBase::evalOne(), osl::eval::ml::EnterKingDefense::evalOne(), osl::eval::ml::King3Pieces::evalOne(), osl::eval::ml::King25EmptyAbs< Opening >::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::AnagumaEmpty::evalOne(), osl::eval::ml::PiecePair::evalWithUpdate(), osl::eval::ml::PawnPtypeOPtypeO::evalWithUpdate(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), osl::effect_util::SendOffSquare::find(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::rating::PatternGroup::findMatch(), osl::rating::AttackKing8Group::findMatch(), osl::move_probability::StateInfo::finishUpdate(), osl::NumEffectState::forEachEffectOfPieceDir(), osl::NumEffectState::forEachEffectOfPieceLongDir(), osl::move_generator::capture::generate(), osl::move_generator::Capture< Action >::generate1(), osl::move_generator::detail::generateBishopLongMove(), osl::move_generator::detail::generateBishopLongMoveNotKing(), osl::move_generator::Escape< Action >::generateBlocking(), osl::move_generator::Escape< Action >::generateBlockingKing(), osl::checkmate::Dfpn::generateCheck(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateDropBishop(), osl::move_generator::detail::generateDropRook(), osl::move_generator::promote::MayPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::promote::AllPromoteDir< P, T, noCapture, Dir >::generateIfValid(), osl::move_generator::detail::generateKnightDir(), osl::move_generator::piece_on_board::generateLance(), osl::move_generator::detail::generateMovePiecePtypeMask(), osl::move_generator::detail::generateNotKing(), osl::move_generator::detail::generateOpenOrCapture(), osl::move_generator::piece_on_board::generatePawn(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::move_generator::drop::generateX(), osl::NumEffectState::hasEffectByWithRemove(), osl::checkmate::King8Info::hasEffectMask(), osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional(), osl::checkmate::detail::hasKnightCheckmate(), osl::eval::ml::King25EffectEachBoth::index(), osl::eval::ml::King25EffectEach< Stage >::index(), isAlmostValidDrop(), isAlmostValidMove(), osl::NumEffectState::isAlmostValidMove(), osl::eval::ml::KingXBlockedBase::isBlocked(), isConsistent(), isEmptyBetween(), osl::move_classifier::KingOpenMove< P >::isMember(), osl::move_classifier::KingOpenMove< P >::isMemberMain(), osl::record::KisenPlusFile::load(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::NumEffectState::makePinOpenDir(), osl::NumEffectState::makeUnmakeMove(), osl::rating::Pattern::match(), osl::rating::AttackKing8::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::OpposingPawn::match(), osl::move_probability::LanceAttack::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), osl::mobility::MobilityTable::MobilityTable(), nextPiece(), osl::rating::PatternLong::nextPieceOrEnd(), osl::effect_util::SendOffSquare::onlyOneSupport(), osl::eval::ml::King8EffectBase::MakeEffectStateDefense::operator()(), osl::eval::ml::King8EffectBase::MakeEffectStateSimple::operator()(), osl::operator==(), operator[](), osl::eval::ml::PinPtypeAll::pawnAttack(), pieceOnBoard(), osl::eval::ml::PiecePair::pieceValueDouble(), osl::NumEffectState::prologueCapture(), osl::NumEffectState::prologueSimple(), osl::NumEffectState::recalcPinOpen(), osl::ki2::show(), osl::NumEffectState::showEffect(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::move_probability::PawnAttack::squareStatus(), osl::csa::strToMove(), osl::move_probability::ToEffect::supportAttack(), osl::eval::ml::BishopRookFork::testCenter(), testValidityOtherThanEffect(), osl::move_probability::PatternCommon::updateCacheOne(), と osl::move_probability::StateInfo::updatePinnedGenerals().

const Piece osl::SimpleState::pieceOf ( int  num  )  const [inline]

simpleState.h76 行で定義されています。

参照先 pieces.

参照元 osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::PiecePairKing::addSub(), osl::checkmate::OracleAdjust::attack(), osl::move_generator::escape::blockByMoveOne(), osl::checkmate::detail::blockingDiagonalAttack(), osl::move_generator::detail::blockingU(), osl::checkmate::detail::blockingVerticalAttack(), osl::book::CompactBoard::CompactBoard(), osl::effect_util::AdditionalOrShadow::count(), osl::effect::NumSimpleEffectTable::doBlockAt(), osl::effect::EffectedNumTable::EffectedNumTable(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), emulateCapture(), emulateHandPiece(), osl::eval::ml::PieceEval::eval(), osl::eval::ml::PiecePair::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::SilverFork::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::MajorY< true, ROOK >::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::RookPawn< Opening >::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::Pin::eval(), osl::eval::ml::SimplePin::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::CheckShadowPtype::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::move_probability::BlockLong::findAll(), osl::NumEffectState::findAttackAt(), osl::NumEffectState::findAttackAtStrict(), osl::NumEffectState::findAttackNotBy(), osl::NumEffectState::findLongAttackAt(), osl::NumEffectState::findThreatenedPiece(), flipHorizontal(), osl::NumEffectState::forEachEffect(), osl::NumEffectState::forEachOnBoard(), osl::NumEffectState::forEachOnBoardPtypeStrict(), osl::move_generator::capture::generate(), osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::Escape< Action >::generateKingEscape(), osl::move_generator::detail::generateKnightDir(), osl::move_generator::detail::generateMoveToPtypeMaskWithPieceMask(), osl::move_generator::all_moves::generatePtype(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDirPiece(), osl::effect_util::AdditionalEffect::hasEffect(), osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectByWithRemove(), osl::NumEffectState::hasEffectInDirection(), osl::hash::HashKey::HashKey(), osl::rating::PinAttack::index(), osl::rating::ImmediateAddSupport::index(), osl::effect::NumSimpleEffectTable::init(), initPawnMask(), isConsistent(), osl::NumEffectState::isConsistent(), osl::move_probability::BreakThreatmate::isDefendingKing8(), isOnBoard(), kingPiece(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::move_probability::MoveFromOpposingSliders::longPtype(), osl::move_probability::StateInfo::makePinOfLongPieces(), osl::rating::PinAttack::match(), osl::rating::RookDefense::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::CoverFork::match(), osl::book::MiniBoard::MiniBoard(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::mobility::MobilityTable::MobilityTable(), nth(), osl::NumEffectState::NumEffectState(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::NumEffectState::pinAttacker(), osl::NumEffectState::prologueDrop(), osl::progress::PtypeProgress::PtypeProgress(), rotate180(), osl::NumEffectState::selectCheapPiece(), osl::record::myshogi::show(), osl::ki2::show(), osl::checkmate::detail::slowCheckDrop(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::eval::ml::PiecePairKing::sub(), osl::move_probability::BlockLong::updateCache(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::eval::ml::OpenMidEndingEval::updateGoldSilverNearKing(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), osl::progress::ml::NewProgress::updatePawnFacing(), osl::progress::ml::NewProgress::updatePieceKingRelativeBonus(), と osl::move_probability::StateInfo::updatePinnedGenerals().

const Piece osl::SimpleState::pieceOnBoard ( Square  sq  )  const [inline]
const osl::SimpleState osl::SimpleState::rotate180 (  )  const
void osl::SimpleState::setBoard ( Square  sq,
Piece  piece 
) [inline]
void osl::SimpleState::setPawn ( Player  pl,
Square  sq 
) [inline]
void osl::SimpleState::setPiece ( Player  player,
Square  sq,
Ptype  ptype 
)
void osl::SimpleState::setPieceAll ( Player  player  ) 
void osl::SimpleState::setPieceOf ( int  num,
Piece  p 
) [inline]
void osl::SimpleState::setTurn ( Player  player  )  [inline]
PieceMask& osl::SimpleState::standMask ( Player  p  )  [inline, protected]
const PieceMask& osl::SimpleState::standMask ( Player  p  )  const [inline]

simpleState.h128 行で定義されています。

参照先 stand_mask.

template<bool show_error>
bool osl::SimpleState::testValidityOtherThanEffect ( Move  move  )  const [protected]
Player osl::SimpleState::turn (  )  const [inline]

simpleState.h220 行で定義されています。

参照先 player_to_move.

参照元 osl::move_probability::BishopAttack::addOne(), osl::rating::BradleyTerry::addSquare(), osl::move_probability::MoveInfo::adhocAdjustBishopFork(), osl::checkmate::Dfpn::analyze(), osl::checkmate::FixedDepthSearcher::attack(), osl::checkmate::ProofNumberTable::attackEstimation(), osl::checkmate::FixedDepthSearcher::attackMayUnsafe(), osl::move_probability::KingBlockade::blockAll(), osl::rating::DefenseKing8::blocking(), osl::enter_king::EnterKing::canDeclareWin(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::rating::Threatmate::captureForKnightCheck(), osl::move_probability::StateInfo::clearOldCache(), osl::book::CompactBoard::CompactBoard(), osl::record::KisenUtils::convertMove(), osl::rating::DefenseKing8::count(), osl::rating::CountEffect2::count(), osl::move_probability::CoverFork::defending(), osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::NumEffectState::doCaptureMove(), osl::NumEffectState::doDropMove(), osl::NumEffectState::doSimpleMove(), osl::checkmate::CheckmateIfCapture::effectiveAttack(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), emulateCapture(), emulateHandPiece(), osl::rating::PatternBlock::find(), osl::rating::PatternBlockGroup::findMatch(), osl::rating::AttackKing8Group::findMatch(), osl::rating::BlockGroup::findMatch(), osl::rating::ChaseGroup::findMatch(), osl::checkmate::DualDfpn::findProof(), osl::move_probability::StateInfo::findShortThreatmate(), osl::move_probability::StateInfo::finishUpdate(), flipHorizontal(), osl::Move::fromMove16(), osl::move_generator::GenerateEscapeOfTurn::generate(), osl::GenerateEscapeKing::generate(), osl::move_generator::GenerateCapture::generate(), osl::NumEffectState::generateAllUnsafe(), osl::GenerateEscapeKing::generateCheap(), osl::NumEffectState::generateLegal(), osl::rating::FeatureSet::generateRating(), osl::checkmate::Dfpn::hasCheckmateMove(), osl::checkmate::FixedDepthSolverExt::hasCheckmateMoveOfTurn(), osl::checkmate::FixedDepthSearcher::hasCheckmateMoveOfTurn(), osl::checkmate::FixedDepthSolverExt::hasCheckmateWithGuideOfTurn(), osl::checkmate::FixedDepthSolverExt::hasEscapeByMoveOfTurn(), osl::checkmate::FixedDepthSearcher::hasEscapeByMoveOfTurn(), osl::checkmate::Dfpn::hasEscapeMove(), osl::checkmate::FixedDepthSearcher::hasEscapeMoveOfTurn(), osl::hash::HashKey::HashKey(), osl::NumEffectState::inCheck(), osl::rating::PinAttack::index(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::index(), osl::rating::Karanari::index(), osl::rating::ImmediateAddSupport::index(), osl::rating::BigramAttack::index(), isAlmostValidDrop(), isAlmostValidMove(), osl::NumEffectState::isAlmostValidMove(), osl::rating::Threatmate::isCandidate(), osl::move_probability::BreakThreatmate::isDefendingKing8(), osl::checkmate::DualDfpn::isLosingState(), isMated(), isValidMove(), isValidMoveByRule(), osl::rating::Threatmate::knight2Step(), osl::checkmate::ProofPieces::leaf(), osl::checkmate::DisproofPieces::leaf(), osl::checkmate::ProofNumberTable::libertyAfterAllDrop(), osl::checkmate::ProofNumberTable::libertyAfterAllMove(), osl::record::KisenPlusFile::load(), osl::rating::RatingEnv::make(), osl::record::CsaFile::makeInfo(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::NumEffectState::makeMove(), osl::NumEffectState::makeUnmakeMove(), osl::rating::PinAttack::match(), osl::rating::AttackKing8::match(), osl::rating::Karanari::match(), osl::rating::Chase::match(), osl::rating::Block::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::LureDefender::match(), osl::rating::DefenseKing8::matchDrop(), osl::rating::Karanari::matchGeneral(), osl::rating::DefenseKing8::matchMove(), osl::book::MiniBoard::MiniBoard(), osl::book::MiniBoardChar50::MiniBoardChar50(), osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval(), osl::rating::Threatmate::Helper::operator()(), osl::operator<<(), osl::operator==(), osl::kakinoki::KakinokiFile::parseLine(), osl::record::CsaFile::parseLine(), osl::record::KanjiPrint::print(), osl::RepetitionCounter::push(), rotate180(), osl::usi::show(), osl::usi::strToMove(), osl::psn::strToMove(), osl::record::KanjiMove::strToMove(), osl::kakinoki::strToMove(), osl::csa::strToMove(), osl::eval::ml::OpenMidEndingEval::suggestMove(), osl::move_probability::ToEffect::supportAttack(), testValidityOtherThanEffect(), osl::book::MiniBoardChar50::toSimpleState(), osl::checkmate::Dfpn::tryProofMain(), osl::progress::ml::NewProgress::update(), osl::eval::ml::OpenMidEndingEval::update(), osl::progress::Effect5x3::update(), osl::move_probability::PatternCommon::updateCacheOne(), osl::progress::ml::NewProgress::updateMain(), osl::progress::ml::NewProgress::updateSub(), と osl::NumEffectState::wasCheckEvasion().

const PieceMask& osl::SimpleState::usedMask (  )  const [inline]

フレンドと関連する関数

std::ostream& operator<< ( std::ostream &  os,
const SimpleState state 
) [friend]
bool operator== ( const SimpleState st1,
const SimpleState st2 
) [friend]

盤上の駒のみを比較する(持ち駒は見ない).

なお、駒番に非依存な局面比較をしたい場合は、oslrecord::CompactBoardや osl::hash::HashKeyを用いる.


変数

CArray<Piece,Square::SIZE> osl::SimpleState::board [protected]

simpleState.h47 行で定義されています。

参照元 osl::NumEffectState::copyFrom(), getPiecePtr(), pieceAt(), と setBoard().

const bool osl::SimpleState::hasPawnMask = true [static]

simpleState.h41 行で定義されています。

CArray<BitXmask,2> osl::SimpleState::pawnMask [protected]

手番

simpleState.h61 行で定義されています。

参照元 changeTurn(), osl::NumEffectState::copyFrom(), init(), setTurn(), と turn().

CArray<CArray<char,PTYPE_SIZE-PTYPE_BASIC_MIN>,2> osl::SimpleState::stand_count [protected]

simpleState.h56 行で定義されています。

参照元 osl::NumEffectState::copyFrom(), init(), setPiece(), setPieceAll(), と standMask().

simpleState.h62 行で定義されています。

参照元 osl::NumEffectState::copyFrom(), init(), isConsistent(), setPiece(), setPieceAll(), と usedMask().


このクラスの説明は次のファイルから生成されました:
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義