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

クラス osl::NumEffectState

利きを持つ局面

[詳細]

#include <numEffectState.h>

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

すべてのメンバ一覧

Public メソッド

 NumEffectState (const SimpleState &st=SimpleState(HIRATE))
 ~NumEffectState ()
void copyFrom (const NumEffectState &src)
 主要部分を高速にコピーする.
void copyFrom (const SimpleState &src)
bool isConsistent (bool showError=true) const
bool isConsistent (const NumEffectState &prev, Move moved, bool show_error=true) const
 局面更新に関する一貫性をテスト
void showEffect (std::ostream &os) const
const PieceMaskpiecesOnBoard (Player p) const
const PieceMask promotedPieces () const
const PieceMask pin (Player king) const
const PieceMask checkShadow (Player attack) const
 attack の駒で動くと開き王手になる可能性がある集合
PieceMask pinOrOpen (Player king) const
uint64_t Iking8Info (Player king) const
const checkmate::King8Info king8Info (Player king) const
bool inCheck (Player P) const
 Pの玉が王手状態.
bool inCheck () const
 手番の玉が王手状態
bool inUnblockableCheck (Player target) const
 target の王に合駒可能でない王手がかかっているかどうか.
const EffectedNumTable & longEffectNumTable () const
const PieceMask effectedMask (Player pl) const
 pl からの利きが(1つ以上)ある駒一覧
const PieceMask effectedChanged (Player pl) const
 前の指手でeffectedMask(pl)が変化したか.
bool hasChangedEffects () const
const BoardMask changedEffects (Player pl) const
const BoardMask changedEffects () const
const NumBitmapEffect changedPieces () const
template<Ptype PTYPE>
bool longEffectChanged () const
template<Ptype PTYPE>
bool anyEffectChanged () const
const Piece findThreatenedPiece (Player P) const
 取られそうなPの駒で価値が最大のもの
bool isOnBoardNum (int num) const
Square mobilityOf (Direction d, int num) const
Square mobilityOf (Direction d, Piece p) const
Square kingMobilityAbs (Player p, Direction d) const
Square kingMobilityOfPlayer (Player p, Direction d) const
 玉がd方向にどこまで動けるかを返す
template<Player P>
Direction pinnedDir (Piece p) const
 pinされた駒がPのKingから見てどの方向か? Pから見たdirectionを返す
Direction pinnedDir (Piece p) const
template<Player P>
bool pinnedCanMoveTo (Piece p, Square to) const
 pinされた駒pがtoに動けるか? pinに関係がなければtoへ動けるという前提
bool pinnedCanMoveTo (Piece p, Square to) const
template<Player P>
Piece pinAttacker (Piece pinned) const
 Pのpinされた駒から,そのpinの原因となっている長い利きを持つ駒を得る..
Piece pinAttacker (Piece pinned) const
const NumBitmapEffect effectSetAt (Square sq) const
int countEffect (Player player, Square target) const
 利きの数を数える.
int countEffect (Player player, Square target, PieceMask pins) const
 利きの数を数える.
template<Ptype PTYPE>
const mask_t allEffectAt (Player P, Square target) const
const mask_t allEffectAt (Player P, Ptype ptype, Square target) const
template<Ptype PTYPE>
const mask_t longEffectAt (Square target) const
template<Ptype PTYPE>
const mask_t longEffectAt (Square target, Player owner) const
const mask_t longEffectAt (Square target) const
const mask_t longEffectAt (Square target, Player owner) const
template<Player P>
bool hasEffectAt (Square target) const
 対象とするマスにあるプレイヤーの利きがあるかどうか.
bool hasEffectAt (Player player, Square target) const
 対象とするマスにあるプレイヤーの利きがあるかどうか.
template<Ptype PTYPE>
bool hasLongEffectAt (Player P, Square to) const
 あるマスにPTYPEの長い利きがあるかどうか.
template<Ptype PTYPE>
bool hasEffectByPtype (Player attack, Square target) const
 target に ptype の利きがあるか? 成不成を区別しない
template<Ptype PTYPE>
bool hasEffectByPtypeStrict (Player attack, Square target) const
 target に ptype の利きがあるか? 成不成を区別
template<Direction Dir, Player P>
bool hasEffectInDirection (Square to) const
 あるマスにあるDirectionでの長い利きがあるかどうか.
bool hasEffectNotBy (Player player, Piece piece, Square target) const
 対象とするマスにあるプレイヤーの(ただしある駒以外)利きがあるかどうか.
bool hasEffectByNotPinnedAndKing (Player pl, Square target) const
 {pinされている駒, 玉以外}からの利きがある.
bool hasEffectByNotPinned (Player pl, Square target) const
 pinされている駒以外からの利きがある.
bool hasMultipleEffectAt (Player player, Square target) const
 二つ以上の駒から利きがある.
bool hasEffectByPiece (Piece attack, Square target) const
 駒attack が target に利きを持つか (旧hasEffectToと統合)
bool hasEffectIf (PtypeO ptypeo, Square attacker, Square target) const
 attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.
template<Player P>
bool hasEffectByWithRemove (Square target, Square removed) const
bool hasEffectByWithRemove (Player player, Square target, Square removed) const
template<Ptype PTYPE>
const Piece findAttackAt (Player attack, Square target) const
 return a piece s.t.
template<Ptype PTYPE>
const Piece findAttackAtStrict (Player attack, Square target) const
const Piece findLongAttackAt (Player owner, int piece, Direction d) const
 pieceのd方向から長い利きがある場合にその駒を返す。
const Piece findLongAttackAt (Player owner, Piece piece, Direction d) const
const Piece findLongAttackAt (Piece piece, Direction d) const
const Piece findLongAttackAt (Square square, Direction d) const
const Piece selectCheapPiece (PieceMask effect) const
 利きの中から安そうな駒を選ぶ
const Piece findCheapAttack (Player P, Square square) const
const Piece findCheapAttackNotBy (Player P, Square square, const PieceMask &ignore) const
const Piece findAttackNotBy (Player P, Square square, const PieceMask &ignore) const
template<Player P>
bool findCheckPiece (Piece &attack_piece) const
 王手駒を探す
bool hasEffectAt (Player P, Square target, Piece &attackerPiece) const
template<Player P>
bool hasEffectAt (Square target, Piece &attackerPiece) const
bool isSafeMove (Move move) const
bool isCheck (Move move) const
bool isPawnDropCheckmate (Move move) const
bool isDirectCheck (Move move) const
bool isOpenCheck (Move move) const
template<bool show_error>
bool isAlmostValidMove (Move move) const
 合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
bool isAlmostValidMove (Move move, bool show_error=true) const
 合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合は,isValidMove を用いる.
void generateLegal (MoveVector &) const
 全ての合法手を生成する.
void generateWithFullUnpromotions (MoveVector &) const
 打歩詰め絡み以外では有利にはならない手も含め, 全ての合法手を生成す る(MoveignoredUnpromoteも生成する).
void generateAllUnsafe (MoveVector &) const
 自殺を含めてすべての手を生成
