osl::eval::ml::KingPieceRelativeNoSupport Class Reference

`#include <kingTable.h>`

## Public Types

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

## Static Public Member Functions

static MultiInt | eval (const NumEffectState &state)
static MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, const CArray< PieceMask, 2 > &effected_mask, const MultiInt &last_values)
static void | setUp (const Weights &weights)
template<int Sign>
static void | adjust (int attack, int defense, MultiInt &out)

## Static Private Member Functions

static int | index (const Player player, const Square king, const Ptype ptype, const Square pos)
static int | index (const Player player, const Square king, const Piece piece)

## Static Private Attributes

static CArray< MultiInt, ONE_DIM > | table

## Detailed Description

Definition at line 63 of file kingTable.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 66 of file kingTable.h.

## Member Function Documentation

## adjust()

template<int Sign>

void osl::eval::ml::KingPieceRelativeNoSupport::adjust | ( | int | attack,
|  | int | defense,
|  | MultiInt & | out )

inline static

Definition at line 136 of file kingTable.cc.

References table.

Referenced by eval(), and evalWithUpdate().

## eval()

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

static

Definition at line 145 of file kingTable.cc.

References adjust(), osl::PieceMask::any(), osl::BLACK, index(), osl::KingTraits< T >::index, osl::SimpleState::kingSquare(), ONE_DIM, osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::PieceMask::reset(), osl::container::PieceMask64::takeOneBit(), and osl::WHITE.

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

## evalWithUpdate()

MultiInt osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate | ( | const NumEffectState & | state,
|  | Move | moved,
|  | const CArray< PieceMask, 2 > & | effected_mask,
|  | const MultiInt & | last_values )

static

Definition at line 178 of file kingTable.cc.

References adjust(), osl::alt(), osl::PieceMask::any(), osl::BLACK, osl::captured(), osl::Move::capturePtype(), osl::NumEffectState::effectedMask(), eval(), osl::Move::from(), index(), osl::KingTraits< T >::index, osl::Move::isDrop(), osl::KING, osl::SimpleState::kingSquare(), osl::Piece::number(), osl::Move::oldPtype(), ONE_DIM, osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::SimpleState::pieceOf(), osl::NumEffectState::piecesOnBoard(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::PieceMask::reset(), osl::container::PieceMask64::takeOneBit(), osl::Move::to(), and osl::WHITE.

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

## index() [1/2]

int osl::eval::ml::KingPieceRelativeNoSupport::index | ( | const Player | player,
|  | const Square | king,
|  | const Piece | piece )

inline static private

Definition at line 85 of file kingTable.h.

References index(), osl::Piece::ptype(), and osl::Piece::square().

## index() [2/2]

int osl::eval::ml::KingPieceRelativeNoSupport::index | ( | const Player | player,
|  | const Square | king,
|  | const Ptype | ptype,
|  | const Square | pos )

inline static private

Definition at line 77 of file kingTable.h.

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

Referenced by eval(), evalWithUpdate(), and index().

## setUp()

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

static

Definition at line 125 of file kingTable.cc.

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

## Member Data Documentation

## table

osl::CArray< MultiInt, osl::eval::ml::KingPieceRelativeNoSupport::ONE_DIM > osl::eval::ml::KingPieceRelativeNoSupport::table

static private

Definition at line 90 of file kingTable.h.

Referenced by adjust(), and setUp().

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

- kingTable.h
- kingTable.cc