osl::eval::ml::PtypeCount Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | Friends | List of all members
osl::eval::ml::PtypeCount Class Reference

`#include <minorPiece.h>`

Collaboration diagram for osl::eval::ml::PtypeCount:
[legend]

## Public Types
enum | { ONE_DIM = 160, DIM = ONE_DIM * EvalStages }

## Public Member Functions
template<osl::Player P, osl::Ptype T>
MultiInt | evalPlayerPtype (const osl::CArray2d< int, 2, osl::PTYPE_SIZE > &ptype_count, const osl::CArray2d< int, 2, osl::PTYPE_SIZE > &ptype_board_count, const osl::CArray< int, 2 > &kings_x, const osl::CArray< int, 2 > &kings_y)
template<osl::Player P>
void | evalWithUpdateBang (const NumEffectState &state, Move last_move, CArray2d< int, 2, PTYPE_SIZE > &ptype_count, CArray2d< int, 2, PTYPE_SIZE > &ptype_board_count, MultiInt &last_value_and_out, unsigned int &ptypeo_mask)

## Static Public Member Functions
static void | setUp (const Weights &weights)
template<osl::Player P, osl::Ptype T>
static MultiInt | evalPlayerPtype (const CArray2d< int, 2, PTYPE_SIZE > &ptype_count, const CArray2d< int, 2, PTYPE_SIZE > &ptype_board_count, const osl::CArray< int, 2 > &kings_x, const osl::CArray< int, 2 > &kings_y)
static void | eval (const NumEffectState &state, const CArray2d< int, 2, PTYPE_SIZE > &ptype_count, const CArray2d< int, 2, PTYPE_SIZE > &ptype_board_count, MultiInt &out)
template<Player P>
static void | evalWithUpdateBang (const NumEffectState &state, Move last_move, CArray2d< int, 2, PTYPE_SIZE > &ptype_count, CArray2d< int, 2, PTYPE_SIZE > &ptype_board_count, MultiInt &last_value_and_out, unsigned int &ptypeo_mask)

## Static Private Member Functions
static int | indexCount (Ptype ptype, int count)
static int | indexBoardCount (Ptype ptype, int count)
static int | indexCountX (Ptype ptype, int count, int x)
static int | indexCountY (Ptype ptype, int count, int y)
static int | indexBoardCountX (Ptype ptype, int count, int x)
static int | indexBoardCountY (Ptype ptype, int count, int y)
template<Ptype T>
static int | indexCount (int count)
template<Ptype T>
static int | indexBoardCount (int count)
template<Ptype T>
static int | indexCountX (int count, int x)
template<Ptype T>
static int | indexCountY (int count, int y)
template<Ptype T>
static int | indexBoardCountX (int count, int x)
template<Ptype T>
static int | indexBoardCountY (int count, int y)
static MultiInt | valueAll (Ptype ptype, int count, int my_king_x, int my_king_y, int op_king_x, int op_king_y)
static MultiInt | valueBoardAll (Ptype ptype, int count, int my_king_x, int my_king_y, int op_king_x, int op_king_y)

## Static Private Attributes
static CArray< MultiInt, 160 > | table
static CArray< MultiInt, 2240 > | xy_table
static CArray< MultiInt, 2240 > | xy_attack_table
static CArray< MultiInt, 2240 > | xy_table_diff
static CArray< MultiInt, 2240 > | xy_attack_table_diff

## Friends
class | PtypeCountXY
class | PtypeCountXYAttack

## Detailed Description

Definition at line 1377 of file minorPiece.h.

## Member Enumeration Documentation

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 1382 of file minorPiece.h.

## Member Function Documentation

void osl::eval::ml::PtypeCount::eval | ( | const NumEffectState & | state,
|  | const CArray2d< int, 2, PTYPE_SIZE > & | ptype_count,
|  | const CArray2d< int, 2, PTYPE_SIZE > & | ptype_board_count,
|  | MultiInt & | out
| ) |  |
| static

Definition at line 1843 of file minorPiece.cc.

References osl::BLACK, and osl::WHITE.

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

template<osl::Player P, osl::Ptype T>

static MultiInt osl::eval::ml::PtypeCount::evalPlayerPtype | ( | const CArray2d< int, 2, PTYPE_SIZE > & | ptype_count,
|  | const CArray2d< int, 2, PTYPE_SIZE > & | ptype_board_count,
|  | const osl::CArray< int, 2 > & | kings_x,
|  | const osl::CArray< int, 2 > & | kings_y
| ) |  |
| static

template<osl::Player P, osl::Ptype T>

MultiInt osl::eval::ml::PtypeCount::evalPlayerPtype | ( | const osl::CArray2d< int, 2, osl::PTYPE_SIZE > & | ptype_count,
|  | const osl::CArray2d< int, 2, osl::PTYPE_SIZE > & | ptype_board_count,
|  | const osl::CArray< int, 2 > & | kings_x,
|  | const osl::CArray< int, 2 > & | kings_y
| ) |  |

Definition at line 1784 of file minorPiece.cc.

References osl::BLACK, and out.

template<Player P>

template void osl::eval::ml::PtypeCount::evalWithUpdateBang< WHITE > | ( | const NumEffectState & | state,
|  | Move | last_move,
|  | CArray2d< int, 2, PTYPE_SIZE > & | ptype_count,
|  | CArray2d< int, 2, PTYPE_SIZE > & | ptype_board_count,
|  | MultiInt & | last_value_and_out,
|  | unsigned int & | ptypeo_mask
| ) |  |
| static

template<osl::Player P>

