駒の価値ベースの評価関数. More...
#include <pieceEval.h>
Public Member Functions | |
PieceEval (const NumEffectState &state) | |
PieceEval (int v) | |
void | changeTurn () |
int | value () const |
const Move | suggestMove (const NumEffectState &) const |
int | expect (const NumEffectState &, Move move) const |
state でmoveを指した後の評価値を予測 | |
const Progress32 | progress32 () const |
const Progress16 | progress16 () const |
void | update (const NumEffectState &, Move last_move) |
template<osl::Player P> | |
int | computeDiffAfterMove (const NumEffectState &state, Move move) |
Static Public Member Functions | |
static bool | initialized () |
static int | diffWithMove (const NumEffectState &, Move move) |
static int | infty () |
template<Player P> | |
static int | computeDiffAfterMove (const NumEffectState &state, Move move) |
move による取り返し値の変化 (SOMA) | |
static int | computeDiffAfterMove (const NumEffectState &state, Move move) |
template<Player P> | |
static int | computeDiffAfterMoveForRP (const NumEffectState &state, Move move) |
実現確率探索用取り返し値 | |
static int | computeDiffAfterMoveForRP (const NumEffectState &state, Move move) |
static int | seeScale () |
static int | captureValue (PtypeO ptypeO) |
QuiescenceSearch の枝刈で使用 | |
static int | value (PtypeO ptypeO) |
Static Public Attributes | |
static const PtypeEvalTable | Piece_Value = eval::Ptype_Eval_Table |
Private Member Functions | |
void | addVal (int d) |
Private Attributes | |
int | val |
駒の価値ベースの評価関数.
必ず偶数 先手有利 +, 後手有利 - 歩 PtypeEvalTraits<PAWN>::val 点
Definition at line 67 of file pieceEval.h.
osl::PieceEval::PieceEval | ( | const NumEffectState & | state | ) | [explicit] |
Definition at line 27 of file pieceEval.cc.
References osl::BLACK, osl::PieceTable::getPtypeOf(), osl::newPtypeO(), osl::Piece_Table, osl::eval::Ptype_Eval_Table, osl::eval::PtypeEvalTable::value(), and osl::WHITE.
osl::eval::PieceEval::PieceEval | ( | int | v | ) | [inline, explicit] |
Definition at line 72 of file pieceEval.h.
void osl::eval::PieceEval::addVal | ( | int | d | ) | [inline, private] |
static int osl::eval::PieceEval::captureValue | ( | PtypeO | ptypeO | ) | [inline, static] |
QuiescenceSearch の枝刈で使用
Definition at line 161 of file pieceEval.h.
References osl::eval::PtypeEvalTable::captureValue(), and osl::eval::Ptype_Eval_Table.
Referenced by osl::effect_util::UnblockableEffect::find().
void osl::eval::PieceEval::changeTurn | ( | ) | [inline] |
Definition at line 74 of file pieceEval.h.
static int osl::eval::PieceEval::computeDiffAfterMove | ( | const NumEffectState & | state, |
Move | move | ||
) | [static] |
move による取り返し値の変化 (SOMA)
static int osl::eval::PieceEval::computeDiffAfterMove | ( | const NumEffectState & | state, |
Move | move | ||
) | [inline, static] |
Definition at line 104 of file pieceEval.h.
References osl::BLACK, and osl::Move::player().
int osl::eval::PieceEval::computeDiffAfterMove | ( | const NumEffectState & | state, |
Move | move | ||
) |
move.to() に利きのある駒を集める
moveの結果, 延びる効きがあるか
現状で自分を除くすべての駒
Definition at line 208 of file pieceEval.tcc.
References osl::Move::from(), osl::Square::isPieceStand(), osl::Move::ptypeO(), and osl::Move::to().
static int osl::eval::PieceEval::computeDiffAfterMoveForRP | ( | const NumEffectState & | state, |
Move | move | ||
) | [inline, static] |
実現確率探索用取り返し値
現在の局面の評価値と move 後の局面の差分(Pが得する場合が正とな るよう符号を補正)を返す.
Definition at line 119 of file pieceEval.h.
References osl::BLACK, and osl::Move::player().
static int osl::eval::PieceEval::computeDiffAfterMoveForRP | ( | const NumEffectState & | state, |
Move | move | ||
) | [inline, static] |
Definition at line 125 of file pieceEval.h.
References osl::BLACK, and osl::Move::player().
static int osl::eval::PieceEval::diffWithMove | ( | const NumEffectState & | , |
Move | move | ||
) | [inline, static] |
Definition at line 80 of file pieceEval.h.
References osl::Move::capturePtype(), osl::Move::capturePtypeO(), osl::eval::PtypeEvalTable::captureValue(), osl::Move::isPromotion(), osl::eval::PtypeEvalTable::promoteValue(), osl::PTYPE_EMPTY, osl::eval::Ptype_Eval_Table, and osl::Move::ptypeO().
Referenced by osl::eval::See::seeInternal().
int osl::eval::PieceEval::expect | ( | const NumEffectState & | , |
Move | move | ||
) | const [inline] |
state でmoveを指した後の評価値を予測
Definition at line 140 of file pieceEval.h.
References osl::captured(), osl::Move::capturePtypeOSafe(), osl::getPtype(), osl::Move::isDrop(), osl::Move::isPass(), osl::Move::oldPtypeO(), osl::PTYPE_EMPTY, osl::eval::Ptype_Eval_Table, osl::Move::ptypeO(), result, val, osl::eval::PtypeEvalTable::value(), and value().
static int osl::eval::PieceEval::infty | ( | ) | [inline, static] |
Definition at line 89 of file pieceEval.h.
static bool osl::eval::PieceEval::initialized | ( | ) | [inline, static] |
Definition at line 73 of file pieceEval.h.
const Progress16 osl::eval::PieceEval::progress16 | ( | ) | const [inline] |
Definition at line 156 of file pieceEval.h.
const Progress32 osl::eval::PieceEval::progress32 | ( | ) | const [inline] |
Definition at line 155 of file pieceEval.h.
static int osl::eval::PieceEval::seeScale | ( | ) | [inline, static] |
Definition at line 157 of file pieceEval.h.
const Move osl::eval::PieceEval::suggestMove | ( | const NumEffectState & | ) | const [inline] |
Definition at line 135 of file pieceEval.h.
void osl::eval::PieceEval::update | ( | const NumEffectState & | , |
Move | last_move | ||
) | [inline] |
Definition at line 170 of file pieceEval.h.
References addVal(), osl::captured(), osl::Move::capturePtype(), osl::Move::capturePtypeO(), osl::Move::isDrop(), osl::Move::isPass(), osl::Move::oldPtypeO(), osl::PTYPE_EMPTY, osl::eval::Ptype_Eval_Table, osl::Move::ptypeO(), and osl::eval::PtypeEvalTable::value().
int osl::eval::PieceEval::value | ( | ) | const [inline] |
static int osl::eval::PieceEval::value | ( | PtypeO | ptypeO | ) | [inline, static] |
Definition at line 165 of file pieceEval.h.
References osl::eval::Ptype_Eval_Table, and osl::eval::PtypeEvalTable::value().
const eval::PtypeEvalTable osl::eval::PieceEval::Piece_Value = eval::Ptype_Eval_Table [static] |
Definition at line 184 of file pieceEval.h.
int osl::eval::PieceEval::val [private] |
Definition at line 69 of file pieceEval.h.