osl::move_probability::BishopAttack Class Reference

`#include <feature.h>`

Inheritance diagram for osl::move_probability::BishopAttack:

## Public Types

enum | { PatternCacheSize = PatternCommon::PatternCacheSize , DIM = PatternCacheSize*2 }

## Public Member Functions

| BishopAttack ()
double | match (const StateInfo &state, const MoveInfo &move, int offset, const double *w) const
Public Member Functions inherited from osl::move_probability::Feature
| Feature (std::string n, size_t d)
virtual | ~Feature ()
std::string | name () const
size_t | dimension () const

## Static Public Member Functions

static double | addSquare (Square target, const StateInfo &info, int offset, const double *w)
template<Direction D, Ptype Type>
static double | addOne (const StateInfo &info, Square to, int offset, const double *w)
Static Public Member Functions inherited from osl::move_probability::Feature
static int | classifyEffect9 (const NumEffectState &state, Player player, Square to)

## Detailed Description

Definition at line 920 of file move_probability/feature.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
PatternCacheSize |
DIM |

Definition at line 923 of file move_probability/feature.h.

## Constructor & Destructor Documentation

## BishopAttack()

osl::move_probability::BishopAttack::BishopAttack | ( |  | ) |

inline

Definition at line 927 of file move_probability/feature.h.

References DIM, and osl::move_probability::Feature::Feature().

## Member Function Documentation

## addOne()

template<Direction D, Ptype Type>

double osl::move_probability::BishopAttack::addOne | ( | const StateInfo & | info,
|  | Square | to,
|  | int | offset,
|  | const double * | w )

inline static

Definition at line 945 of file move_probability/feature.h.

References addSquare(), osl::Piece::isEdge(), osl::Piece::isEmpty(), osl::Piece::isPiece(), osl::Piece::owner(), PatternCacheSize, osl::SimpleState::pieceAt(), osl::Piece::ptype(), osl::move_probability::StateInfo::state, and osl::SimpleState::turn().

Referenced by match(), and osl::move_probability::RookAttack::match().

## addSquare()

double osl::move_probability::BishopAttack::addSquare | ( | Square | target,
|  | const StateInfo & | info,
|  | int | offset,
|  | const double * | w )

inline static

Definition at line 930 of file move_probability/feature.h.

References osl::Square::index(), osl::move_probability::StateInfo::pattern_cache, and osl::CArray< T, Capacity >::size().

Referenced by addOne().

## match()

double osl::move_probability::BishopAttack::match | ( | const StateInfo & | state,
|  | const MoveInfo & | move,
|  | int | offset,
|  | const double * | w ) const

inline virtual

Implements osl::move_probability::Feature.

Definition at line 985 of file move_probability/feature.h.

References addOne(), osl::BISHOP, osl::move_probability::MoveInfo::move, osl::Move::ptype(), osl::Move::to(), and osl::unpromote().

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

- move_probability/feature.h