osl::eval::ml::NonPawnAttackedPtype Class Reference

`#include <minorPiece.h>`

## Public Types

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

## Static Public Member Functions

static void | setUp (const Weights &weights)
static void | eval (const NumEffectState &state, CArray< PieceMask, 40 > &attacked_mask, MultiIntPair &out)
template<Player P>
static void | evalWithUpdateBang (const NumEffectState &state, Move moved, const CArray< PieceMask, 2 > &effected_mask, CArray< PieceMask, 40 > &attacked_mask, MultiIntPair &last_value_and_out)

## Static Private Member Functions

static int | index (bool same_turn, bool has_support, Ptype ptype, Ptype attack_ptype)
template<int Sign>
static void | adjust (int black, int white, MultiIntPair &result)
template<bool Plus>
static void | evalOnePiece (const Player player, const Ptype ptype, const Ptype attack_ptype, bool with_support, MultiIntPair &result)
template<Player P>
static void | updateChanged (const NumEffectState &state, const Piece p, Move moved, int captured_number, const CArray< PieceMask, 2 > &effected_mask, const CArray< PieceMask, 2 > &new_mask, CArray< PieceMask, 40 > &attacked_mask, MultiIntPair &result)

## Static Private Attributes

static CArray< MultiInt, 1024 > | table

## Detailed Description

Definition at line 1099 of file minorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 1102 of file minorPiece.h.

## Member Function Documentation

## adjust()

template<int Sign>

void osl::eval::ml::NonPawnAttackedPtype::adjust | ( | int | black,
|  | int | white,
|  | MultiIntPair & | result )

inline static private

Definition at line 1122 of file minorPiece.h.

References osl::BLACK, table, and osl::WHITE.

Referenced by eval(), and evalOnePiece().

## eval()

void osl::eval::ml::NonPawnAttackedPtype::eval | ( | const NumEffectState & | state,
|  | CArray< PieceMask, 40 > & | attacked_mask,
|  | MultiIntPair & | out )

static

Definition at line 1451 of file minorPiece.cc.

References adjust(), osl::PieceMask::any(), osl::BLACK, osl::PieceMask::clearBit(), osl::NumEffectState::effectedMask(), osl::NumEffectState::effectSetAt(), osl::PieceMask::getMask(), index(), osl::KingTraits< T >::index, osl::Piece::number(), osl::PieceMask::orMask(), osl::PAWN, osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::NumEffectState::promotedPieces(), osl::Piece::ptype(), osl::PieceMask::reset(), osl::PieceMask::selectBit(), osl::Piece::square(), osl::container::PieceMask64::takeOneBit(), osl::PieceMask::test(), and osl::WHITE.

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

## evalOnePiece()

template<bool Plus>

void osl::eval::ml::NonPawnAttackedPtype::evalOnePiece | ( | const Player | player,
|  | const Ptype | ptype,
|  | const Ptype | attack_ptype,
|  | bool | with_support,
|  | MultiIntPair & | result )

inline static private

Definition at line 1134 of file minorPiece.h.

References adjust(), osl::BLACK, index(), and osl::WHITE.

Referenced by evalWithUpdateBang(), and updateChanged().

## evalWithUpdateBang()

template<osl::Player P>

template void osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang< WHITE > | ( | const NumEffectState & | state,
|  | Move | moved,
|  | const CArray< PieceMask, 2 > & | effected_mask,
|  | CArray< PieceMask, 40 > & | attacked_mask,
|  | MultiIntPair & | last_value_and_out )

static

Definition at line 1505 of file minorPiece.cc.

References osl::alt(), osl::PieceMask::any(), osl::BLACK, osl::captured(), osl::Move::capturePtype(), osl::NumEffectState::effectedMask(), osl::NumEffectState::effectSetAt(), evalOnePiece(), osl::Move::isDrop(), osl::KING, osl::Move::oldPtype(), osl::PAWN, osl::SimpleState::pieceAt(), osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::Move::player(), osl::NumEffectState::promotedPieces(), osl::Piece::ptype(), osl::PTYPE_EMPTY, osl::PieceMask::reset(), osl::container::PieceMask64::takeOneBit(), osl::PieceMask::test(), osl::Move::to(), updateChanged(), and osl::WHITE.

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

## index()

int osl::eval::ml::NonPawnAttackedPtype::index | ( | bool | same_turn,
|  | bool | has_support,
|  | Ptype | ptype,
|  | Ptype | attack_ptype )

inline static private

Definition at line 1115 of file minorPiece.h.

References osl::PTYPE_SIZE.

Referenced by eval(), and evalOnePiece().

## setUp()

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

static

Definition at line 1441 of file minorPiece.cc.

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

## updateChanged()

template<Player P>

void osl::eval::ml::NonPawnAttackedPtype::updateChanged | ( | const NumEffectState & | state,
|  | const Piece | p,
|  | Move | moved,
|  | int | captured_number,
|  | const CArray< PieceMask, 2 > & | effected_mask,
|  | const CArray< PieceMask, 2 > & | new_mask,
|  | CArray< PieceMask, 40 > & | attacked_mask,
|  | MultiIntPair & | result )

inline static private

Definition at line 1150 of file minorPiece.h.

References osl::alt(), osl::PieceMask::any(), osl::Move::capturePtype(), osl::NumEffectState::effectedChanged(), osl::NumEffectState::effectSetAt(), evalOnePiece(), osl::Move::isPromotion(), osl::Piece::number(), osl::Move::oldPtype(), osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::Move::ptype(), osl::Piece::ptype(), osl::PieceMask::reset(), osl::Piece::square(), osl::container::PieceMask64::takeOneBit(), and osl::PieceMask::test().

Referenced by evalWithUpdateBang().

## Member Data Documentation

## table

osl::CArray< MultiInt, 1024 > osl::eval::ml::NonPawnAttackedPtype::table

static private

Definition at line 1344 of file minorPiece.h.

Referenced by adjust(), and setUp().

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

- minorPiece.h
- minorPiece.cc