osl::eval::ml::KingPieceRelative Struct Reference

`#include <kingTable.h>`

## Public Types

enum | { DIM }
enum | { TABLE_DIM = DIM / 2 }
typedef CArray2d< MultiInt, PTYPE_SIZE, 17 *9 > | table_t

## Static Public Member Functions

static int | index (const NumEffectState &, Player owner, const Square position, Square king)
static int | index (const NumEffectState &state, Player owner, const Square position, bool same_king)
static int | index (const NumEffectState &state, PtypeO ptypeo, const Square position, bool same_king)
static int | index (const NumEffectState &state, const Piece piece, bool same_king)
static void | setUp (const Weights &weights, int stage)
static MultiInt | eval (const NumEffectState &state)
template<Player P>
static MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, const MultiInt &last_values)

## Static Public Attributes

static table_t | attack_table
static table_t | defense_table

## Detailed Description

Definition at line 17 of file kingTable.h.

## Member Typedef Documentation

## table_t

typedef CArray2d<MultiInt, PTYPE_SIZE, 17 * 9> osl::eval::ml::KingPieceRelative::table_t

Definition at line 19 of file kingTable.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
TABLE_DIM |

Definition at line 54 of file kingTable.h.

## anonymous enum

anonymous enum

Enumerator
DIM |

Definition at line 52 of file kingTable.h.

## Member Function Documentation

## eval()

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

static

Definition at line 26 of file kingTable.cc.

References attack_table, osl::BLACK, defense_table, index(), osl::Piece::isOnBoard(), osl::SimpleState::kingSquare(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::Piece::ptype(), osl::Piece::SIZE, osl::Piece::square(), and osl::WHITE.

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

## evalWithUpdate()

template<osl::Player P>

template MultiInt osl::eval::ml::KingPieceRelative::evalWithUpdate< WHITE > | ( | const NumEffectState & | state,
|  | Move | moved,
|  | const MultiInt & | last_values )

static

Definition at line 58 of file kingTable.cc.

References attack_table, osl::BLACK, osl::captured(), osl::Move::capturePtype(), osl::Move::capturePtypeO(), defense_table, eval(), osl::Move::from(), index(), osl::Move::isDrop(), osl::Move::isPass(), osl::KING, osl::Move::oldPtype(), osl::Move::oldPtypeO(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), and osl::Move::to().

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

## index() [1/4]

int osl::eval::ml::KingPieceRelative::index | ( | const NumEffectState & | ,
|  | Player | owner,
|  | const Square | position,
|  | Square | king )

inline static

Definition at line 21 of file kingTable.h.

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

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

## index() [2/4]

int osl::eval::ml::KingPieceRelative::index | ( | const NumEffectState & | state,
|  | const Piece | piece,
|  | bool | same_king )

inline static

Definition at line 46 of file kingTable.h.

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

## index() [3/4]

int osl::eval::ml::KingPieceRelative::index | ( | const NumEffectState & | state,
|  | Player | owner,
|  | const Square | position,
|  | bool | same_king )

inline static

Definition at line 30 of file kingTable.h.

References osl::alt(), index(), and osl::SimpleState::kingSquare().

## index() [4/4]

int osl::eval::ml::KingPieceRelative::index | ( | const NumEffectState & | state,
|  | PtypeO | ptypeo,
|  | const Square | position,
|  | bool | same_king )

inline static

Definition at line 39 of file kingTable.h.

References osl::getOwner(), and index().

## setUp()

void osl::eval::ml::KingPieceRelative::setUp | ( | const Weights & | weights,
|  | int | stage )

static

Definition at line 7 of file kingTable.cc.

References attack_table, defense_table, osl::PTYPE_MAX, osl::PTYPE_PIECE_MIN, TABLE_DIM, and osl::eval::ml::Weights::value().

## Member Data Documentation

## attack_table

osl::CArray2d< MultiInt, osl::PTYPE_SIZE, 17 *9 > osl::eval::ml::KingPieceRelative::attack_table

static

Definition at line 20 of file kingTable.h.

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

## defense_table

osl::CArray2d< MultiInt, osl::PTYPE_SIZE, 17 *9 > osl::eval::ml::KingPieceRelative::defense_table

static

Definition at line 20 of file kingTable.h.

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

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

- kingTable.h
- kingTable.cc