osl::eval::ml::King8Effect Class Reference

`#include <king8.h>`

## Public Types

enum | { DIM = 32 + 32 + 288 + 288 }

## Static Public Member Functions

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

## Private Types

enum | EffectState { NOT_EMPTY = -1 , NO_EFFECT = 0 , LESS_EFFECT , MORE_EFFECT , MORE_EFFECT_KING_ONLY }

## Static Private Member Functions

static int | index (const Direction dir, EffectState state)
static int | indexY (Piece king, const Direction dir, EffectState state)
static void | effectState (const NumEffectState &state, const Player defense, const Direction dir, EffectState &empty, EffectState &)

## Static Private Attributes

static CArray< int, 32 > | empty_table
static CArray< int, 32 > | defense_table
static CArray< int, 288 > | empty_y_table
static CArray< int, 288 > | defense_y_table

## Detailed Description

Definition at line 18 of file core/osl/eval/king8.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
DIM |

Definition at line 21 of file core/osl/eval/king8.h.

## EffectState

enum osl::eval::ml::King8Effect::EffectState

private

Enumerator
NOT_EMPTY |
NO_EFFECT |
LESS_EFFECT |
MORE_EFFECT |
MORE_EFFECT_KING_ONLY |

Definition at line 25 of file core/osl/eval/king8.h.

## Member Function Documentation

## effectState()

void osl::eval::ml::King8Effect::effectState | ( | const NumEffectState & | state,
|  | const Player | defense,
|  | const Direction | dir,
|  | EffectState & | empty,
|  | EffectState & | defense )

static private

Definition at line 100 of file king8.cc.

References osl::alt(), osl::Board_Table, osl::NumEffectState::countEffect(), osl::Piece::isEmpty(), osl::SimpleState::kingSquare(), NO_EFFECT, NOT_EMPTY, and osl::SimpleState::pieceAt().

Referenced by eval().

## eval()

int osl::eval::ml::King8Effect::eval | ( | const NumEffectState & | state | ) |

static

Definition at line 40 of file king8.cc.

References osl::BLACK, defense_table, defense_y_table, effectState(), empty_table, empty_y_table, index(), indexY(), osl::SimpleState::kingPiece(), NOT_EMPTY, osl::SHORT8_DIRECTION_MAX, osl::SHORT8_DIRECTION_MIN, and osl::WHITE.

## index()

int osl::eval::ml::King8Effect::index | ( | const Direction | dir,
|  | EffectState | state )

static private

Definition at line 81 of file king8.cc.

Referenced by eval().

## indexY()

int osl::eval::ml::King8Effect::indexY | ( | Piece | king,
|  | const Direction | dir,
|  | EffectState | state )

static private

Definition at line 88 of file king8.cc.

Referenced by eval().

## setUp()

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

static

Definition at line 16 of file king8.cc.

References defense_table, defense_y_table, empty_table, empty_y_table, and osl::eval::ml::Weights::value().

## Member Data Documentation

## defense_table

osl::CArray< int, 32 > osl::eval::ml::King8Effect::defense_table

static private

Definition at line 34 of file core/osl/eval/king8.h.

Referenced by eval(), and setUp().

## defense_y_table

osl::CArray< int, 288 > osl::eval::ml::King8Effect::defense_y_table

static private

Definition at line 36 of file core/osl/eval/king8.h.

Referenced by eval(), and setUp().

## empty_table

osl::CArray< int, 32 > osl::eval::ml::King8Effect::empty_table

static private

Definition at line 33 of file core/osl/eval/king8.h.

Referenced by eval(), and setUp().

## empty_y_table

osl::CArray< int, 288 > osl::eval::ml::King8Effect::empty_y_table

static private

Definition at line 35 of file core/osl/eval/king8.h.

Referenced by eval(), and setUp().

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

- core/osl/eval/king8.h
- king8.cc