osl::eval::ml::SilverFork Class Reference

`#include <minorPiece.h>`

## Public Types

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

## Static Public Member Functions

static void | setUp (const Weights &weights)
static MultiIntPair | eval (const NumEffectState &state, CArray< std::pair< Square, int >, 2 > &silver_drop)

## Static Public Attributes

static CArray< MultiInt, ONE_DIM > | table

## Static Private Member Functions

static std::pair< int, int > | matchRook (const NumEffectState &state, Piece rook, const CArray< bool, 2 > &has_silver, Square &silver_drop)
static std::pair< int, int > | matchGold (const NumEffectState &state, Piece gold, const CArray< bool, 2 > &has_silver, Square &silver_drop)

## Detailed Description

Definition at line 1623 of file minorPiece.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 1632 of file minorPiece.h.

## Member Function Documentation

## eval()

osl::MultiIntPair osl::eval::ml::SilverFork::eval | ( | const NumEffectState & | state,
|  | CArray< std::pair< Square, int >, 2 > & | silver_drop )

static

Definition at line 2368 of file minorPiece.cc.

References osl::BLACK, osl::SimpleState::hasPieceOnStand(), matchGold(), matchRook(), osl::SimpleState::pieceOf(), osl::SILVER, table, and osl::WHITE.

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

## matchGold()

std::pair< int, int > osl::eval::ml::SilverFork::matchGold | ( | const NumEffectState & | state,
|  | Piece | gold,
|  | const CArray< bool, 2 > & | has_silver,
|  | Square & | silver_drop )

inline static private

Definition at line 2332 of file minorPiece.cc.

References osl::alt(), osl::BLACK, osl::Board_Table, osl::Piece::canMoveOn(), osl::Square::canPromote(), osl::D, osl::GOLD, osl::NumEffectState::hasEffectAt(), osl::Piece::isEdge(), osl::Piece::isEmpty(), osl::Piece::isOnBoardByOwner(), osl::Square::isPieceStand(), osl::L, osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::Piece::ptype(), osl::R, osl::ROOK, osl::sign(), osl::CArray< T, Capacity >::size(), and osl::Piece::square().

Referenced by eval().

## matchRook()

std::pair< int, int > osl::eval::ml::SilverFork::matchRook | ( | const NumEffectState & | state,
|  | Piece | rook,
|  | const CArray< bool, 2 > & | has_silver,
|  | Square & | silver_drop )

inline static private

Definition at line 2302 of file minorPiece.cc.

References osl::alt(), osl::Board_Table, osl::Square::canPromote(), osl::GOLD, osl::NumEffectState::hasEffectAt(), osl::Piece::isEmpty(), osl::Piece::isOnBoardByOwner(), osl::Square::isPieceStand(), osl::Piece::isPromoted(), osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::Piece::ptype(), osl::ROOK, osl::sign(), osl::CArray< T, Capacity >::size(), osl::Piece::square(), osl::UL, and osl::UR.

Referenced by eval().

## setUp()

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

static

Definition at line 2432 of file minorPiece.cc.

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

## Member Data Documentation

## table

osl::CArray< osl::MultiInt, 5 *2 > osl::eval::ml::SilverFork::table

static

Definition at line 1636 of file minorPiece.h.

Referenced by eval(), and setUp().

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

- minorPiece.h
- minorPiece.cc