All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
osl::eval::PieceEval Class Reference

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

#include <pieceEval.h>

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

List of all members.

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

Detailed Description

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

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

Definition at line 67 of file pieceEval.h.


Constructor & Destructor Documentation

osl::PieceEval::PieceEval ( const NumEffectState &  state) [explicit]
osl::eval::PieceEval::PieceEval ( int  v) [inline, explicit]

Definition at line 72 of file pieceEval.h.


Member Function Documentation

void osl::eval::PieceEval::addVal ( int  d) [inline, private]

Definition at line 133 of file pieceEval.h.

References val.

Referenced by update().

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

Definition at line 74 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 
) [inline, static]

Definition at line 104 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 
) [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]
int osl::eval::PieceEval::expect ( const NumEffectState &  ,
Move  move 
) const [inline]
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]
int osl::eval::PieceEval::value ( ) const [inline]

Definition at line 75 of file pieceEval.h.

References val.

Referenced by expect(), and show().

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


Member Data Documentation

Definition at line 184 of file pieceEval.h.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines