osl::eval::ml::RookPromoteDefense 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 | Static Public Member Functions | Static Private Attributes | Friends | List of all members
osl::eval::ml::RookPromoteDefense Class Reference

`#include <majorPiece.h>`

Inheritance diagram for osl::eval::ml::RookPromoteDefense:
[legend]
Collaboration diagram for osl::eval::ml::RookPromoteDefense:
[legend]

## Public Types
enum | { ONE_DIM = 256, DIM = ONE_DIM * EvalStages }
Public Types inherited from osl::eval::ml::RookEffectBase
enum | { ONE_DIM = 612, DIM = ONE_DIM * 2 }

## Static Public Member Functions
static void | setUp (const Weights &weights)
static MultiInt | eval (const NumEffectState &state)
Static Public Member Functions inherited from osl::eval::ml::RookEffectBase
static MultiInt | eval (const NumEffectState &state)

## Static Private Attributes
static CArray< MultiInt, 256 > | promote_defense_table
static CArray< MultiInt, 144 > | promote_defense_rook_table

## Friends
class | RookPromoteDefenseRookH

## Additional Inherited Members
Public Member Functions inherited from osl::eval::ml::RookEffectBase
template<osl::Player P>
MultiInt | evalOne (const NumEffectState &state, Square rook, Square myKing, Square opKing, Square up, Square dp, Square rp, Square lp, bool isP)
Static Protected Member Functions inherited from osl::eval::ml::RookEffectBase
template<Player P>
static MultiInt | evalOne (const NumEffectState &state, Square rook, Square myKing, Square opKing, Square up, Square dp, Square rp, Square lp, bool isP)
static int | index (int abs_x_diff, int y_diff, bool horizontal, bool is_promoted)
| (abs_x_diff, y_diff) - 玉を原点とした時の空マスの相対位置 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合 More...
static int | index0 (int abs_x_diff, int y_diff, PtypeO ptypeO, bool horizontal, bool promoted)
| 黒の飛車(竜)から利きのある駒 (abs_x_diff, y_diff) - 駒を基準にした玉の相対位置 abs_x_diffは絶対値 ptypeO - 駒のptypeO, 白からの場合は反転 horizontal - 飛車の横利きがある場合 is_promoted - 竜の場合 More...
static int | index1 (Square king, Square from, PtypeO ptypeO, bool isP)
| 黒の飛車(竜)からの利きのある駒のindex {attack,defense}_{u,r,l,d} へのアクセスに使う from - 駒の位置 king - 玉の位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 竜の場合 More...
static int | index1 (int x_diff, int y_diff, PtypeO ptypeO, bool isP)
| 黒の飛車(竜)からの利きのある駒のindex {attack,defense}_{u,r,l,d} へのアクセスに使う (x_diff, y_diff) - 玉を基準に見た駒の相対位置 ptypeO - 駒の種類，白からの利きの場合は反転． (BLACK,PTYPE_EDGE)もあり得る isP - 竜の場合 More...
static int | index2 (Square king, Square from, bool isP)
| 黒の飛車(竜)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス king - 玉の位置 from - 飛車(竜)の位置 isP - 竜の場合 More...
static int | index2 (int x_diff, int y_diff, bool isP)
| 黒の飛車(竜)がある場所は空マスでないのでその分を補正するテーブル {attack,defense}_nospace へのアクセス (x_diff, y_diff) - 玉を基準にしてみた飛車(竜)の相対位置 isP - 竜の場合 More...
Static Protected Attributes inherited from osl::eval::ml::RookEffectBase
static CArray< MultiInt, 612 > | attack_table
static CArray< MultiInt, 612 > | defense_table
static CArray< MultiInt, 32 > | piece_table
static CArray< MultiInt, 23104 > | attack_u
static CArray< MultiInt, 23104 > | attack_d
static CArray< MultiInt, 23104 > | attack_l
static CArray< MultiInt, 23104 > | attack_r
static CArray< MultiInt, 23104 > | defense_u
static CArray< MultiInt, 23104 > | defense_d
static CArray< MultiInt, 23104 > | defense_l
static CArray< MultiInt, 23104 > | defense_r
static CArray< MultiInt, 722 > | attack_nospace
static CArray< MultiInt, 722 > | defense_nospace

## Detailed Description

Definition at line 288 of file majorPiece.h.

## Member Enumeration Documentation

anonymous enum

Enumerator
ONE_DIM |
DIM |

Definition at line 292 of file majorPiece.h.

## Member Function Documentation

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

Definition at line 399 of file majorPiece.cc.

References osl::BLACK, osl::Piece::canMoveOn(), osl::D, osl::Piece::isOnBoardNotPromoted(), osl::Piece::owner(), osl::Piece::ptype(), result, osl::ROOK, osl::Piece::square(), osl::U, osl::WHITE, osl::Square::x(), and osl::Square::y().

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

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

Definition at line 379 of file majorPiece.cc.

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

## Friends And Related Function Documentation

friend class RookPromoteDefenseRookH
| friend

Definition at line 290 of file majorPiece.h.

## Member Data Documentation

osl::misc::CArray< MultiInt, 144 > osl::eval::ml::RookPromoteDefense::promote_defense_rook_table
| staticprivate

Definition at line 297 of file majorPiece.h.

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

osl::misc::CArray< MultiInt, 256 > osl::eval::ml::RookPromoteDefense::promote_defense_table
| staticprivate

Definition at line 296 of file majorPiece.h.

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

- majorPiece.h
- majorPiece.cc