osl::eval::ml::King3Pieces Class Reference

`#include <kingTable.h>`

## Public Types

enum | { ONE_DIM = 3072 , 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 last_move, MultiInt &last_value)

## Private Types

enum | Direction { HORIZONTAL = 0 , VERTICAL , DIAGONAL }

## Static Private Member Functions

template<Player King, Direction Dir>
static int | index (PtypeO p1, PtypeO p2)
template<Player King, Direction Dir>
static int | indexY (const Square king_position, PtypeO p1, PtypeO p2)
template<Player King, Direction Dir>
static int | indexX (const Square king_position, PtypeO p1, PtypeO p2)
static MultiInt | value (int vertical_index, int horizontal_index, int diagonal_index1, int diagonal_index2, int vertical_index_x, int horizontal_index_x, int diagonal_index1_x, int diagonal_index2_x, int vertical_index_y, int horizontal_index_y, int diagonal_index1_y, int diagonal_index2_y)
template<Player King>
static void | evalOne (const NumEffectState &state, MultiInt &result)

## Static Private Attributes

static CArray< MultiInt, 3072 > | table
static CArray< MultiInt, 15360 > | x_table
static CArray< MultiInt, 27648 > | y_table

## Friends

class | King3PiecesXY

## Detailed Description

Definition at line 625 of file kingTable.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 629 of file kingTable.h.

## Direction

enum osl::eval::ml::King3Pieces::Direction

private

Enumerator
HORIZONTAL |
VERTICAL |
DIAGONAL |

Definition at line 636 of file kingTable.h.

## Member Function Documentation

## eval()

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

static

Definition at line 1310 of file kingTable.cc.

References evalOne().

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

## evalOne()

template<osl::Player King>

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

static private

Definition at line 1233 of file kingTable.cc.

References osl::BLACK, index(), indexX(), indexY(), osl::SimpleState::kingSquare(), osl::SimpleState::pieceAt(), osl::Piece::ptypeO(), and value().

Referenced by eval().

## evalWithUpdate()

MultiInt osl::eval::ml::King3Pieces::evalWithUpdate | ( | const NumEffectState & | state,
|  | Move | last_move,
|  | MultiInt & | last_value )

static

Definition at line 1319 of file kingTable.cc.

References osl::BLACK, eval(), osl::Move::from(), osl::Move::isDrop(), osl::SimpleState::kingSquare(), osl::Move::to(), osl::WHITE, osl::Square::x(), and osl::Square::y().

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

## index()

template<Player King, Direction Dir>

int osl::eval::ml::King3Pieces::index | ( | PtypeO | p1,
|  | PtypeO | p2 )

inline static private

Definition at line 643 of file kingTable.h.

References osl::altIfPiece(), osl::ptypeOIndex(), and osl::WHITE.

Referenced by evalOne().

## indexX()

template<Player King, Direction Dir>

int osl::eval::ml::King3Pieces::indexX | ( | const Square | king_position,
|  | PtypeO | p1,
|  | PtypeO | p2 )

inline static private

Definition at line 667 of file kingTable.h.

References osl::altIfPiece(), osl::BLACK, HORIZONTAL, osl::ptypeOIndex(), osl::WHITE, and osl::Square::x().

Referenced by evalOne().

## indexY()

template<Player King, Direction Dir>

int osl::eval::ml::King3Pieces::indexY | ( | const Square | king_position,
|  | PtypeO | p1,
|  | PtypeO | p2 )

inline static private

Definition at line 653 of file kingTable.h.

References osl::altIfPiece(), osl::BLACK, osl::ptypeOIndex(), osl::WHITE, and osl::Square::y().

Referenced by evalOne().

## setUp()

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

static

Definition at line 1209 of file kingTable.cc.

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

## value()

MultiInt osl::eval::ml::King3Pieces::value | ( | int | vertical_index,
|  | int | horizontal_index,
|  | int | diagonal_index1,
|  | int | diagonal_index2,
|  | int | vertical_index_x,
|  | int | horizontal_index_x,
|  | int | diagonal_index1_x,
|  | int | diagonal_index2_x,
|  | int | vertical_index_y,
|  | int | horizontal_index_y,
|  | int | diagonal_index1_y,
|  | int | diagonal_index2_y )

inline static private

Definition at line 687 of file kingTable.h.

References table, x_table, and y_table.

Referenced by evalOne().

## Friends And Related Symbol Documentation

## King3PiecesXY

friend class King3PiecesXY

friend

Definition at line 627 of file kingTable.h.

References King3PiecesXY.

Referenced by King3PiecesXY.

## Member Data Documentation

## table

osl::CArray< MultiInt, 3072 > osl::eval::ml::King3Pieces::table

static private

Definition at line 705 of file kingTable.h.

Referenced by setUp(), and value().

## x_table

osl::CArray< MultiInt, 15360 > osl::eval::ml::King3Pieces::x_table

static private

Definition at line 706 of file kingTable.h.

Referenced by osl::eval::ml::King3PiecesXY::setUp(), and value().

## y_table

osl::CArray< MultiInt, 27648 > osl::eval::ml::King3Pieces::y_table

static private

Definition at line 707 of file kingTable.h.

Referenced by osl::eval::ml::King3PiecesXY::setUp(), and value().

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

- kingTable.h
- kingTable.cc