osl::move_probability::PawnAttack Class Reference

`#include <feature.h>`

Inheritance diagram for osl::move_probability::PawnAttack:

## Public Types

enum | { PTYPE2_DIM = PTYPE_SIZE*2*PTYPE_SIZE*2*2 , EFFECT_DIM = PTYPE_SIZE*2*8*9 , BasicSize = PTYPE2_DIM+EFFECT_DIM , PawnSize = BasicSize*3 , DIM = PawnSize*2 }

## Public Member Functions

| PawnAttack ()
std::pair< int, int > | squareStatus (const NumEffectState &state, Player player, Square to, Square &front) const
double | matchPtype (const StateInfo &state, const MoveInfo &move, int offset, const double *w) const
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

## Additional Inherited Members

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 637 of file move_probability/feature.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
PTYPE2_DIM |
EFFECT_DIM |
BasicSize |
PawnSize |
DIM |

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

## Constructor & Destructor Documentation

## PawnAttack()

osl::move_probability::PawnAttack::PawnAttack | ( |  | ) |

inline

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

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

## Member Function Documentation

## match()

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

inline virtual

Implements osl::move_probability::Feature.

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

References osl::SimpleState::canDropPawnTo(), osl::LANCE, matchPtype(), osl::move_probability::MoveInfo::move, osl::PAWN, PawnSize, osl::move_probability::MoveInfo::player, osl::Move::ptype(), osl::move_probability::StateInfo::state, osl::Move::to(), and osl::Square::x().

## matchPtype()

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

inline

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

References osl::alt(), BasicSize, osl::Square::canPromote(), osl::move_probability::Feature::classifyEffect9(), osl::Move::isDrop(), osl::move_probability::MoveInfo::move, osl::move_probability::MoveInfo::player, osl::PTYPE_SIZE, osl::Square::squareForBlack(), squareStatus(), osl::move_probability::StateInfo::state, osl::Move::to(), and osl::Square::y().

Referenced by match().

## squareStatus()

std::pair< int, int > osl::move_probability::PawnAttack::squareStatus | ( | const NumEffectState & | state,
|  | Player | player,
|  | Square | to,
|  | Square & | front ) const

inline

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

References osl::BLACK, osl::Piece::isEdge(), osl::Piece::isPiece(), osl::Piece::owner(), osl::SimpleState::pieceAt(), osl::Piece::ptype(), and osl::PTYPE_SIZE.

Referenced by matchPtype().

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

- move_probability/feature.h