void osl::eval::ml::PtypeCount::evalWithUpdateBang | ( | const NumEffectState & | state,
|  | Move | last_move,
|  | CArray2d< int, 2, PTYPE_SIZE > & | ptype_count,
|  | CArray2d< int, 2, PTYPE_SIZE > & | ptype_board_count,
|  | MultiInt & | last_value_and_out,
|  | unsigned int & | ptypeo_mask
| ) |  |

Definition at line 1888 of file minorPiece.cc.

References osl::BLACK, osl::captured(), osl::Move::capturePtype(), osl::Move::capturePtypeO(), count, osl::Move::isDrop(), osl::Move::isPromotion(), osl::KING, osl::Move::oldPtype(), osl::Move::oldPtypeO(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Move::ptypeO(), osl::PTYPEO_MIN, osl::unpromote(), and osl::WHITE.

static int osl::eval::ml::PtypeCount::indexBoardCount | ( | Ptype | ptype,
|  | int | count
| ) |  |
| inlinestaticprivate

Definition at line 1407 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexBoardCount | ( | int | count) |  |
| inlinestaticprivate

Definition at line 1448 of file minorPiece.h.

References osl::isPromoted().

static int osl::eval::ml::PtypeCount::indexBoardCountX | ( | Ptype | ptype,
|  | int | count,
|  | int | x
| ) |  |
| inlinestaticprivate

Definition at line 1427 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

Referenced by valueBoardAll().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexBoardCountX | ( | int | count,
|  | int | x
| ) |  |
| inlinestaticprivate

Definition at line 1468 of file minorPiece.h.

References osl::isPromoted().

static int osl::eval::ml::PtypeCount::indexBoardCountY | ( | Ptype | ptype,
|  | int | count,
|  | int | y
| ) |  |
| inlinestaticprivate

Definition at line 1434 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

Referenced by valueBoardAll().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexBoardCountY | ( | int | count,
|  | int | y
| ) |  |
| inlinestaticprivate

Definition at line 1475 of file minorPiece.h.

References osl::isPromoted().

static int osl::eval::ml::PtypeCount::indexCount | ( | Ptype | ptype,
|  | int | count
| ) |  |
| inlinestaticprivate

Definition at line 1401 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexCount | ( | int | count) |  |
| inlinestaticprivate

Definition at line 1442 of file minorPiece.h.

References osl::isPromoted().

static int osl::eval::ml::PtypeCount::indexCountX | ( | Ptype | ptype,
|  | int | count,
|  | int | x
| ) |  |
| inlinestaticprivate

Definition at line 1413 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

Referenced by valueAll().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexCountX | ( | int | count,
|  | int | x
| ) |  |
| inlinestaticprivate

Definition at line 1454 of file minorPiece.h.

References osl::isPromoted().

static int osl::eval::ml::PtypeCount::indexCountY | ( | Ptype | ptype,
|  | int | count,
|  | int | y
| ) |  |
| inlinestaticprivate

Definition at line 1420 of file minorPiece.h.

References osl::PtypeTable::getIndexMin(), osl::isPromoted(), osl::Ptype_Table, and osl::unpromote().

Referenced by valueAll().

template<Ptype T>

static int osl::eval::ml::PtypeCount::indexCountY | ( | int | count,
|  | int | y
| ) |  |
| inlinestaticprivate

Definition at line 1461 of file minorPiece.h.

References osl::isPromoted().

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

Definition at line 1701 of file minorPiece.cc.

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

static MultiInt osl::eval::ml::PtypeCount::valueAll | ( | Ptype | ptype,
|  | int | count,
|  | int | my_king_x,
|  | int | my_king_y,
|  | int | op_king_x,
|  | int | op_king_y
| ) |  |
| inlinestaticprivate

Definition at line 1481 of file minorPiece.h.

References indexCountX(), indexCountY(), xy_attack_table_diff, and xy_table_diff.

static MultiInt osl::eval::ml::PtypeCount::valueBoardAll | ( | Ptype | ptype,
|  | int | count,
|  | int | my_king_x,
|  | int | my_king_y,
|  | int | op_king_x,
|  | int | op_king_y
| ) |  |
| inlinestaticprivate

Definition at line 1490 of file minorPiece.h.

References indexBoardCountX(), indexBoardCountY(), xy_attack_table_diff, and xy_table_diff.

## Friends And Related Function Documentation

friend class PtypeCountXY
| friend

Definition at line 1379 of file minorPiece.h.

friend class PtypeCountXYAttack
| friend

Definition at line 1380 of file minorPiece.h.

## Member Data Documentation

osl::misc::CArray< MultiInt, 160 > osl::eval::ml::PtypeCount::table
| staticprivate

Definition at line 1499 of file minorPiece.h.

Referenced by osl::eval::ml::PtypeCountXY::setUp().

osl::misc::CArray< MultiInt, 2240 > osl::eval::ml::PtypeCount::xy_attack_table
| staticprivate

Definition at line 1501 of file minorPiece.h.

Referenced by osl::eval::ml::PtypeCountXYAttack::setUp().

osl::misc::CArray< MultiInt, 2240 > osl::eval::ml::PtypeCount::xy_attack_table_diff
| staticprivate

Definition at line 1503 of file minorPiece.h.

Referenced by osl::eval::ml::PtypeCountXYAttack::setUp(), valueAll(), and valueBoardAll().

osl::misc::CArray< MultiInt, 2240 > osl::eval::ml::PtypeCount::xy_table
| staticprivate

Definition at line 1500 of file minorPiece.h.

Referenced by osl::eval::ml::PtypeCountXY::setUp().

osl::misc::CArray< MultiInt, 2240 > osl::eval::ml::PtypeCount::xy_table_diff
| staticprivate

Definition at line 1502 of file minorPiece.h.

Referenced by osl::eval::ml::PtypeCountXY::setUp(), valueAll(), and valueBoardAll().

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

- minorPiece.h
- minorPiece.cc