osl::move_probability::BreakThreatmate Class Reference

`#include <feature.h>`

Inheritance diagram for osl::move_probability::BreakThreatmate:

## Public Types

enum

{
PatternCacheSize = PatternCommon::PatternCacheSize , AddEffectSize = PTYPE_SIZE * PatternCacheSize , OpenRoadSize = PTYPE_SIZE * PatternCacheSize , OpenRoadBase = AddEffectSize ,
KingMoveSize = PatternCacheSize , KingMoveBase = OpenRoadBase + OpenRoadSize , CaptureSize = PTYPE_SIZE*PTYPE_SIZE , CaptureBase = KingMoveBase + KingMoveSize ,
AddEffect8Size = PTYPE_SIZE*PatternCacheSize , AddEffect8Base = CaptureBase + CaptureSize , OtherMoveSize = 1 , OtherMoveBase = AddEffect8Base + AddEffect8Size ,
DIM = OtherMoveBase + OtherMoveSize
}

## Public Member Functions

| BreakThreatmate ()
double | match (const StateInfo &info, 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 bool | isKingMove (Move move)
static bool | isOpeningKingRoad (Move move, Square king)
static bool | isDefendingThreatmate (Move move, Move threatmate, const NumEffectState &state)
static bool | isDefendingKing8 (Move move, Square king, const NumEffectState &state)
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 1022 of file move_probability/feature.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
PatternCacheSize |
AddEffectSize |
OpenRoadSize |
OpenRoadBase |
KingMoveSize |
KingMoveBase |
CaptureSize |
CaptureBase |
AddEffect8Size |
AddEffect8Base |
OtherMoveSize |
OtherMoveBase |
DIM |

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

## Constructor & Destructor Documentation

## BreakThreatmate()

osl::move_probability::BreakThreatmate::BreakThreatmate | ( |  | ) |

inline

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

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

## Member Function Documentation

## isDefendingKing8()

bool osl::move_probability::BreakThreatmate::isDefendingKing8 | ( | Move | move,
|  | Square | king,
|  | const NumEffectState & | state )

inline static

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

References osl::alt(), osl::misc::GeneralMask< Integer >::any(), osl::Neighboring8Direct::hasEffect(), osl::NumEffectState::longEffectAt(), osl::SimpleState::pieceOf(), osl::Move::ptypeO(), osl::Piece::ptypeO(), osl::Piece::square(), osl::misc::GeneralMask< Integer >::takeOneBit(), osl::Move::to(), and osl::SimpleState::turn().

Referenced by match().

## isDefendingThreatmate()

bool osl::move_probability::BreakThreatmate::isDefendingThreatmate | ( | Move | move,
|  | Move | threatmate,
|  | const NumEffectState & | state )

inline static

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

References osl::Move::from(), osl::NumEffectState::hasEffectIf(), osl::Move::isDrop(), osl::SimpleState::isEmptyBetween(), osl::Ptype_Table, osl::Move::ptypeO(), and osl::Move::to().

Referenced by match().

## isKingMove()

bool osl::move_probability::BreakThreatmate::isKingMove | ( | Move | move | ) |

inline static

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

References osl::KING, and osl::Move::ptype().

Referenced by match().

## isOpeningKingRoad()

bool osl::move_probability::BreakThreatmate::isOpeningKingRoad | ( | Move | move,
|  | Square | king )

inline static

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

References osl::Move::from(), osl::Move::isDrop(), and osl::Square::isNeighboring8().

Referenced by match().

## match()

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

inline virtual

Implements osl::move_probability::Feature.

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

References AddEffect8Base, CaptureBase, osl::captured(), osl::Neighboring8Direct::hasEffect(), osl::Square::index(), isDefendingKing8(), isDefendingThreatmate(), isKingMove(), osl::Move::isNormal(), isOpeningKingRoad(), KingMoveBase, osl::SimpleState::kingSquare(), osl::move_probability::MoveInfo::move, OpenRoadBase, OtherMoveBase, osl::move_probability::StateInfo::pattern_cache, PatternCacheSize, osl::SimpleState::pieceOnBoard(), osl::move_probability::MoveInfo::player, osl::Move::ptype(), osl::PTYPE_EDGE, osl::PTYPE_SIZE, osl::ptypeOIndex(), osl::CArray< T, Capacity >::size(), osl::move_probability::PatternCommon::SquareDim, osl::move_probability::StateInfo::state, osl::move_probability::StateInfo::threatmate_move, and osl::Move::to().

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

- move_probability/feature.h