void makeMove (Move move)
void makeMovePass ()
template<class Function >
void makeUnmakePass (Function &f)
template<class Function >
void makeUnmakeMove (Move move, Function &f)
template<Player P, class Function >
void makeUnmakeMove (Player2Type< P > player, Move move, Function &f)
bool wasCheckEvasion (Move last_move) const
template<Player P, Ptype T, typename F >
void forEachOnBoard (F &func) const
 T は isBasic でなくても動くが unpromote(T) の結果と同じ.
template<Player P, Ptype T, typename F >
void forEachOnBoardPtypeStrict (F &func) const
 T の成不成を区別.
template<Player P, class Action >
void forEachEffect (Square sq, Action &action) const
 sq への利きを持つ各駒に関して処理を行う.
template<Player P, class Action >
void forEachEffect (Square sq, Action &action, const PieceMask &pin) const
 sq にある駒を取る move を生成して action の member を呼び出す.
template<Player P, class Action >
void forEachEffectNotBy (Square sq, Piece piece, Action &action) const
 sq に移動する move を生成して action の member を呼び出す
template<Player P, Ptype Type, class Action >
void forEachEffectOfPiece (Square pieceSquare, Action &action) const
 pieceSquareにある駒によって利きを受けるすべてのsquare (空白含む)について actionを実行する
template<class Action >
void forEachEffectOfPiece (Piece piece, Action &action) const
template<class Function , bool InterestEmpty>
void forEachEffectOfPtypeO (Square, PtypeO, Function &f) const
 PtypeO が Square にいると仮定した時にの利きを列挙.
template<Player P, class Function , bool InterestEmpty>
void forEachEffectOfPtypeO (Square, Ptype, Function &f) const
template<Player P>
Piece safeCaptureNotByKing (Square target, Piece king) const
 玉の素抜きなしに合法手でtargetに移動可能かを判定
Piece safeCaptureNotByKing (Player P, Square target) const
template<class Action >
void forEachEffect (Player P, Square pos, Action &a) const
 forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン
void findEffect (Player P, Square target, PieceVector &out) const
 target に利きのあるPieceをoutに格納する

Private 型

typedef NumEffectState state_t

Private メソッド

