osl::eval::ml::PieceStandY Class Reference

`#include <pieceStand.h>`

## Public Types

enum | { ONE_DIM = osl::Piece::SIZE * 9 , DIM = ONE_DIM * 2*EvalStages }

## Public Member Functions

template<osl::Player P>
osl::MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, const MultiInt &last_value)

## Static Public Member Functions

static void | setUp (const Weights &weights)
static MultiInt | eval (const NumEffectState &state)
template<Player P>
static MultiInt | evalWithUpdate (const NumEffectState &state, Move moved, const MultiInt &last_value)

## Static Private Member Functions

static int | index (Ptype ptype, Player player, Square king, int count)
static int | index (int i, Player player, Square king, int count)
static void | updateResult (NumEffectState const &state, MultiInt &result, int i, Ptype ptype, CArray< Square, 2 > const &kings)

## Static Private Attributes

static CArray< MultiInt, 360 > | y_attack_table
static CArray< MultiInt, 360 > | y_defense_table
static CArray< MultiInt, 9 *7 *19 > | y_attack_table_sum
static CArray< MultiInt, 9 *7 *19 > | y_defense_table_sum

## Detailed Description

Definition at line 115 of file eval/pieceStand.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 134 of file eval/pieceStand.h.

## Member Function Documentation

## eval()

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

static

Definition at line 358 of file eval_pieceStand.cc.

References osl::BISHOP, osl::BLACK, osl::GOLD, osl::SimpleState::kingSquare(), osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, osl::SILVER, updateResult(), and osl::WHITE.

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

## evalWithUpdate() [1/2]

template<osl::Player P>

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

Definition at line 377 of file eval_pieceStand.cc.

References osl::alt(), osl::BLACK, osl::Move::capturePtype(), osl::SimpleState::countPiecesOnStand(), eval(), index(), osl::Move::isCapture(), osl::Move::isDrop(), osl::KING, osl::SimpleState::kingSquare(), osl::Move::ptype(), osl::unpromote(), y_attack_table, and y_defense_table.

## evalWithUpdate() [2/2]

template<Player P>

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

static

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

## index() [1/2]

int osl::eval::ml::PieceStandY::index | ( | int | i,
|  | Player | player,
|  | Square | king,
|  | int | count )

inline static private

Definition at line 127 of file eval/pieceStand.h.

References osl::BLACK, and osl::Square::y().

## index() [2/2]

int osl::eval::ml::PieceStandY::index | ( | Ptype | ptype,
|  | Player | player,
|  | Square | king,
|  | int | count )

inline static private

Definition at line 122 of file eval/pieceStand.h.

References osl::BLACK, osl::Ptype_Table, and osl::Square::y().

Referenced by evalWithUpdate(), setUp(), and updateResult().

## setUp()

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

static

Definition at line 311 of file eval_pieceStand.cc.

References osl::BLACK, index(), osl::NStages, ONE_DIM, osl::PieceStand::order, osl::Ptype_Table, osl::eval::ml::Weights::value(), y_attack_table, y_attack_table_sum, y_defense_table, and y_defense_table_sum.

## updateResult()

void osl::eval::ml::PieceStandY::updateResult | ( | NumEffectState const & | state,
|  | osl::MultiInt & | result,
|  | int | i,
|  | osl::Ptype | ptype,
|  | CArray< Square, 2 > const & | kings )

inline static private

Definition at line 346 of file eval_pieceStand.cc.

References osl::BLACK, osl::SimpleState::countPiecesOnStand(), index(), osl::WHITE, y_attack_table_sum, and y_defense_table_sum.

Referenced by eval().

## Member Data Documentation

## y_attack_table

osl::CArray< osl::MultiInt, 360 > osl::eval::ml::PieceStandY::y_attack_table

static private

Definition at line 118 of file eval/pieceStand.h.

Referenced by evalWithUpdate(), and setUp().

## y_attack_table_sum

osl::CArray< osl::MultiInt, 9 *7 *19 > osl::eval::ml::PieceStandY::y_attack_table_sum

static private

Definition at line 120 of file eval/pieceStand.h.

Referenced by setUp(), and updateResult().

## y_defense_table

osl::CArray< osl::MultiInt, 360 > osl::eval::ml::PieceStandY::y_defense_table

static private

Definition at line 119 of file eval/pieceStand.h.

Referenced by evalWithUpdate(), and setUp().

## y_defense_table_sum

osl::CArray< osl::MultiInt, 9 *7 *19 > osl::eval::ml::PieceStandY::y_defense_table_sum

static private

Definition at line 121 of file eval/pieceStand.h.

Referenced by setUp(), and updateResult().

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

- eval/pieceStand.h
- eval_pieceStand.cc