All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Functions | Variables
osl::enter_king Namespace Reference

入玉の判定と予測 More...

Classes

struct  EnterKing
 
class  SimplePredictor
 

Functions

int countEffectInRange (const osl::state::NumEffectState &staet, Player Turn, int x0, int x1, int y0, int y1)
 
int countEffectInFrontOf (const osl::state::NumEffectState &state, Player attack, Square target, Player defense)
 
int countPiecePointsOnStand (const osl::state::NumEffectState &state, Player Turn)
 
template<Player Turn>
int countPiecePointsInRange (const osl::state::NumEffectState &state, int &num_pieces, int x0, int x1, int y0, int y1)
 
int countPiecePointsInRange (const osl::state::NumEffectState &state, Player Turn, int &num_pieces, int x0, int x1, int y0, int y1)
 
template<Player Turn>
int countPiecePointsOnRow (const osl::state::NumEffectState &state, int &num_pieces, int row)
 
int countPiecePointsOnRow (const osl::state::NumEffectState &state, Player Turn, int &num_pieces, int row)
 
template int countPiecePointsInRange< BLACK > (const osl::state::NumEffectState &state, int &num_pieces, int x0, int x1, int y0, int y1)
 
template int countPiecePointsInRange< WHITE > (const osl::state::NumEffectState &state, int &num_pieces, int x0, int x1, int y0, int y1)
 
template int countPiecePointsOnRow< BLACK > (const osl::state::NumEffectState &state, int &num_pieces, int row)
 
template int countPiecePointsOnRow< WHITE > (const osl::state::NumEffectState &state, int &num_pieces, int row)
 
template double SimplePredictor::getProbability< osl::BLACK > (const osl::state::NumEffectState &state)
 
template double SimplePredictor::getProbability< osl::WHITE > (const osl::state::NumEffectState &state)
 
template double SimplePredictor::getProbability27< osl::BLACK > (const osl::state::NumEffectState &state)
 
template double SimplePredictor::getProbability27< osl::WHITE > (const osl::state::NumEffectState &state)
 
template bool SimplePredictor::predict< osl::BLACK > (const osl::state::NumEffectState &state, double threshold)
 
template bool SimplePredictor::predict< osl::WHITE > (const osl::state::NumEffectState &state, double threshold)
 
template bool SimplePredictor::predict27< osl::BLACK > (const osl::state::NumEffectState &state, double threshold)
 
template bool SimplePredictor::predict27< osl::WHITE > (const osl::state::NumEffectState &state, double threshold)
 

Variables

static const int winning_threshold_black = 24
 
static const int winning_threshold_white = 24
 
static const int winning_threshold_black_27 = 28
 
static const int winning_threshold_white_27 = 27
 

Detailed Description

入玉の判定と予測

enterKing.h EnterKing canDeclareWin(state); 手番のプレイヤが宣言法 (27点法) で入玉出来るかを判定する

simplePredictor.h SimplePredictor 入玉出来るかの判定/予測を行う 宣言法向けには、名前の末尾に27 がついているものをつかう 

getProbability(state,player): 確率を得る (0.0 - 1.0) predict(state,player): 上記の確率が閾値 (default 0.5) より大きいかどうかで判定

getProbability

現状の問題点や試行錯誤

Function Documentation

int osl::enter_king::countEffectInFrontOf ( const osl::state::NumEffectState state,
osl::Player  attack,
osl::Square  target,
osl::Player  defense 
)
int osl::enter_king::countEffectInRange ( const osl::state::NumEffectState staet,
osl::Player  Turn,
int  x0,
int  x1,
int  y0,
int  y1 
)

Definition at line 4 of file enterKingUtil.cc.

References osl::state::NumEffectState::countEffect().

Referenced by countEffectInFrontOf().

template<Player Turn>
int osl::enter_king::countPiecePointsInRange ( const osl::state::NumEffectState state,
int &  num_pieces,
int  x0,
int  x1,
int  y0,
int  y1 
)
int osl::enter_king::countPiecePointsInRange ( const osl::state::NumEffectState state,
osl::Player  Turn,
int &  num_pieces,
int  x0,
int  x1,
int  y0,
int  y1 
)
template int osl::enter_king::countPiecePointsInRange< BLACK > ( const osl::state::NumEffectState state,
int &  num_pieces,
int  x0,
int  x1,
int  y0,
int  y1 
)

Referenced by countPiecePointsInRange().

template int osl::enter_king::countPiecePointsInRange< WHITE > ( const osl::state::NumEffectState state,
int &  num_pieces,
int  x0,
int  x1,
int  y0,
int  y1 
)

Referenced by countPiecePointsInRange().

template<Player Turn>
int osl::enter_king::countPiecePointsOnRow ( const osl::state::NumEffectState state,
int &  num_pieces,
int  row 
)

Definition at line 82 of file enterKingUtil.cc.

int osl::enter_king::countPiecePointsOnRow ( const osl::state::NumEffectState state,
osl::Player  Turn,
int &  num_pieces,
int  row 
)
template int osl::enter_king::countPiecePointsOnRow< BLACK > ( const osl::state::NumEffectState state,
int &  num_pieces,
int  row 
)

Referenced by countPiecePointsOnRow().

template int osl::enter_king::countPiecePointsOnRow< WHITE > ( const osl::state::NumEffectState state,
int &  num_pieces,
int  row 
)

Referenced by countPiecePointsOnRow().

int osl::enter_king::countPiecePointsOnStand ( const osl::state::NumEffectState state,
osl::Player  Turn 
)
template bool osl::enter_king::SimplePredictor::predict27< osl::BLACK > ( const osl::state::NumEffectState state,
double  threshold 
)
template bool osl::enter_king::SimplePredictor::predict27< osl::WHITE > ( const osl::state::NumEffectState state,
double  threshold 
)
template bool osl::enter_king::SimplePredictor::predict< osl::BLACK > ( const osl::state::NumEffectState state,
double  threshold 
)
template bool osl::enter_king::SimplePredictor::predict< osl::WHITE > ( const osl::state::NumEffectState state,
double  threshold 
)

Variable Documentation

const int osl::enter_king::winning_threshold_black = 24
static

Definition at line 14 of file simplePredictor.h.

Referenced by osl::enter_king::SimplePredictor::getProbability().

const int osl::enter_king::winning_threshold_black_27 = 28
static
const int osl::enter_king::winning_threshold_white = 24
static

Definition at line 15 of file simplePredictor.h.

Referenced by osl::enter_king::SimplePredictor::getProbability().

const int osl::enter_king::winning_threshold_white_27 = 27
static