osl::eval::ml::PromotedMinorPieces Class Reference

`#include <minorPiece.h>`

## Public Types

enum | { ONE_DIM = 9 , DIM = ONE_DIM * EvalStages }

## Static Public Member Functions

static void | setUp (const Weights &weights)
static MultiInt | eval (const NumEffectState &state)
static MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, const MultiInt &last_values)
template<int Sign>
static void | adjust (int index, int index_attack, int index_defense, MultiInt &result)

## Static Private Member Functions

template<Player P>
static void | evalOne (const NumEffectState &state, const PieceMask promoted, MultiInt &result)
template<bool attack, Player owner>
static int | indexY (const Square king, int x_diff)

## Static Private Attributes

static CArray< MultiInt, 9 > | table
static CArray< MultiInt, 162 > | y_table

## Friends

class | PromotedMinorPiecesY

## Detailed Description

Definition at line 881 of file minorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 885 of file minorPiece.h.

## Member Function Documentation

## adjust()

template<int Sign>

void osl::eval::ml::PromotedMinorPieces::adjust | ( | int | index,
|  | int | index_attack,
|  | int | index_defense,
|  | MultiInt & | result )

inline static

Definition at line 984 of file minorPiece.cc.

References table, and y_table.

Referenced by evalOne().

## eval()

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

static

Definition at line 1068 of file minorPiece.cc.

References osl::BISHOP, osl::PieceMask::clearBit(), evalOne(), osl::container::PieceMask64::none(), osl::NumEffectState::promotedPieces(), and osl::ROOK.

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

## evalOne()

template<osl::Player P>

void osl::eval::ml::PromotedMinorPieces::evalOne | ( | const NumEffectState & | state,
|  | const PieceMask | promoted,
|  | MultiInt & | result )

static private

Definition at line 994 of file minorPiece.cc.

References adjust(), osl::alt(), osl::PieceMask::any(), osl::BLACK, indexY(), osl::SimpleState::kingSquare(), osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::Piece::square(), osl::container::PieceMask64::takeOneBit(), and osl::Square::x().

Referenced by eval().

## evalWithUpdate()

MultiInt osl::eval::ml::PromotedMinorPieces::evalWithUpdate | ( | const NumEffectState & | state,
|  | Move | moved,
|  | const MultiInt & | last_values )

static

Definition at line 1083 of file minorPiece.cc.

References osl::captured(), osl::Move::capturePtype(), eval(), osl::isMajor(), osl::isPromoted(), osl::KING, osl::Move::ptype(), and osl::PTYPE_EMPTY.

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

## indexY()

template<bool attack, Player owner>

int osl::eval::ml::PromotedMinorPieces::indexY | ( | const Square | king,
|  | int | x_diff )

inline static private

Definition at line 901 of file minorPiece.h.

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

Referenced by evalOne().

## setUp()

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

static

Definition at line 963 of file minorPiece.cc.

References osl::NStages, ONE_DIM, table, and osl::eval::ml::Weights::value().

## Friends And Related Symbol Documentation

## PromotedMinorPiecesY

friend class PromotedMinorPiecesY

friend

Definition at line 883 of file minorPiece.h.

References PromotedMinorPiecesY.

Referenced by PromotedMinorPiecesY.

## Member Data Documentation

## table

osl::CArray< MultiInt, 9 > osl::eval::ml::PromotedMinorPieces::table

static private

Definition at line 906 of file minorPiece.h.

Referenced by adjust(), and setUp().

## y_table

osl::CArray< MultiInt, 162 > osl::eval::ml::PromotedMinorPieces::y_table

static private

Definition at line 907 of file minorPiece.h.

Referenced by adjust(), and osl::eval::ml::PromotedMinorPiecesY::setUp().

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

- minorPiece.h
- minorPiece.cc