My Project
osl::checkmate::ProofNumberTable Class Reference

#include <proofNumberTable.h>

Classes

struct  Liberty

Public Member Functions

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 Attributes

CArray2d< CArray< Liberty, DIRECTION_SIZE >, 0x100u, PTYPE_SIZEliberties
 一つの王手 -> 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]

Detailed Description

Definition at line 15 of file proofNumberTable.h.

Member Function Documentation

◆ attackEstimation() [1/2]

const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation ( const NumEffectState & state) const

◆ attackEstimation() [2/2]

const osl::checkmate::ProofDisproof osl::checkmate::ProofNumberTable::attackEstimation ( const NumEffectState & state,
Player attack,
King8Info info,
Square king ) const

◆ countLiberty() [1/3]

◆ countLiberty() [2/3]

int osl::checkmate::ProofNumberTable::countLiberty ( const NumEffectState & state,
Move move ) const

◆ countLiberty() [3/3]

const Liberty osl::checkmate::ProofNumberTable::countLiberty ( Ptype ptype,
Direction d,
unsigned int liberty_mask ) const
inline

dir 方向からの王手をかけた時のlibertyの予想

Definition at line 50 of file proofNumberTable.h.

References liberties, osl::UUL, and osl::UUR.

Referenced by countLiberty(), countLibertyLong(), and countLibertyShortNotKnight().

◆ countLibertyLong()

const Liberty osl::checkmate::ProofNumberTable::countLibertyLong ( Player player,
Square to,
Ptype ptype,
Square king,
King8Info info ) const
inline

◆ countLibertyShortNotKnight()

const Liberty osl::checkmate::ProofNumberTable::countLibertyShortNotKnight ( Player player,
Square to,
Ptype ptype,
Square king,
King8Info info ) const
inline

8近傍へのdropまたは取れない移動後のlibertyの予測値を返す.

玉は取り返せる時でも取り返さない値. 桂馬は表をひく必要がないので呼び出し側で処理する.

Returns
空王手の場合は 0 のことがある.

Definition at line 62 of file proofNumberTable.h.

References osl::BLACK, osl::Board_Table, countLiberty(), osl::Square::isNeighboring8(), osl::KNIGHT, osl::checkmate::King8Info::liberty(), and osl::WHITE.

Referenced by countLiberty().

◆ disproofAfterAllCheck()

int osl::checkmate::ProofNumberTable::disproofAfterAllCheck ( const NumEffectState & state,
Player attack,
King8Info info ) const

◆ init()

◆ libertyAfterAllCheck()

int osl::checkmate::ProofNumberTable::libertyAfterAllCheck ( const NumEffectState & state) const

全て

Definition at line 365 of file proofNumberTable.cc.

References attackEstimation().

◆ libertyAfterAllDrop() [1/2]

int osl::checkmate::ProofNumberTable::libertyAfterAllDrop ( const NumEffectState & state) const

◆ libertyAfterAllDrop() [2/2]

int osl::checkmate::ProofNumberTable::libertyAfterAllDrop ( const NumEffectState & state,
Player attack,
King8Info info ) const

◆ libertyAfterAllMove() [1/2]

int osl::checkmate::ProofNumberTable::libertyAfterAllMove ( const NumEffectState & state) const

◆ libertyAfterAllMove() [2/2]

Member Data Documentation

◆ drop_liberty

CArray2d<uint8_t,0x10000u,8> osl::checkmate::ProofNumberTable::drop_liberty
private

全ての有効drop -> 最小liberty.

liberty 8bit + 有効drop 8bit + 最小値 -> ptype mask

Definition at line 35 of file proofNumberTable.h.

Referenced by init(), and libertyAfterAllDrop().

◆ liberties

CArray2d<CArray<Liberty,DIRECTION_SIZE>,0x100u,PTYPE_SIZE> osl::checkmate::ProofNumberTable::liberties
private

一つの王手 -> Liberty: long なdirection は1マスあけた王手を意味する

Definition at line 31 of file proofNumberTable.h.

Referenced by countLiberty(), and init().

◆ other_move_liberty

CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::other_move_liberty
private

それ以外の移動liberty: [liberty][move_mask]

Definition at line 43 of file proofNumberTable.h.

Referenced by init(), and libertyAfterAllMove().

◆ pmajor_liberty

CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::pmajor_liberty
private

龍や馬で王手をかけられる時のliberty: [liberty][move_mask]

Definition at line 37 of file proofNumberTable.h.

Referenced by init(), and libertyAfterAllMove().

◆ promote_liberty

CArray2d<uint8_t,0x100u,0x100u> osl::checkmate::ProofNumberTable::promote_liberty
private

王が1,2段目にいる時の移動王手によるliberty: [liberty][move_mask].

それ以外でUに金類が移動できる場合もこれで良いか.

Definition at line 41 of file proofNumberTable.h.

Referenced by init(), and libertyAfterAllMove().


The documentation for this class was generated from the following files: