入玉の判定と予測 More...
Classes | |
| struct | EnterKing |
| class | SimplePredictor |
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 |
入玉の判定と予測
enterKing.h EnterKing canDeclareWin(state); 手番のプレイヤが宣言法 (27点法) で入玉出来るかを判定する
simplePredictor.h SimplePredictor 入玉出来るかの判定/予測を行う 宣言法向けには、名前の末尾に27 がついているものをつかう
getProbability(state,player): 確率を得る (0.0 - 1.0) predict(state,player): 上記の確率が閾値 (default 0.5) より大きいかどうかで判定
getProbability
現状の問題点や試行錯誤
| int osl::enter_king::countEffectInFrontOf | ( | const osl::state::NumEffectState & | state, |
| osl::Player | attack, | ||
| osl::Square | target, | ||
| osl::Player | defense | ||
| ) |
Definition at line 21 of file enterKingUtil.cc.
References osl::BLACK, countEffectInRange(), osl::WHITE, osl::Square::x(), and osl::Square::y().
Referenced by osl::enter_king::SimplePredictor::getProbability(), and osl::enter_king::SimplePredictor::getProbability27().
| 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().
| int osl::enter_king::countPiecePointsInRange | ( | const osl::state::NumEffectState & | state, |
| int & | num_pieces, | ||
| int | x0, | ||
| int | x1, | ||
| int | y0, | ||
| int | y1 | ||
| ) |
Definition at line 50 of file enterKingUtil.cc.
References count, osl::isMajor(), osl::Piece::isOnBoardByOwner(), osl::KING, osl::state::SimpleState::pieceOnBoard(), and osl::Piece::ptype().
| int osl::enter_king::countPiecePointsInRange | ( | const osl::state::NumEffectState & | state, |
| osl::Player | Turn, | ||
| int & | num_pieces, | ||
| int | x0, | ||
| int | x1, | ||
| int | y0, | ||
| int | y1 | ||
| ) |
Definition at line 72 of file enterKingUtil.cc.
References osl::BLACK, countPiecePointsInRange< BLACK >(), and countPiecePointsInRange< WHITE >().
| 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().
| 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 | ||
| ) |
Definition at line 86 of file enterKingUtil.cc.
References osl::BLACK, countPiecePointsOnRow< BLACK >(), and countPiecePointsOnRow< WHITE >().
| 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 | ||
| ) |
Definition at line 37 of file enterKingUtil.cc.
References osl::BISHOP, osl::state::SimpleState::countPiecesOnStand(), osl::GOLD, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, and osl::SILVER.
Referenced by osl::enter_king::SimplePredictor::getProbability(), and osl::enter_king::SimplePredictor::getProbability27().
| template double osl::enter_king::SimplePredictor::getProbability27< osl::BLACK > | ( | const osl::state::NumEffectState & | state) |
| template double osl::enter_king::SimplePredictor::getProbability27< osl::WHITE > | ( | const osl::state::NumEffectState & | state) |
| template double osl::enter_king::SimplePredictor::getProbability< osl::BLACK > | ( | const osl::state::NumEffectState & | state) |
| template double osl::enter_king::SimplePredictor::getProbability< osl::WHITE > | ( | const osl::state::NumEffectState & | state) |
| 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 | ||
| ) |
|
static |
Definition at line 14 of file simplePredictor.h.
Referenced by osl::enter_king::SimplePredictor::getProbability().
|
static |
Definition at line 16 of file simplePredictor.h.
Referenced by osl::enter_king::SimplePredictor::getProbability27().
|
static |
Definition at line 15 of file simplePredictor.h.
Referenced by osl::enter_king::SimplePredictor::getProbability().
|
static |
Definition at line 17 of file simplePredictor.h.
Referenced by osl::enter_king::SimplePredictor::getProbability27().
1.8.4