#include <proofNumberTable.h>
構成 | |
struct | Liberty |
Public メソッド | |
void | init () |
const Liberty | countLiberty (Ptype ptype, Direction d, unsigned int liberty_mask) const |
dir 方向からの王手をかけた時のlibertyの予想 | |
const Liberty | countLibertyShortNotKnight (Player player, Square to, Ptype ptype, Square king, King8Info info) const |
8近傍へのdropまたは取れない移動後のlibertyの予測値を返す. | |
const Liberty | countLibertyLong (Player player, Square to, Ptype ptype, Square king, King8Info info) const |
int | countLiberty (const NumEffectState &state, int liberty_count, Move move, Square king, King8Info info) const |
move は王手である必要がある | |
int | countLiberty (const NumEffectState &state, Move move) const |
テスト用 | |
int | libertyAfterAllDrop (const NumEffectState &state) const |
drop のみ | |
int | libertyAfterAllDrop (const NumEffectState &state, Player attack, King8Info info) const |
int | libertyAfterAllMove (const NumEffectState &state) const |
移動 のみ | |
int | libertyAfterAllMove (const NumEffectState &state, Player attack, King8Info info, Square king) const |
int | libertyAfterAllCheck (const NumEffectState &state) const |
全て | |
int | disproofAfterAllCheck (const NumEffectState &, Player, King8Info) const |
const ProofDisproof | attackEstimation (const NumEffectState &state) const |
全て | |
const ProofDisproof | attackEstimation (const NumEffectState &state, Player attack, King8Info info, Square king) const |
Private 変数 | |
CArray2d< CArray< Liberty, DIRECTION_SIZE >, 0x100u, PTYPE_SIZE > | liberties |
一つの王手 -> Liberty: long なdirection は1マスあけた王手を意味する | |
CArray2d< uint8_t, 0x10000u, 8 > | drop_liberty |
全ての有効drop -> 最小liberty. | |
CArray2d< uint8_t, 0x100u, 0x100u > | pmajor_liberty |
龍や馬で王手をかけられる時のliberty: [liberty][move_mask] | |
CArray2d< uint8_t, 0x100u, 0x100u > | promote_liberty |
王が1,2段目にいる時の移動王手によるliberty: [liberty][move_mask]. | |
CArray2d< uint8_t, 0x100u, 0x100u > | other_move_liberty |
それ以外の移動liberty: [liberty][move_mask] |
proofNumberTable.h の 15 行で定義されています。
const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation | ( | const NumEffectState & | state | ) | const |
const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation | ( | const NumEffectState & | state, | |
Player | attack, | |||
King8Info | info, | |||
Square | king | |||
) | const |
proofNumberTable.cc の 340 行で定義されています。
参照先 disproofAfterAllCheck(), libertyAfterAllDrop(), libertyAfterAllMove(), と osl::eval::min().
int osl::checkmate::ProofNumberTable::countLiberty | ( | const NumEffectState & | state, | |
int | liberty_count, | |||
Move | move, | |||
Square | king, | |||
King8Info | info | |||
) | const [inline] |
move は王手である必要がある
proofNumberTable.h の 100 行で定義されています。
参照先 osl::alt(), osl::misc::BitOp::countBit(), osl::NumEffectState::countEffect(), countLibertyLong(), countLibertyShortNotKnight(), osl::checkmate::ProofNumberTable::Liberty::has_effect, osl::effect_util::AdditionalEffect::hasEffect(), osl::Move::isDrop(), osl::Square::isNeighboring8(), osl::KNIGHT, osl::checkmate::ProofNumberTable::Liberty::liberty, osl::checkmate::King8Info::liberty(), osl::eval::max(), osl::Move::player(), osl::Move::ptype(), と osl::Move::to().
int osl::checkmate::ProofNumberTable::countLiberty | ( | const NumEffectState & | state, | |
Move | move | |||
) | const |
テスト用
proofNumberTable.cc の 221 行で定義されています。
参照先 osl::alt(), countLiberty(), osl::NumEffectState::Iking8Info(), osl::SimpleState::kingSquare(), と osl::Move::player().
const Liberty osl::checkmate::ProofNumberTable::countLiberty | ( | Ptype | ptype, | |
Direction | d, | |||
unsigned int | liberty_mask | |||
) | const [inline] |
dir 方向からの王手をかけた時のlibertyの予想
proofNumberTable.h の 50 行で定義されています。
参照先 liberties, osl::UUL, と osl::UUR.
参照元 osl::checkmate::PureLibertyEstimator::attackH(), countLiberty(), countLibertyLong(), と countLibertyShortNotKnight().
const Liberty osl::checkmate::ProofNumberTable::countLibertyLong | ( | Player | player, | |
Square | to, | |||
Ptype | ptype, | |||
Square | king, | |||
King8Info | info | |||
) | const [inline] |
proofNumberTable.h の 74 行で定義されています。
参照先 osl::BLACK, osl::Board_Table, countLiberty(), osl::BoardTable::getLongDirection(), osl::BoardTable::getShortOffsetNotKnight(), osl::isLong(), osl::isMajor(), osl::Square::isNeighboring8(), osl::LANCE, osl::checkmate::King8Info::liberty(), osl::unpromote(), osl::WHITE, と osl::Offset::zero().
参照元 countLiberty().
const Liberty osl::checkmate::ProofNumberTable::countLibertyShortNotKnight | ( | Player | player, | |
Square | to, | |||
Ptype | ptype, | |||
Square | king, | |||
King8Info | info | |||
) | const [inline] |
8近傍へのdropまたは取れない移動後のlibertyの予測値を返す.
玉は取り返せる時でも取り返さない値. 桂馬は表をひく必要がないので呼び出し側で処理する.
proofNumberTable.h の 62 行で定義されています。
参照先 osl::BLACK, osl::Board_Table, countLiberty(), osl::BoardTable::getShort8(), osl::Square::isNeighboring8(), osl::KNIGHT, osl::checkmate::King8Info::liberty(), と osl::WHITE.
参照元 countLiberty().
int osl::checkmate::ProofNumberTable::disproofAfterAllCheck | ( | const NumEffectState & | state, | |
Player | attack, | |||
King8Info | info | |||
) | const |
void osl::checkmate::ProofNumberTable::init | ( | ) |
proofNumberTable.cc の 80 行で定義されています。
参照先 osl::misc::BitOp::countBit(), osl::dirToMask(), drop_liberty, osl::PtypeTable::getMoveMask(), osl::GOLD, osl::checkmate::ProofNumberTable::Liberty::has_effect, osl::isPiece(), osl::KING, liberties, osl::checkmate::ProofNumberTable::Liberty::liberty, osl::LONG_DIRECTION_MIN, osl::eval::max(), osl::eval::min(), other_move_liberty, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, pmajor_liberty, osl::PPAWN, promote_liberty, osl::PROOK, osl::PSILVER, osl::PTYPE_BASIC_MIN, osl::PTYPE_PIECE_MIN, osl::Ptype_Table, osl::shortToLong(), と osl::U.
int osl::checkmate::ProofNumberTable::libertyAfterAllCheck | ( | const NumEffectState & | state | ) | const |
全て
proofNumberTable.cc の 362 行で定義されています。
参照先 attackEstimation(), と osl::checkmate::ProofDisproof::proof().
int osl::checkmate::ProofNumberTable::libertyAfterAllDrop | ( | const NumEffectState & | state, | |
Player | attack, | |||
King8Info | info | |||
) | const |
int osl::checkmate::ProofNumberTable::libertyAfterAllDrop | ( | const NumEffectState & | state | ) | const |
drop のみ
proofNumberTable.cc の 251 行で定義されています。
参照先 osl::alt(), osl::NumEffectState::Iking8Info(), と osl::SimpleState::turn().
参照元 attackEstimation().
int osl::checkmate::ProofNumberTable::libertyAfterAllMove | ( | const NumEffectState & | state, | |
Player | attack, | |||
King8Info | info, | |||
Square | king | |||
) | const |
proofNumberTable.cc の 259 行で定義されています。
参照先 osl::alt(), osl::BLACK, osl::Board_Table, osl::Square::canPromote(), osl::BoardTable::getOffset(), osl::GOLD, osl::NumEffectState::hasEffectByPtype(), osl::PtypeTraits< BISHOP >::indexMin, osl::isMajor(), osl::Piece::isOnBoardByOwner(), osl::isPromoted(), osl::checkmate::King8Info::liberty(), osl::checkmate::King8Info::moveCandidateMask(), other_move_liberty, osl::SimpleState::pieceOf(), pmajor_liberty, promote_liberty, osl::Piece::ptype(), osl::Piece::ptypeO(), osl::Piece::square(), osl::Square::squareForBlack(), osl::U, osl::WHITE, と osl::Square::y().
int osl::checkmate::ProofNumberTable::libertyAfterAllMove | ( | const NumEffectState & | state | ) | const |
移動 のみ
proofNumberTable.cc の 317 行で定義されています。
参照先 osl::alt(), osl::NumEffectState::Iking8Info(), osl::SimpleState::kingSquare(), と osl::SimpleState::turn().
参照元 attackEstimation().
CArray2d<uint8_t,0x10000u,8> osl::checkmate::ProofNumberTable::drop_liberty [private] |
全ての有効drop -> 最小liberty.
liberty 8bit + 有効drop 8bit + 最小値 -> ptype mask
proofNumberTable.h の 35 行で定義されています。
参照元 init(), と libertyAfterAllDrop().
CArray2d<CArray<Liberty,DIRECTION_SIZE>,0x100u,PTYPE_SIZE> osl::checkmate::ProofNumberTable::liberties [private] |
一つの王手 -> Liberty: long なdirection は1マスあけた王手を意味する
proofNumberTable.h の 31 行で定義されています。
参照元 countLiberty(), と init().
CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::other_move_liberty [private] |
それ以外の移動liberty: [liberty][move_mask]
proofNumberTable.h の 43 行で定義されています。
参照元 init(), と libertyAfterAllMove().
CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::pmajor_liberty [private] |
龍や馬で王手をかけられる時のliberty: [liberty][move_mask]
proofNumberTable.h の 37 行で定義されています。
参照元 init(), と libertyAfterAllMove().
CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::promote_liberty [private] |
王が1,2段目にいる時の移動王手によるliberty: [liberty][move_mask].
それ以外でUに金類が移動できる場合もこれで良いか.
proofNumberTable.h の 41 行で定義されています。
参照元 init(), と libertyAfterAllMove().