osl::eval::ml::SilverFeatures Class Reference

`#include <minorPiece.h>`

Inheritance diagram for osl::eval::ml::SilverFeatures:

## Static Public Member Functions

static MultiInt | eval (const NumEffectState &state)

## Static Protected Member Functions

template<Player P>
static int | indexRetreat (Square pos)
template<Player P>
static bool | canRetreat (const NumEffectState &state, const Piece silver)
template<Player P>
static MultiInt | evalOne (const NumEffectState &state, const Piece silver, const CArray< Square, 2 > &kings)

## Static Protected Attributes

static CArray< MultiInt, 153 > | head_table
static CArray< MultiInt, 9 > | retreat_table

## Detailed Description

Definition at line 539 of file minorPiece.h.

## Member Function Documentation

## canRetreat()

template<osl::Player P>

bool osl::eval::ml::SilverFeatures::canRetreat | ( | const NumEffectState & | state,
|  | const Piece | silver )

inline static protected

Definition at line 334 of file minorPiece.cc.

References osl::alt(), osl::BLACK, osl::Piece::canMoveOn(), osl::NumEffectState::hasEffectAt(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::Piece::square(), osl::WHITE, and osl::Square::y().

Referenced by evalOne().

## eval()

osl::MultiInt osl::eval::ml::SilverFeatures::eval | ( | const NumEffectState & | state | ) |

static

Definition at line 311 of file minorPiece.cc.

References osl::BLACK, evalOne(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::kingSquare(), osl::Piece::owner(), osl::SimpleState::pieceOf(), and osl::WHITE.

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

## evalOne()

template<Player P>

MultiInt osl::eval::ml::SilverFeatures::evalOne | ( | const NumEffectState & | state,
|  | const Piece | silver,
|  | const CArray< Square, 2 > & | kings )

inline static protected

Definition at line 553 of file minorPiece.h.

References osl::alt(), osl::BLACK, canRetreat(), osl::NumEffectState::hasEffectByPtypeStrict(), head_table, indexRetreat(), osl::Piece::isEmpty(), osl::Square::isOnBoard(), osl::SimpleState::isPawnMaskSet(), osl::PAWN, osl::SimpleState::pieceAt(), retreat_table, osl::Piece::square(), osl::Square::x(), and osl::Square::y().

Referenced by eval().

## indexRetreat()

template<Player P>

int osl::eval::ml::SilverFeatures::indexRetreat | ( | Square | pos | ) |

inline static protected

Definition at line 545 of file minorPiece.h.

References osl::BLACK, and osl::Square::y().

Referenced by evalOne().

## Member Data Documentation

## head_table

osl::CArray< osl::MultiInt, 153 > osl::eval::ml::SilverFeatures::head_table

static protected

Definition at line 581 of file minorPiece.h.

Referenced by evalOne(), and osl::eval::ml::SilverHeadPawnKingRelative::setUp().

## retreat_table

osl::CArray< osl::MultiInt, 9 > osl::eval::ml::SilverFeatures::retreat_table

static protected

Definition at line 582 of file minorPiece.h.

Referenced by evalOne(), and osl::eval::ml::SilverRetreat::setUp().

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

- minorPiece.h
- minorPiece.cc