osl::eval::ml::PieceEval Class Reference

`#include <ptypeEval.h>`

## Static Public Member Functions

static void | setUp (const Weights &weights)
static int | eval (const NumEffectState &state)
template<Player P>
static int | evalWithUpdate (const NumEffectState &, Move moved, int last_value)
static int | value (PtypeO ptypeO)

## Static Private Attributes

static CArray< int, PTYPEO_SIZE > | table

## Detailed Description

Definition at line 82 of file ptypeEval.h.

## Member Function Documentation

## eval()

int osl::eval::ml::PieceEval::eval | ( | const NumEffectState & | state | ) |

static

Definition at line 76 of file ptypeEval.cc.

References osl::SimpleState::pieceOf(), osl::Piece::ptypeO(), osl::PTYPEO_MIN, osl::Piece::SIZE, table, and value().

Referenced by osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval().

## evalWithUpdate()

template<Player P>

int osl::eval::ml::PieceEval::evalWithUpdate | ( | const NumEffectState & | ,
|  | Move | moved,
|  | int | last_value )

inline static

Definition at line 89 of file ptypeEval.h.

References osl::alt(), osl::captured(), osl::Move::capturePtype(), osl::Move::isDrop(), osl::Move::isPass(), osl::Move::isPromotion(), osl::newPtypeO(), osl::Move::oldPtypeO(), osl::Move::player(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), osl::PTYPEO_MIN, table, osl::unpromote(), and value().

Referenced by osl::eval::ml::OpenMidEndingEval::expect(), and osl::eval::ml::OpenMidEndingEval::updateSub().

## setUp()

void osl::eval::ml::PieceEval::setUp | ( | const Weights & | weights | ) |

static

Definition at line 62 of file ptypeEval.cc.

References osl::BLACK, osl::eval::ml::Weights::dimension(), osl::KING, osl::newPtypeO(), osl::eval::Ptype_Eval_Table, osl::PTYPEO_MIN, table, osl::eval::ml::Weights::value(), and osl::WHITE.

Referenced by osl::eval::ml::OpenMidEndingEval::doResetWeights().

## value()

int osl::eval::ml::PieceEval::value | ( | PtypeO | ptypeO | ) |

static

Definition at line 88 of file ptypeEval.cc.

References osl::PTYPEO_MIN, and table.

Referenced by osl::eval::ml::OpenMidEndingEval::captureValue(), eval(), and evalWithUpdate().

## Member Data Documentation

## table

osl::CArray< int, osl::PTYPEO_SIZE > osl::eval::ml::PieceEval::table

static private

Definition at line 84 of file ptypeEval.h.

Referenced by eval(), evalWithUpdate(), setUp(), and value().

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

- ptypeEval.h
- ptypeEval.cc