My Project
|
#include <feature.h>
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 |
![]() | |
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 int | classifyEffect9 (const NumEffectState &state, Player player, Square to) |
Definition at line 1022 of file move_probability/feature.h.
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.
|
inline |
Definition at line 1035 of file move_probability/feature.h.
|
inlinestatic |
Definition at line 1064 of file move_probability/feature.h.
References osl::alt(), osl::effect_util::Neighboring8Direct::hasEffect(), osl::NumEffectState::longEffectAt(), osl::SimpleState::pieceOf(), osl::Piece::ptypeO(), osl::Move::ptypeO(), osl::Piece::square(), osl::Move::to(), and osl::SimpleState::turn().
Referenced by match().
|
inlinestatic |
Definition at line 1047 of file move_probability/feature.h.
References osl::Move::from(), osl::PtypeTable::getEffect(), osl::EffectContent::hasEffect(), osl::NumEffectState::hasEffectIf(), osl::Move::isDrop(), osl::SimpleState::isEmptyBetween(), osl::EffectContent::offset(), osl::Ptype_Table, osl::Move::ptypeO(), and osl::Move::to().
Referenced by match().
|
inlinestatic |
Definition at line 1038 of file move_probability/feature.h.
References osl::KING, and osl::Move::ptype().
Referenced by match().
|
inlinestatic |
Definition at line 1042 of file move_probability/feature.h.
References osl::Move::from(), osl::Move::isDrop(), and osl::Square::isNeighboring8().
Referenced by match().
|
inlinevirtual |
Implements osl::move_probability::Feature.
Definition at line 1080 of file move_probability/feature.h.
References AddEffect8Base, CaptureBase, osl::captured(), osl::effect_util::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().