osl::eval::ml::AttackMajorsInBase Class Reference

`#include <majorPiece.h>`

## Public Types

enum | { ONE_DIM = PTYPE_SIZE * PTYPE_SIZE * 2 * 2 * 2 , DIM = ONE_DIM * EvalStages }

## Static Public Member Functions

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

## Private Member Functions

size_t | maxActive () const

## Static Private Member Functions

static int | index (Ptype support, Ptype attack, bool has_gold, bool rook_support, bool bishop_support)
template<Player Owner>
static void | addOne (const NumEffectState &state, Piece rook, MultiInt &)

## Static Private Attributes

static CArray< MultiInt, ONE_DIM > | table

## Detailed Description

Definition at line 688 of file majorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 691 of file majorPiece.h.

## Member Function Documentation

## addOne()

template<osl::Player P>

void osl::eval::ml::AttackMajorsInBase::addOne | ( | const NumEffectState & | state,
|  | Piece | rook,
|  | MultiInt & | result )

static private

Definition at line 1438 of file majorPiece.cc.

References osl::alt(), osl::BISHOP, osl::BLACK, osl::NumEffectState::countEffect(), osl::NumEffectState::findCheapAttack(), osl::GOLD, osl::NumEffectState::hasEffectAt(), osl::NumEffectState::hasEffectNotBy(), osl::SimpleState::hasPieceOnStand(), index(), osl::Piece::isPlayerPtype(), osl::Offset::make(), osl::Square::neighbor(), osl::Piece::ptype(), osl::Piece::square(), osl::Square::squareForBlack(), table, osl::U, osl::UL, osl::UR, and osl::Square::y().

Referenced by eval().

## eval()

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

static

Definition at line 1482 of file majorPiece.cc.

References addOne(), osl::BLACK, osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::SimpleState::nth(), osl::SimpleState::nthLimit(), osl::Piece::owner(), and osl::ROOK.

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

## index()

int osl::eval::ml::AttackMajorsInBase::index | ( | Ptype | support,
|  | Ptype | attack,
|  | bool | has_gold,
|  | bool | rook_support,
|  | bool | bishop_support )

inline static private

Definition at line 700 of file majorPiece.h.

References osl::unpromoteSafe().

Referenced by addOne().

## maxActive()

size_t osl::eval::ml::AttackMajorsInBase::maxActive | ( |  | ) | const

inline private

Definition at line 699 of file majorPiece.h.

## setUp()

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

static

Definition at line 1426 of file majorPiece.cc.

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

## Member Data Documentation

## table

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

static private

Definition at line 698 of file majorPiece.h.

Referenced by addOne(), and setUp().

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

- majorPiece.h
- majorPiece.cc