osl::eval::ml::KingMobility Class Reference

`#include <kingTable.h>`

## Public Types

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

## Public Member Functions

template<osl::Player P>
osl::MultiInt | evalOne (const NumEffectState &state)

## Static Public Member Functions

static void | setUp (const Weights &weights)
static MultiInt | eval (const NumEffectState &state)

## Static Private Member Functions

template<Player P>
static MultiInt | evalOne (const NumEffectState &state)
template<Direction Dir>
static int | mobilityDir (Square king, Square target)

## Static Private Attributes

static CArray< MultiInt, 3240 > | table
static CArray< MultiInt, 3240 > | rook_table
static CArray< MultiInt, 3240 > | bishop_table
static CArray< MultiInt, 3240 > | rook_bishop_table

## Friends

class | KingMobilityWithRook
class | KingMobilityWithBishop

## Detailed Description

Definition at line 723 of file kingTable.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 728 of file kingTable.h.

## Member Function Documentation

## eval()

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

static

Definition at line 1533 of file kingTable.cc.

References evalOne().

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

## evalOne() [1/2]

template<osl::Player P>

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

Definition at line 1424 of file kingTable.cc.

References osl::alt(), osl::BISHOP, bishop_table, osl::BLACK, osl::D, osl::DL, osl::DR, osl::SimpleState::hasPieceOnStand(), osl::NumEffectState::kingMobilityAbs(), osl::SimpleState::kingSquare(), osl::L, mobilityDir(), osl::R, osl::ROOK, rook_bishop_table, rook_table, table, osl::U, osl::UL, osl::UR, osl::Square::x(), and osl::Square::y().

## evalOne() [2/2]

template<Player P>

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

static private

Referenced by eval().

## mobilityDir()

template<Direction Dir>

int osl::eval::ml::KingMobility::mobilityDir | ( | Square | king,
|  | Square | target )

inline static private

Definition at line 735 of file kingTable.h.

References osl::L, osl::R, osl::U, osl::UL, osl::UR, osl::Square::x(), and osl::Square::y().

Referenced by evalOne().

## setUp()

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

static

Definition at line 1358 of file kingTable.cc.

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

## Friends And Related Symbol Documentation

## KingMobilityWithBishop

friend class KingMobilityWithBishop

friend

Definition at line 726 of file kingTable.h.

References KingMobilityWithBishop.

Referenced by KingMobilityWithBishop.

## KingMobilityWithRook

friend class KingMobilityWithRook

friend

Definition at line 725 of file kingTable.h.

References KingMobilityWithRook.

Referenced by KingMobilityWithRook.

## Member Data Documentation

## bishop_table

osl::CArray< MultiInt, 3240 > osl::eval::ml::KingMobility::bishop_table

static private

Definition at line 744 of file kingTable.h.

Referenced by evalOne(), and osl::eval::ml::KingMobilityWithBishop::setUp().

## rook_bishop_table

osl::CArray< MultiInt, 3240 > osl::eval::ml::KingMobility::rook_bishop_table

static private

Definition at line 745 of file kingTable.h.

Referenced by evalOne(), and osl::eval::ml::KingMobilityWithBishop::setUp().

## rook_table

osl::CArray< MultiInt, 3240 > osl::eval::ml::KingMobility::rook_table

static private

Definition at line 743 of file kingTable.h.

Referenced by evalOne(), osl::eval::ml::KingMobilityWithBishop::setUp(), and osl::eval::ml::KingMobilityWithRook::setUp().

## table

osl::CArray< MultiInt, 3240 > osl::eval::ml::KingMobility::table

static private

Definition at line 742 of file kingTable.h.

Referenced by evalOne(), setUp(), and osl::eval::ml::KingMobilityWithBishop::setUp().

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

- kingTable.h
- kingTable.cc