osl::eval::PieceEval Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
osl::eval::PieceEval Class Reference

駒の価値ベースの評価関数. More...

`#include <pieceEval.h>`

Collaboration diagram for osl::eval::PieceEval:
[legend]

## Public Member Functions
| PieceEval (const NumEffectState &state)
| PieceEval (int v)
| PieceEval ()
void | changeTurn ()
int | value () const
const Move | suggestMove (const NumEffectState &) const
int | expect (const NumEffectState &, Move move) const
| state でmoveを指した後の評価値を予測 More...
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) More...
static int | computeDiffAfterMove (const NumEffectState &state, Move move)
template<Player P>
static int | computeDiffAfterMoveForRP (const NumEffectState &state, Move move)
| 実現確率探索用取り返し値 More...
static int | computeDiffAfterMoveForRP (const NumEffectState &state, Move move)
static int | seeScale ()
static int | captureValue (PtypeO ptypeO)
| QuiescenceSearch の枝刈で使用 More...
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

## Detailed Description

駒の価値ベースの評価関数.

必ず偶数 先手有利 +, 後手有利 - 歩 PtypeEvalTraits<PAWN>::val 点

Definition at line 67 of file pieceEval.h.

## Constructor & Destructor Documentation

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) |  |
| inlineexplicit

Definition at line 72 of file pieceEval.h.

osl::eval::PieceEval::PieceEval | ( | ) |  |

Definition at line 49 of file pieceEval.cc.

## Member Function Documentation

void osl::eval::PieceEval::addVal | ( | int | d) |  |
| inlineprivate

Definition at line 134 of file pieceEval.h.

References val.

Referenced by update().

static int osl::eval::PieceEval::captureValue | ( | PtypeO | ptypeO) |  |
| inlinestatic

QuiescenceSearch の枝刈で使用

Definition at line 162 of file pieceEval.h.

References osl::eval::PtypeEvalTable::captureValue(), and osl::eval::Ptype_Eval_Table.

Referenced by osl::eval::ppair::PiecePairEvalBase::captureValue(), osl::effect_util::UnblockableEffect::find(), and osl::eval::ProgressEvalGeneral< progress_eval_opening_t >::seeScale().

void osl::eval::PieceEval::changeTurn | ( | ) |  |
| inline

Definition at line 75 of file pieceEval.h.

template<Player P>

static int osl::eval::PieceEval::computeDiffAfterMove | ( | const NumEffectState & | state,
|  | Move | move
| ) |  |
| static

move による取り返し値の変化 (SOMA)

- move 後のマスだけ考える
- 基本は価値の小さい順に調べる
- 順番に関して，PROMOTE の有無は考えていない
- 現在，飛車や香の利きはmove の後ろにあるものしか伸びない
- ?? 駒が味方の駒を飛び越える手も考える
- 数値の価値は Player にとって．
- 王手などは気にしない

static int osl::eval::PieceEval::computeDiffAfterMove | ( | const NumEffectState & | state,
|  | Move | move
| ) |  |
| inlinestatic

Definition at line 105 of file pieceEval.h.

References osl::BLACK, and osl::Move::player().

template<osl::Player P>

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().

template<Player P>

static int osl::eval::PieceEval::computeDiffAfterMoveForRP | ( | const NumEffectState & | state,
|  | Move | move
| ) |  |
| inlinestatic

実現確率探索用取り返し値

現在の局面の評価値と move 後の局面の差分(Pが得する場合が正とな るよう符号を補正)を返す．

Definition at line 120 of file pieceEval.h.

References osl::BLACK, and osl::Move::player().

static int osl::eval::PieceEval::computeDiffAfterMoveForRP | ( | const NumEffectState & | state,
|  | Move | move
| ) |  |
| inlinestatic

Definition at line 126 of file pieceEval.h.

References osl::BLACK, and osl::Move::player().

static int osl::eval::PieceEval::diffWithMove | ( | const NumEffectState & | ,
|  | Move | move
| ) |  |
| inlinestatic

Definition at line 81 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 141 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 | ( | ) |  |
| inlinestatic

Definition at line 90 of file pieceEval.h.

Referenced by osl::eval::endgame::AttackDefense::infty().

static bool osl::eval::PieceEval::initialized | ( | ) |  |
| inlinestatic

Definition at line 74 of file pieceEval.h.

const Progress16 osl::eval::PieceEval::progress16 | ( | ) |  | const
| inline

Definition at line 157 of file pieceEval.h.

const Progress32 osl::eval::PieceEval::progress32 | ( | ) |  | const
| inline

Definition at line 156 of file pieceEval.h.

static int osl::eval::PieceEval::seeScale | ( | ) |  |
| inlinestatic

Definition at line 158 of file pieceEval.h.

const Move osl::eval::PieceEval::suggestMove | ( | const NumEffectState & | ) |  | const
| inline

Definition at line 136 of file pieceEval.h.

void osl::eval::PieceEval::update | ( | const NumEffectState & | ,
|  | Move | last_move
| ) |  |
| inline

Definition at line 171 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

Definition at line 76 of file pieceEval.h.

References val.

Referenced by expect(), and show().

static int osl::eval::PieceEval::value | ( | PtypeO | ptypeO) |  |
| inlinestatic

Definition at line 166 of file pieceEval.h.

References osl::eval::Ptype_Eval_Table, and osl::eval::PtypeEvalTable::value().

## Member Data Documentation

const eval::PtypeEvalTable osl::eval::PieceEval::Piece_Value = eval::Ptype_Eval_Table
| static

Definition at line 185 of file pieceEval.h.

int osl::eval::PieceEval::val
| private

Definition at line 69 of file pieceEval.h.

Referenced by addVal(), expect(), and value().

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

- pieceEval.h
- pieceEval.tcc
- pieceEval.cc
- tables.cc