template<Player P, class Action >
void forEachEffect (const PieceMask &pieces, Square sq, Action &action) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Square, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Square pieceSquare, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceDir (Square pieceSquare, Action &action) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Square, Action &, Int2Type< false >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Square pieceSquare, Action &action, Int2Type< true >) const
template<Player P, Ptype Type, class Action , Direction Dir>
void forEachEffectOfPieceLongDir (Square pieceSquare, Action &action) const
void doSimpleMove (Square from, Square to, int promoteMask)
void doDropMove (Square to, Ptype ptype)
void doCaptureMove (Square from, Square to, Piece target, int promoteMask)
template<Player P, class Function >
void doUndoSimpleMove (Player2Type< P > player, Square from, Square to, int promoteMask, Function &func)
template<Player P>
void prologueSimple (Player2Type< P >, Square from, Square to, int promoteMask, Piece &oldPiece, int &num, PtypeO &oldPtypeO, PtypeO &new_ptypeo, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
void epilogueSimple (Square from, Square to, Piece oldPiece, int num, PtypeO oldPtypeO, PtypeO newPtypeO, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)
template<Player P, class Function >
void doUndoDropMove (Player2Type< P > player, Square to, Ptype ptype, Function &func)
template<Player P>
void prologueDrop (Player2Type< P >, Square to, Ptype ptype, Piece &oldPiece, int &num, PtypeO &ptypeO, int &numIndex, mask_t &numMask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
template<Player P>
void epilogueDrop (Player2Type< P >, Square to, Ptype ptype, Piece oldPiece, int num, PtypeO ptypeO, int numIndex, mask_t numMask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)
template<Player P, class Function >
void doUndoCaptureMove (Player2Type< P > player, Square from, Square to, Piece target, int promoteMask, Function &func)
template<Player P>
void prologueCapture (Player2Type< P >, Square from, Square to, Piece target, int promoteMask, Piece &oldPiece, PtypeO &oldPtypeO, PtypeO &capturePtypeO, PtypeO &new_ptypeo, int &num0, int &num1, int &num1Index, mask_t &num1Mask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
template<Player P>
void epilogueCapture (Player2Type< P >, Square from, Square to, Piece target, Piece oldPiece, PtypeO oldPtypeO, PtypeO capturePtypeO, PtypeO newPtypeO, int num0, int num1, int num1Index, mask_t num1Mask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)
template<Direction DIR>
void makePinOpenDir (Square target, PieceMask &pins, PieceMask const &onBoard, Player defense)
void recalcPinOpen (Square changed, Direction &lastDir, Player defense)
PieceMask makePinOpen (Square target, Player defense)
void makePinOpen (Player defense)
template<Player P>
void makeKing8Info ()

Private 変数

effect::NumSimpleEffectTable effects
CArray< PieceMask, 2 > pieces_onboard
PieceMask promoted
 成駒一覧
CArray< PieceMask, 2 > pin_or_open
KingMobility king_mobility
CArray< uint64_t, 2 > king8infos

フレンド

bool operator== (const NumEffectState &st1, const NumEffectState &st2)
 駒番に依存した局面(インスタンス)比較をする.

説明

利きを持つ局面

numEffectState.h30 行で定義されています。


型定義

osl::SimpleStateを再定義しています。

numEffectState.h44 行で定義されています。


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

osl::NumEffectState::NumEffectState ( const SimpleState st = SimpleState(HIRATE)  )  [explicit]
osl::NumEffectState::~NumEffectState (  ) 

numEffectState.cc95 行で定義されています。


関数

template<Ptype PTYPE>
const mask_t osl::NumEffectState::allEffectAt ( Player  P,
Square  target 
) const [inline]
const osl::mask_t osl::NumEffectState::allEffectAt ( Player  P,
Ptype  ptype,
Square  target 
) const
template<Ptype PTYPE>
bool osl::NumEffectState::anyEffectChanged (  )  const [inline]

numEffectState.h159 行で定義されています。

参照先 changedPieces().

const BoardMask osl::NumEffectState::changedEffects (  )  const [inline]

numEffectState.h148 行で定義されています。

参照先 osl::BLACK, と osl::WHITE.

参照元 isConsistent(), prologueCapture(), prologueDrop(), と prologueSimple().

const BoardMask osl::NumEffectState::changedEffects ( Player  pl  )  const [inline]
const NumBitmapEffect osl::NumEffectState::changedPieces (  )  const [inline]
const PieceMask osl::NumEffectState::checkShadow ( Player  attack  )  const [inline]

attack の駒で動くと開き王手になる可能性がある集合

numEffectState.h70 行で定義されています。

参照先 osl::alt(), piecesOnBoard(), と pin_or_open.

参照元 osl::eval::ml::CheckShadowPtype::evalOne().

void osl::NumEffectState::copyFrom ( const SimpleState src  ) 

numEffectState.cc1048 行で定義されています。

参照先 copyFrom(), と NumEffectState().

void osl::NumEffectState::copyFrom ( const NumEffectState src  ) 
int osl::NumEffectState::countEffect ( Player  player,
Square  target 
) const [inline]

利きの数を数える.

targetが盤をはみ出してはいけない

numEffectState.h266 行で定義されています。

参照先 effectSetAt(), と osl::Square::isOnBoard().

参照元 osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::King5x5Ptype::addOne(), osl::move_probability::MoveInfo::adhocAdjustAttackCheckmateDefender(), osl::progress::Effect5x3WithBonus::attackEffect3(), osl::checkmate::attackProofCost(), osl::checkmate::detail::blockingDiagonalAttack(), osl::checkmate::detail::blockingVerticalAttack(), osl::checkmate::CheckmateIfCapture::cannotCapture(), osl::move_probability::Feature::classifyEffect9(), osl::rating::CountEffect2::count(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::checkmate::ProofNumberTable::countLiberty(), osl::move_probability::CoverFork::defending(), osl::checkmate::FixedDepthSearcher::defenseEstimation(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEach< Stage >::effectState(), osl::eval::ml::King8EffectAll::effectState(), osl::eval::ml::King8Effect::effectState(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::Promotion37::evalOne(), osl::effect_util::SendOffSquare::find(), osl::move_probability::BlockLong::findAll(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::eval::See::findEffectPieces(), osl::eval::See::findEffectPiecesAfterMove(), osl::move_generator::Escape< Action >::generateBlocking(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir(), osl::rating::PinAttack::index(), osl::progress::Effect5x3d::makeProgress(), osl::progress::Effect5x3::makeProgressArea(), osl::rating::PinAttack::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::LongRecapture::match(), osl::move_probability::AttackFromOpposingSliders::match(), osl::checkmate::King8Info::moveCandidateDir(), osl::effect_util::SendOffSquare::onlyOneSupport(), osl::eval::ml::King8EffectBase::MakeEffectStateDefense::operator()(), osl::eval::ml::King8EffectBase::MakeEffectStateSimple::operator()(), osl::progress::ml::NewProgress::progressOne(), osl::progress::ml::NewProgress::promotion37One(), と osl::move_probability::StateInfo::updatePinnedGenerals().

int osl::NumEffectState::countEffect ( Player  player,
Square  target,
PieceMask  pins 
) const [inline]

利きの数を数える.

targetが盤をはみ出してはいけない

引数:
pins この駒の利きは数えない

numEffectState.h280 行で定義されています。

参照先 effectSetAt(), と osl::Square::isOnBoard().

void osl::NumEffectState::doCaptureMove ( Square  from,
Square  to,
Piece  target,
int  promoteMask 
) [private]
void osl::NumEffectState::doDropMove ( Square  to,
Ptype  ptype 
) [private]

numEffectState.cc293 行で定義されています。

参照先 osl::BLACK, osl::PAWN, prologueDrop(), osl::SimpleState::setPawn(), と osl::SimpleState::turn().

参照元 makeMove().

void osl::NumEffectState::doSimpleMove ( Square  from,
Square  to,
int  promoteMask 
) [private]
template<osl::Player P, typename Function >
void osl::NumEffectState::doUndoCaptureMove ( Player2Type< P >  player,
Square  from,
Square  to,
Piece  target,
int  promoteMask,
Function &  func 
) [private]
template<osl::Player P, typename Function >
void osl::NumEffectState::doUndoDropMove ( Player2Type< P >  player,
Square  to,
Ptype  ptype,
Function &  func 
) [private]
template<osl::Player P, typename Function >
void osl::NumEffectState::doUndoSimpleMove ( Player2Type< P >  player,
Square  from,
Square  to,
int  promoteMask,
Function &  func 
) [private]
const PieceMask osl::NumEffectState::effectedChanged ( Player  pl  )  const [inline]

前の指手でeffectedMask(pl)が変化したか.

取られた駒は現在の実装ではリストされないようだ.

numEffectState.h137 行で定義されています。

参照先 osl::effect::NumSimpleEffectTable::effected_changed_mask, と effects.

参照元 osl::move_probability::StateInfo::finishUpdate(), isConsistent(), と osl::eval::ml::NonPawnAttackedPtype::updateChanged().

const PieceMask osl::NumEffectState::effectedMask ( Player  pl  )  const [inline]
const NumBitmapEffect osl::NumEffectState::effectSetAt ( Square  sq  )  const [inline]

numEffectState.h258 行で定義されています。

参照先 effects, と osl::effect::NumSimpleEffectTable::effectSetAt().

参照元 allEffectAt(), osl::move_generator::escape::blockByMoveOne(), osl::checkmate::detail::blockingDiagonalAttack(), osl::move_generator::detail::blockingU(), osl::checkmate::detail::blockingVerticalAttack(), countEffect(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEachBoth::effectStateIndex3(), osl::move_generator::Capture< Action >::escapeByCapture(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::move_probability::ToEffect::find(), findAttackNotBy(), findCheapAttack(), findCheapAttackNotBy(), forEachEffect(), forEachEffectNotBy(), osl::move_generator::Capture< Action >::generate(), osl::move_generator::detail::generateBishopLongMove(), osl::move_generator::detail::generateBishopLongMoveNotKing(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateMoveToPtypeMask(), osl::move_generator::detail::generateRookLongMove(), osl::move_generator::detail::generateRookLongMoveNotKing(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir(), osl::effect_util::AdditionalEffect::hasEffect(), hasEffectAt(), hasEffectByNotPinned(), hasEffectByNotPinnedAndKing(), hasEffectByPiece(), hasEffectInDirection(), hasEffectNotBy(), osl::checkmate::detail::hasKnightCheckmate(), hasMultipleEffectAt(), isConsistent(), longEffectAt(), osl::progress::Effect5x3WithBonus::makeEffectMask(), osl::move_probability::ToEffectLong::match(), prologueCapture(), showEffect(), osl::checkmate::detail::slowCheckDrop(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState(), と osl::eval::ml::NonPawnAttackedPtype::updateChanged().

template<osl::Player P>
void osl::NumEffectState::epilogueCapture ( Player2Type< P >  ,
Square  from,
Square  to,
Piece  target,
Piece  oldPiece,
PtypeO  oldPtypeO,
PtypeO  capturePtypeO,
PtypeO  newPtypeO,
int  num0,
int  num1,
int  num1Index,
mask_t  num1Mask,
const CArray< PieceMask, 2 > &  pin_or_open_backup,
const KingMobility &  king_mobility_backup,
const PieceMask promoted_backup,
const CArray< PieceMask, 2 > &  effected_mask_backup,
const CArray< PieceMask, 2 > &  effected_changed_mask_backup,
const CArray< uint64_t, 2 > &  king8infos_backup,
const MobilityTable &  mobility_backup 
) [private]
template<osl::Player P>
void osl::NumEffectState::epilogueDrop ( Player2Type< P >  ,
Square  to,
Ptype  ptype,
Piece  oldPiece,
int  num,
PtypeO  ptypeO,
int  numIndex,
mask_t  numMask,
const CArray< PieceMask, 2 > &  pin_or_open_backup,
const KingMobility &  king_mobility_backup,
const CArray< PieceMask, 2 > &  effected_mask_backup,
const CArray< PieceMask, 2 > &  effected_changed_mask_backup,
const CArray< uint64_t, 2 > &  king8infos_backup,
const MobilityTable &  mobility_backup 
) [private]
void osl::NumEffectState::epilogueSimple ( Square  from,
Square  to,
Piece  oldPiece,
int  num,
PtypeO  oldPtypeO,
PtypeO  newPtypeO,
const CArray< PieceMask, 2 > &  pin_or_open_backup,
const KingMobility &  king_mobility_backup,
const PieceMask promoted_backup,
const CArray< PieceMask, 2 > &  effected_mask_backup,
const CArray< PieceMask, 2 > &  effected_changed_mask_backup,
const CArray< uint64_t, 2 > &  king8infos_backup,
const MobilityTable &  mobility_backup 
) [private]
template<Ptype PTYPE>
const Piece osl::NumEffectState::findAttackAt ( Player  attack,
Square  target 
) const [inline]

return a piece s.t.

owner == attack, ptype == PTYPE, has effect on target. return Piece::EMPTY() otherwise

numEffectState.h503 行で定義されています。

参照先 osl::Piece::EMPTY(), と osl::SimpleState::pieceOf().

参照元 osl::checkmate::OracleAdjust::attack(), osl::rating::DefenseKing8::blocking(), osl::rating::Block::count(), と osl::rating::PatternBlock::find().

template<Ptype PTYPE>
const Piece osl::NumEffectState::findAttackAtStrict ( Player  attack,
Square  target 
) const [inline]
const Piece osl::NumEffectState::findAttackNotBy ( Player  P,
Square  square,
const PieceMask ignore 
) const [inline]
const Piece osl::NumEffectState::findCheapAttack ( Player  P,
Square  square 
) const [inline]
const Piece osl::NumEffectState::findCheapAttackNotBy ( Player  P,
Square  square,
const PieceMask ignore 
) const [inline]
引数:
P - 利きをつけている側のプレイヤ
square - 調査する場所
戻り値:
利きを付けている中で安そうな駒 (複数の場合でもEMPTYにはしない)

numEffectState.h569 行で定義されています。

参照先 effectSetAt(), osl::SimpleState::pieces, piecesOnBoard(), と selectCheapPiece().

参照元 osl::move_generator::Capture< Action >::generate1().

template<Player P>
bool osl::NumEffectState::findCheckPiece ( Piece attack_piece  )  const [inline]

王手駒を探す

戻り値:
王手かどうか
引数:
attack_piece 一つの駒による王手の場合はattck_pieceにその駒を入れる 複数の駒による王手の場合はPieceEMPTY()を入れる
P(template) 

numEffectState.h593 行で定義されています。

参照先 osl::SimpleState::kingSquare().

void osl::NumEffectState::findEffect ( Player  P,
Square  target,
PieceVector out 
) const

target に利きのあるPieceをoutに格納する

numEffectState.cc1119 行で定義されています。

参照先 forEachEffect().

参照元 osl::effect_util::ShadowEffect::count(), osl::effect_util::AdditionalEffect::count(), と osl::effect_util::AdditionalEffect::find().

const Piece osl::NumEffectState::findLongAttackAt ( Square  square,
Direction  d 
) const [inline]

numEffectState.h547 行で定義されています。

参照先 findLongAttackAt(), と osl::SimpleState::pieceOnBoard().

const Piece osl::NumEffectState::findLongAttackAt ( Piece  piece,
Direction  d 
) const [inline]

numEffectState.h542 行で定義されています。

参照先 findLongAttackAt(), osl::Piece::isPiece(), と osl::Piece::owner().

const Piece osl::NumEffectState::findLongAttackAt ( Player  owner,
int  piece,
Direction  d 
) const [inline]

pieceのd方向から長い利きがある場合にその駒を返す。

引数:
d piece からみた向き

numEffectState.h526 行で定義されています。

参照先 osl::BLACK, osl::effect::NumSimpleEffectTable::effectedNumTable, effects, osl::Piece::EMPTY(), osl::EMPTY_NUM, osl::inverse(), と osl::SimpleState::pieceOf().

参照元 findLongAttackAt(), osl::move_generator::detail::generateDirNotKing(), と osl::move_probability::StateInfo::makePinOfLongPieces().

const Piece osl::NumEffectState::findLongAttackAt ( Player  owner,
Piece  piece,
Direction  d 
) const [inline]
const osl::Piece osl::NumEffectState::findThreatenedPiece ( Player  P  )  const
template<Player P, class Action >
void osl::NumEffectState::forEachEffect ( const PieceMask pieces,
Square  sq,
Action &  action 
) const [inline, private]
template<Player P, class Action >
void osl::NumEffectState::forEachEffect ( Square  sq,
Action &  action 
) const [inline]

sq への利きを持つ各駒に関して処理を行う.

引数:
action たとえば AlwaysMoveAction

numEffectState.h784 行で定義されています。

参照先 effectSetAt(), と piecesOnBoard().

template<Player P, class Action >
void osl::NumEffectState::forEachEffect ( Square  sq,
Action &  action,
const PieceMask pin 
) const [inline]

sq にある駒を取る move を生成して action の member を呼び出す.

引数:
pin 無視する駒
action たとえば AlwaysMoveAction

numEffectState.h795 行で定義されています。

参照先 effectSetAt(), と piecesOnBoard().

template<class Action >
void osl::NumEffectState::forEachEffect ( Player  P,
Square  pos,
Action &  a 
) const [inline]

forEachEffect の Player のtemplate 引数を通常の引数にしたバージョン

引数:
P 探す対象の駒の所有者
pos に利きのある駒を探す

numEffectState.h888 行で定義されています。

参照先 osl::BLACK.

template<Player P, class Action >
void osl::NumEffectState::forEachEffectNotBy ( Square  sq,
Piece  piece,
Action &  action 
) const [inline]

sq に移動する move を生成して action の member を呼び出す

引数:
action たとえば AlwayMoveAction
piece これ以外の駒を使う

numEffectState.h808 行で定義されています。

参照先 effectSetAt(), osl::Piece::number(), osl::SimpleState::pieces, piecesOnBoard(), と osl::PieceMask::reset().

template<osl::Player P, osl::Ptype Type, class Action >
void osl::NumEffectState::forEachEffectOfPiece ( Square  pieceSquare,
Action &  action 
) const

pieceSquareにある駒によって利きを受けるすべてのsquare (空白含む)について actionを実行する

SimpleState より移植: ImmediateAddSupportがなければ消せる

numEffectState.h1225 行で定義されています。

参照元 osl::rating::ImmediateAddSupport::index(), と osl::rating::ImmediateAddSupport::match().

template<class Action >
void osl::NumEffectState::forEachEffectOfPiece ( Piece  piece,
Action &  action 
) const
template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceDir ( Square  ,
Action &  ,
Int2Type< false >   
) const [inline, private]

numEffectState.h816 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceDir ( Square  pieceSquare,
Action &  action 
) const [inline, private]

numEffectState.h824 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceDir ( Square  pieceSquare,
Action &  action,
Int2Type< true >   
) const [inline, private]

numEffectState.h818 行で定義されています。

参照先 osl::SimpleState::pieceAt().

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceLongDir ( Square  pieceSquare,
Action &  action,
Int2Type< true >   
) const [inline, private]

numEffectState.h830 行で定義されています。

参照先 osl::Offset::intValue(), osl::Piece::isEmpty(), と osl::SimpleState::pieceAt().

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceLongDir ( Square  ,
Action &  ,
Int2Type< false >   
) const [inline, private]

numEffectState.h828 行で定義されています。

template<Player P, Ptype Type, class Action , Direction Dir>
void osl::NumEffectState::forEachEffectOfPieceLongDir ( Square  pieceSquare,
Action &  action 
) const [inline, private]

numEffectState.h841 行で定義されています。

template<osl::Player P, class Function , bool InterestEmpty>
void osl::NumEffectState::forEachEffectOfPtypeO ( Square  from,
Ptype  ptype,
Function &  f 
) const

numEffectState.tcc98 行で定義されています。

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

template<class Function , bool InterestEmpty>
void osl::NumEffectState::forEachEffectOfPtypeO ( Square  from,
PtypeO  ptypeo,
Function &  f 
) const

PtypeO が Square にいると仮定した時にの利きを列挙.

盤面が実際と違うと長い利きが不正確になる

引数:
InterestEmpty 空白のマスに興味があるか

numEffectState.tcc123 行で定義されています。

参照先 osl::BLACK, osl::getOwner(), と osl::getPtype().

template<Player P, Ptype T, typename F >
void osl::NumEffectState::forEachOnBoard ( F &  func  )  const [inline]

T は isBasic でなくても動くが unpromote(T) の結果と同じ.

numEffectState.h727 行で定義されています。

参照先 osl::SimpleState::pieceOf(), と piecesOnBoard().

template<Player P, Ptype T, typename F >
void osl::NumEffectState::forEachOnBoardPtypeStrict ( F &  func  )  const [inline]

T の成不成を区別.

numEffectState.h739 行で定義されています。

参照先 osl::PieceMask::getMask(), osl::isPromoted(), osl::SimpleState::pieceOf(), piecesOnBoard(), と promoted.

void osl::NumEffectState::generateAllUnsafe ( MoveVector out  )  const

自殺を含めてすべての手を生成

numEffectState.cc1081 行で定義されています。

参照先 osl::move_generator::capture::generate(), と osl::SimpleState::turn().

void osl::NumEffectState::generateLegal ( MoveVector moves  )  const

全ての合法手を生成する.

玉の素抜きや打歩詰の確認をする. ただし, 打歩詰め絡み以外では有利にはならない手 (MoveignoredUnpromote)は生成しない.

numEffectState.cc1086 行で定義されています。

参照先 osl::FixedCapacityVector< T, Capacity >::begin(), osl::FixedCapacityVector< T, Capacity >::end(), osl::move_generator::capture::generate(), inCheck(), isPawnDropCheckmate(), isSafeMove(), と osl::SimpleState::turn().

参照元 osl::rating::BradleyTerry::addSquare(), osl::move_probability::FeatureSet::generateRating(), generateWithFullUnpromotions(), と main().

void osl::NumEffectState::generateWithFullUnpromotions ( MoveVector moves  )  const

打歩詰め絡み以外では有利にはならない手も含め, 全ての合法手を生成す る(MoveignoredUnpromoteも生成する).

玉の素抜きや打歩詰の確認 をする.

numEffectState.cc1105 行で定義されています。

参照先 generateLegal(), osl::Move::hasIgnoredUnpromote(), inCheck(), osl::FixedCapacityVector< T, Capacity >::push_back(), osl::FixedCapacityVector< T, Capacity >::size(), と osl::Move::unpromote().

参照元 osl::record::KanjiMove::strToMove().

bool osl::NumEffectState::hasChangedEffects (  )  const [inline]

numEffectState.h141 行で定義されています。

参照先 osl::BLACK, osl::effect::NumSimpleEffectTable::changedEffects(), と effects.

参照元 changedEffects().

bool osl::NumEffectState::hasEffectAt ( Player  P,
Square  target,
Piece attackerPiece 
) const [inline]

numEffectState.h597 行で定義されています。

参照先 osl::BLACK.

template<Player P>
bool osl::NumEffectState::hasEffectAt ( Square  target,
Piece attackerPiece 
) const [inline]
引数:
P(template) - 利きをつけている側のプレイヤ
target - 利きをつけられた場所
attackerPiece - multiple attackの場合はPieceEMPTY() そうでないなら利きをつけている駒を返す

mask|=0x8000000000000000ll; if((mask&(mask-1))!=0x8000000000000000ll) なら1つのif文で済む

numEffectState.h611 行で定義されています。

参照先 effectSetAt(), osl::Piece::EMPTY(), osl::PieceMask::getMask(), osl::SimpleState::pieceOf(), と piecesOnBoard().

template<Player P>
bool osl::NumEffectState::hasEffectAt ( Square  target  )  const [inline]

対象とするマスにあるプレイヤーの利きがあるかどうか.

引数:
player 攻撃側
target 対象のマス

numEffectState.h324 行で定義されています。

参照先 effectSetAt(), と osl::Square::isOnBoard().

参照元 osl::eval::ml::KnightFork::accumulate(), osl::eval::ml::AttackMajorsInBase::addOne(), osl::move_probability::King5x5Ptype::addOne(), osl::checkmate::FixedDepthSearcher::attack(), osl::checkmate::FixedDepthSearcher::attackMayUnsafe(), osl::eval::ml::KnightCheck::canCheck(), osl::eval::ml::GoldFeatures::canMoveToSide(), osl::eval::ml::GoldFeatures::canRetreat(), osl::eval::ml::SilverFeatures::canRetreat(), osl::rating::DefenseKing8::count(), osl::mobility::countMobilityBoth(), osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::eval::ml::King25EffectEach< Stage >::effectState(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::GoldFeatures::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::MajorGoldSilverAttacked< Opening >::evalOne(), osl::eval::ml::PinPtypeAll::evalOne(), osl::move_probability::StateInfo::findCheckmateDefender(), osl::eval::ml::BishopRookFork::findDropInLine(), osl::rating::BadLanceGroup::findMatch(), osl::rating::ChaseGroup::findMatch(), osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0(), osl::checkmate::Dfpn::generateEscape(), osl::move_generator::detail::generateMoveToPtypeMaskWithPieceMask(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece(), osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype(), osl::rating::FeatureSet::generateRating(), hasEffectByWithRemove(), osl::checkmate::King8Info::hasEffectMask(), osl::checkmate::Dfpn::hasEscapeMove(), inCheck(), osl::eval::ml::NonPawnAttackedPtypePair::index1(), inUnblockableCheck(), osl::eval::ml::KingXBlockedBase::isBlocked(), osl::move_classifier::PawnDropCheckmate< P >::isMember(), osl::move_probability::MoveFromOpposingSliders::longPtype(), osl::move_probability::BlockLong::makeLongAttackOne(), osl::rating::BadLance::match(), osl::rating::Chase::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::PromotionBySacrifice::match(), osl::rating::ToSupported::match(), osl::rating::CheckmateIfCapture::match(), osl::eval::ml::SilverFork::matchGold(), osl::eval::ml::SilverFork::matchRook(), NumEffectState(), osl::effect_util::SendOffSquare::onlyOneSupport(), prologueCapture(), prologueDrop(), prologueSimple(), osl::eval::ml::BishopRookFork::testCenter(), と wasCheckEvasion().

bool osl::NumEffectState::hasEffectAt ( Player  player,
Square  target 
) const [inline]

対象とするマスにあるプレイヤーの利きがあるかどうか.

引数:
player 攻撃側
target 対象のマス

numEffectState.h335 行で定義されています。

参照先 effectSetAt(), と osl::Square::isOnBoard().

bool osl::NumEffectState::hasEffectByNotPinned ( Player  pl,
Square  target 
) const [inline]

pinされている駒以外からの利きがある.

numEffectState.h428 行で定義されています。

参照先 effectSetAt(), osl::Square::isOnBoard(), piecesOnBoard(), と pinOrOpen().

参照元 osl::checkmate::detail::hasKnightCheckmate().

bool osl::NumEffectState::hasEffectByNotPinnedAndKing ( Player  pl,
Square  target 
) const [inline]

{pinされている駒, 玉以外}からの利きがある.

numEffectState.h419 行で定義されています。

参照先 effectSetAt(), osl::Square::isOnBoard(), osl::KING, piecesOnBoard(), と pinOrOpen().

bool osl::NumEffectState::hasEffectByPiece ( Piece  attack,
Square  target 
) const [inline]
template<Ptype PTYPE>
bool osl::NumEffectState::hasEffectByPtype ( Player  attack,
Square  target 
) const [inline]
template<Ptype PTYPE>
bool osl::NumEffectState::hasEffectByPtypeStrict ( Player  attack,
Square  target 
) const [inline]
template<osl::Player P>
bool osl::NumEffectState::hasEffectByWithRemove ( Square  target,
Square  removed 
) const
bool osl::NumEffectState::hasEffectByWithRemove ( Player  player,
Square  target,
Square  removed 
) const [inline]

numEffectState.h490 行で定義されています。

参照先 osl::BLACK.

bool osl::NumEffectState::hasEffectIf ( PtypeO  ptypeo,
Square  attacker,
Square  target 
) const [inline]

attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる.

targetSquareは空白でも良い 盤上の駒を動かす事を検討しているときはに, 自分自身の陰に入って利かないと見なされることがある

numEffectState.h465 行で定義されています。

参照先 osl::Board_Table, osl::PtypeTable::getEffect(), osl::BoardTable::getShortOffset(), osl::EffectContent::hasEffect(), osl::EffectContent::hasUnblockableEffect(), osl::SimpleState::isEmptyBetween(), osl::EffectContent::offset(), と osl::Ptype_Table.

参照元 osl::eval::ml::MajorCheckWithCapture::addOne(), osl::move_probability::MoveInfo::adhocAdjustBreakThreatmate(), osl::move_probability::MoveInfo::adhocAdjustKeepCheckmateDefender(), osl::move_probability::KingBlockade::blockAll(), osl::move_probability::CoverFork::defending(), osl::move_action::NoAddEffectFilter< OrigAction >::dropMove(), osl::rating::ChaseGroup::findMatch(), osl::rating::ImmediateEscapeGroup::findMatchWithoutProgress(), osl::effect_util::Neighboring8Direct::hasEffectFromTo(), osl::rating::PinAttack::index(), osl::rating::ImmediateAddSupport::index(), osl::rating::Threatmate::isCandidate(), osl::move_probability::BreakThreatmate::isDefendingThreatmate(), osl::move_classifier::DirectCheck< P >::isMember(), osl::rating::PinAttack::match(), osl::rating::Chase::match(), osl::move_probability::EscapeThreatened::match(), osl::move_probability::PromotionBySacrifice::match(), osl::move_probability::KingBlockade::match(), osl::move_probability::CoverPawn::match(), osl::move_probability::AttackKing8Long::match(), osl::move_probability::LureDefender::match(), osl::move_probability::AttackToOpposingSliders::match(), osl::rating::ImmediateEscape::match(), osl::move_action::NoAddEffectFilter< OrigAction >::simpleMove(), osl::move_action::NoAddEffectFilter< OrigAction >::unknownMove(), osl::move_probability::StateInfo::updatePinnedGenerals(), と wasCheckEvasion().

template<Direction Dir, Player P>
bool osl::NumEffectState::hasEffectInDirection ( Square  to  )  const [inline]

あるマスにあるDirectionでの長い利きがあるかどうか.

64bit版対応済み

numEffectState.h377 行で定義されています。

参照先 osl::BLACK, osl::Board_Table, effectSetAt(), osl::BoardTable::getLongDirection(), osl::PieceMask::getMask(), osl::SimpleState::pieceOf(), pieces_onboard, piecesOnBoard(), osl::Piece::square(), と osl::static_assert().

bool osl::NumEffectState::hasEffectNotBy ( Player  player,
Piece  piece,
Square  target 
) const [inline]
template<Ptype PTYPE>
bool osl::NumEffectState::hasLongEffectAt ( Player  P,
Square  to 
) const [inline]

あるマスにPTYPEの長い利きがあるかどうか.

numEffectState.h346 行で定義されています。

参照先 osl::BISHOP, osl::LANCE, osl::ROOK, と osl::static_assert().

参照元 osl::eval::ml::MajorCheckWithCapture::addOne(), と osl::move_generator::detail::generateDir().

bool osl::NumEffectState::hasMultipleEffectAt ( Player  player,
Square  target 
) const [inline]

二つ以上の駒から利きがある.

そもそも利きがない場合も呼ばれる

引数:
player 攻撃側
target 対象のマス

numEffectState.h439 行で定義されています。

参照先 effectSetAt().

参照元 osl::move_generator::detail::blockingU(), と osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0().

uint64_t osl::NumEffectState::Iking8Info ( Player  king  )  const [inline]
bool osl::NumEffectState::inCheck ( Player  P  )  const [inline]
bool osl::NumEffectState::inCheck (  )  const [inline]

手番の玉が王手状態

numEffectState.h98 行で定義されています。

参照先 inCheck(), と osl::SimpleState::turn().

参照元 findThreatenedPiece(), generateLegal(), generateWithFullUnpromotions(), と inCheck().

bool osl::NumEffectState::inUnblockableCheck ( Player  target  )  const [inline]

target の王に合駒可能でない王手がかかっているかどうか.

  • 両王手 => 真
  • unblockable な利きだけ => 真
  • blockable な利きだけ => 偽
  • 王手でない => 偽 2014/03

numEffectState.h107 行で定義されています。

参照先 osl::alt(), osl::Piece::EMPTY(), osl::PtypeTable::getEffect(), hasEffectAt(), osl::EffectContent::hasUnblockableEffect(), osl::SimpleState::kingSquare(), osl::Ptype_Table, osl::Piece::ptypeO(), と osl::Piece::square().

参照元 osl::checkmate::FixedDepthSearcher::defense(), osl::checkmate::ProofPieces::leaf(), と osl::checkmate::Dfpn::Node::setCheckmateDefense().

template<bool show_error>
bool osl::NumEffectState::isAlmostValidMove ( Move  move  )  const

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

Pをtemplate引数にできると少しは速くなりそう 局面に依存する検査でも,玉の素抜きや王手を防いでいるか, 千日手,打歩詰かどうかは検査しない.

引数:
showError(template) - falseを返す時には何か表示する.
move - 手

osl::SimpleStateを再定義しています。

numEffectState.cc823 行で定義されています。

参照先 osl::Move::from(), hasEffectByPiece(), osl::Move::isNormal(), osl::Square::isPieceStand(), osl::Move::isValid(), osl::SimpleState::isValidMoveByRule(), osl::SimpleState::pieceAt(), osl::Move::player(), osl::Move::to(), と osl::SimpleState::turn().

参照元 osl::checkmate::Dfpn::analyze(), osl::checkmate::OracleAdjust::attack(), osl::checkmate::FixedDepthSearcher::attack(), makeMove(), makeUnmakeMove(), と osl::eval::See::seeInternal().

bool osl::NumEffectState::isAlmostValidMove ( Move  move,
bool  show_error = true 
) const

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

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

osl::SimpleStateを再定義しています。

numEffectState.cc847 行で定義されています。

bool osl::NumEffectState::isCheck ( Move  move  )  const

numEffectState.cc1058 行で定義されています。

参照元 osl::RepetitionCounter::push().

bool osl::NumEffectState::isConsistent ( bool  showError = true  )  const
bool osl::NumEffectState::isConsistent ( const NumEffectState prev,
Move  moved,
bool  show_error = true 
) const
bool osl::NumEffectState::isDirectCheck ( Move  move  )  const

numEffectState.cc1068 行で定義されています。

参照元 osl::rating::CheckGroup::findMatch(), と osl::rating::Check::match().

bool osl::NumEffectState::isOnBoardNum ( int  num  )  const [inline]

numEffectState.h170 行で定義されています。

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

bool osl::NumEffectState::isOpenCheck ( Move  move  )  const

numEffectState.cc1074 行で定義されています。

参照元 osl::rating::CheckGroup::findMatch(), と osl::rating::Check::match().

bool osl::NumEffectState::isPawnDropCheckmate ( Move  move  )  const

numEffectState.cc1063 行で定義されています。

参照元 generateLegal().

bool osl::NumEffectState::isSafeMove ( Move  move  )  const

numEffectState.cc1053 行で定義されています。

参照元 generateLegal().

const osl::checkmate::King8Info osl::NumEffectState::king8Info ( Player  king  )  const
Square osl::NumEffectState::kingMobilityAbs ( Player  p,
Direction  d 
) const [inline]
Square osl::NumEffectState::kingMobilityOfPlayer ( Player  p,
Direction  d 
) const [inline]

玉がd方向にどこまで動けるかを返す

引数:
p 注目する玉のプレイヤ
d piece からみた向き

numEffectState.h192 行で定義されています。

参照先 osl::BLACK, osl::inverse(), と kingMobilityAbs().

参照元 osl::move_generator::detail::generateDir(), osl::move_generator::detail::generateOpenOrCapture(), と osl::effect_util::Neighboring8Direct::Table::hasEffectOrAdditional().

template<Ptype PTYPE>
const mask_t osl::NumEffectState::longEffectAt ( Square  target  )  const [inline]
template<Ptype PTYPE>
const mask_t osl::NumEffectState::longEffectAt ( Square  target,
Player  owner 
) const [inline]

numEffectState.h302 行で定義されています。

参照先 osl::PieceMask::getMask(), と piecesOnBoard().

const mask_t osl::NumEffectState::longEffectAt ( Square  target  )  const [inline]

numEffectState.h306 行で定義されています。

参照先 effectSetAt().

const mask_t osl::NumEffectState::longEffectAt ( Square  target,
Player  owner 
) const [inline]

numEffectState.h310 行で定義されています。

参照先 osl::PieceMask::getMask(), longEffectAt(), と piecesOnBoard().

template<Ptype PTYPE>
bool osl::NumEffectState::longEffectChanged (  )  const [inline]

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

参照先 changedPieces().

const EffectedNumTable& osl::NumEffectState::longEffectNumTable (  )  const [inline]
template<osl::Player P>
template void osl::NumEffectState::makeKing8Info< WHITE > (  )  [private]

numEffectState.cc50 行で定義されています。

参照先 osl::alt(), と king8infos.

void osl::NumEffectState::makeMove ( Move  move  ) 
void osl::NumEffectState::makeMovePass (  )  [inline]
osl::PieceMask osl::NumEffectState::makePinOpen ( osl::Square  target,
osl::Player  defense 
) [private]
void osl::NumEffectState::makePinOpen ( osl::Player  defense  )  [private]

numEffectState.cc901 行で定義されています。

参照先 osl::SimpleState::kingSquare(), makePinOpen(), と pin_or_open.

template<Direction DIR>
void osl::NumEffectState::makePinOpenDir ( Square  target,
PieceMask pins,
PieceMask const &  onBoard,
Player  defense 
) [inline, private]
template<Player P, class Function >
void osl::NumEffectState::makeUnmakeMove ( Player2Type< P >  player,
Move  move,
Function &  f 
) [inline]
template<class Function >
void osl::NumEffectState::makeUnmakeMove ( Move  move,
Function &  f 
) [inline]
template<class Function >
void osl::NumEffectState::makeUnmakePass ( Function &  f  )  [inline]

numEffectState.h676 行で定義されています。

参照先 osl::SimpleState::changeTurn(), と osl::Square::STAND().

参照元 makeUnmakeMove().

Square osl::NumEffectState::mobilityOf ( Direction  d,
int  num 
) const [inline]
Square osl::NumEffectState::mobilityOf ( Direction  d,
Piece  p 
) const [inline]

numEffectState.h179 行で定義されています。

参照先 mobilityOf(), と osl::Piece::number().

const PieceMask& osl::NumEffectState::piecesOnBoard ( Player  p  )  const [inline]

numEffectState.h63 行で定義されています。

参照先 pieces_onboard.

参照元 osl::eval::ml::PiecePairKing::add(), osl::eval::ml::MajorCheckWithCapture::addOne(), osl::eval::ml::PiecePairKing::addSub(), allEffectAt(), osl::move_generator::escape::blockByMoveOne(), osl::checkmate::detail::blockingDiagonalAttack(), osl::move_generator::detail::blockingU(), osl::checkmate::detail::blockingVerticalAttack(), checkShadow(), osl::eval::ml::King25Effect::countEffectAndPieces(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::progress::Effect5x3WithBonus::countEffectPieces(), osl::checkmate::CheckmateIfCapture::effectiveAttackCandidate0(), osl::move_generator::Capture< Action >::escapeByCapture(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::PiecePairKing::evalOne(), osl::eval::ml::KnightFork::evalOne(), osl::eval::ml::NonPawnAttackedPtypePair::evalOne(), osl::eval::ml::PromotedMinorPieces::evalOne(), osl::eval::ml::King25EffectCountCombination::evalOne(), osl::eval::ml::King25Effect3::evalOne(), osl::eval::ml::King25EmptySquareNoEffect::evalOne(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::move_probability::ToEffect::find(), findAttackNotBy(), findCheapAttack(), findCheapAttackNotBy(), findThreatenedPiece(), forEachEffect(), forEachEffectNotBy(), forEachOnBoard(), forEachOnBoardPtypeStrict(), osl::move_generator::Capture< Action >::generate(), osl::move_generator::detail::generateDirNotKing(), osl::move_generator::detail::generateMoveToPtypeMask(), osl::checkmate::ImmediateCheckmate::hasCheckmateMoveDir(), osl::checkmate::detail::hasCheckmateMoveKnight(), osl::effect_util::AdditionalEffect::hasEffect(), hasEffectAt(), hasEffectByNotPinned(), hasEffectByNotPinnedAndKing(), hasEffectInDirection(), hasEffectNotBy(), osl::rating::ImmediateAddSupport::index(), isConsistent(), isOnBoardNum(), longEffectAt(), osl::checkmate::King8Info::make(), makePinOpen(), osl::move_probability::CoverFork::match(), osl::move_probability::ToEffectLong::match(), pin(), recalcPinOpen(), osl::checkmate::detail::slowCheckDrop(), osl::checkmate::ImmediateCheckmate::slowHasCheckmateMoveDirPiece(), osl::eval::ml::PiecePairKing::sub(), osl::progress::ml::NewProgress::updateAttack5x5Pieces(), osl::eval::ml::NonPawnAttackedPtype::updateChanged(), osl::eval::ml::NonPawnAttacked::updateEffectChanged(), osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne(), osl::progress::ml::NewProgress::updatePawnFacing(), と osl::move_probability::StateInfo::updatePinnedGenerals().

const PieceMask osl::NumEffectState::pin ( Player  king  )  const [inline]
Piece osl::NumEffectState::pinAttacker ( Piece  pinned  )  const [inline]

numEffectState.h248 行で定義されています。

参照先 osl::Piece::owner().

template<Player P>
Piece osl::NumEffectState::pinAttacker ( Piece  pinned  )  const [inline]

Pのpinされた駒から,そのpinの原因となっている長い利きを持つ駒を得る..

numEffectState.h240 行で定義されています。

参照先 osl::BLACK, osl::inverseUnsafe(), longEffectNumTable(), osl::Piece::number(), osl::Piece::owner(), osl::SimpleState::pieceOf(), と pinOrOpen().

参照元 osl::eval::See::computeValue().

bool osl::NumEffectState::pinnedCanMoveTo ( Piece  p,
Square  to 
) const [inline]

numEffectState.h229 行で定義されています。

参照先 osl::Piece::owner().

template<Player P>
bool osl::NumEffectState::pinnedCanMoveTo ( Piece  p,
Square  to 
) const [inline]

pinされた駒pがtoに動けるか? pinに関係がなければtoへ動けるという前提

numEffectState.h222 行で定義されています。

参照先 osl::Board_Table, osl::BoardTable::getShort8Unsafe(), osl::Piece::owner(), osl::primDir(), osl::primDirUnsafe(), と osl::Piece::square().

参照元 osl::eval::See::computeValue(), と osl::move_generator::capture::generate().

template<Player P>
Direction osl::NumEffectState::pinnedDir ( Piece  p  )  const [inline]
Direction osl::NumEffectState::pinnedDir ( Piece  p  )  const [inline]

numEffectState.h210 行で定義されています。

参照先 osl::Piece::owner().

PieceMask osl::NumEffectState::pinOrOpen ( Player  king  )  const [inline]
template<osl::Player P>
void osl::NumEffectState::prologueCapture ( Player2Type< P >  ,
Square  from,
Square  to,
Piece  target,
int  promoteMask,
Piece oldPiece,
PtypeO oldPtypeO,
PtypeO capturePtypeO,
PtypeO new_ptypeo,
int &  num0,
int &  num1,
int &  num1Index,
mask_t &  num1Mask,
CArray< PieceMask, 2 > &  pin_or_open_backup,
KingMobility &  king_mobility_backup,
PieceMask promoted_backup,
CArray< PieceMask, 2 > &  effected_mask_backup,
CArray< PieceMask, 2 > &  effected_changed_mask_backup,
CArray< uint64_t, 2 > &  king8infos_backup,
MobilityTable &  mobility_backup 
) [private]
template<osl::Player P>
void osl::NumEffectState::prologueDrop ( Player2Type< P >  ,
Square  to,
Ptype  ptype,
Piece oldPiece,
int &  num,
PtypeO ptypeO,
int &  numIndex,
mask_t &  numMask,
CArray< PieceMask, 2 > &  pin_or_open_backup,
KingMobility &  king_mobility_backup,
CArray< PieceMask, 2 > &  effected_mask_backup,
CArray< PieceMask, 2 > &  effected_changed_mask_backup,
CArray< uint64_t, 2 > &  king8infos_backup,
MobilityTable &  mobility_backup 
) [private]
template<osl::Player P>
void osl::NumEffectState::prologueSimple ( Player2Type< P >  ,
Square  from,
Square  to,
int  promoteMask,
Piece oldPiece,
int &  num,
PtypeO oldPtypeO,
PtypeO new_ptypeo,
CArray< PieceMask, 2 > &  pin_or_open_backup,
KingMobility &  king_mobility_backup,
PieceMask promoted_backup,
CArray< PieceMask, 2 > &  effected_mask_backup,
CArray< PieceMask, 2 > &  effected_changed_mask_backup,
CArray< uint64_t, 2 > &  king8infos_backup,
MobilityTable &  mobility_backup 
) [private]
const PieceMask osl::NumEffectState::promotedPieces (  )  const [inline]
void osl::NumEffectState::recalcPinOpen ( Square  changed,
Direction lastDir,
Player  defense 
) [inline, private]
Piece osl::NumEffectState::safeCaptureNotByKing ( Player  P,
Square  target 
) const [inline]

numEffectState.h875 行で定義されています。

参照先 osl::BLACK, と osl::SimpleState::kingPiece().

template<osl::Player P>
osl::Piece osl::NumEffectState::safeCaptureNotByKing ( Square  target,
Piece  king 
) const

玉の素抜きなしに合法手でtargetに移動可能かを判定

引数:
king 玉 (玉で取る手は考えない)
戻り値:
移動可能な駒があれば,安全な駒を一つ.なければ Piece::EMPTY()
参照:
osl::move_classifier::PawnDropCheckmate

numEffectState.tcc137 行で定義されています。

参照先 findAttackNotBy(), osl::Piece::isPiece(), osl::Piece::number(), osl::Piece::owner(), pin(), osl::Piece::ptype(), と osl::SafeCapture::safe_one.

参照元 osl::move_classifier::PawnDropCheckmate< P >::isMember().

const osl::Piece osl::NumEffectState::selectCheapPiece ( PieceMask  effect  )  const
void osl::NumEffectState::showEffect ( std::ostream &  os  )  const
bool osl::NumEffectState::wasCheckEvasion ( Move  last_move  )  const

フレンドと関連する関数

bool operator== ( const NumEffectState st1,
const NumEffectState st2 
) [friend]

駒番に依存した局面(インスタンス)比較をする.

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


変数

CArray<uint64_t,2> osl::NumEffectState::king8infos [private]
KingMobility osl::NumEffectState::king_mobility [private]

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