#include <feature.h>
Public Types | |
enum | { SupportSize = PTYPE_SIZE, AttackSize = PTYPE_SIZE, AttackBase = SupportSize, EffectSize = 9, EffectBase = AttackBase+AttackSize, OpKingSize = 4, OpKingBase = EffectBase+EffectSize, MyKingSize = 3, MyKingBase = OpKingBase+OpKingSize, PromotionSize = 2, PromotionBase = MyKingBase+MyKingSize, PinOpenSize = 4, PinOpenBase = PromotionBase + PromotionSize, LastToSize = 4, LastToBase = PinOpenBase + PinOpenSize, LastEffectChangedSize = 6, LastEffectChangedBase = LastToBase + LastToSize, SquareDim = LastEffectChangedBase + LastEffectChangedSize, PatternCacheSize = PTYPEO_SIZE*SquareDim, OneDim = PTYPE_SIZE*PatternCacheSize } |
Public Member Functions | |
PatternCommon (const std::string &name, int dim) | |
double | addOne (const StateInfo &state, int offset, const double *w, Square position) const |
![]() | |
Feature (std::string n, size_t d) | |
virtual | ~Feature () |
std::string | name () const |
virtual double | match (const StateInfo &, const MoveInfo &, int offset, const double *) const =0 |
size_t | dimension () const |
Static Public Member Functions | |
static void | updateCache (StateInfo &info) |
![]() | |
static int | classifyEffect9 (const NumEffectState &state, Player player, Square to) |
Static Private Member Functions | |
static void | updateCacheOne (Square target, StateInfo &info) |
Definition at line 470 of file move_probability/feature.h.
anonymous enum |
Definition at line 473 of file move_probability/feature.h.
|
inline |
Definition at line 487 of file move_probability/feature.h.
|
inline |
Definition at line 490 of file move_probability/feature.h.
References osl::Square::index(), osl::Piece::isEdge(), osl::Square::isOnBoardRegion(), osl::move_probability::StateInfo::pattern_cache, osl::SimpleState::pieceAt(), osl::ptypeOIndex(), osl::CArray< T, Capacity >::size(), and osl::move_probability::StateInfo::state.
|
static |
Definition at line 14 of file feature_.cc.
References updateCacheOne().
Referenced by osl::move_probability::Feature::~Feature().
|
staticprivate |
Definition at line 25 of file feature_.cc.
References osl::alt(), osl::altIfPiece(), osl::move_probability::StateInfo::attack_shadow, AttackBase, osl::BLACK, osl::Square::canPromote(), osl::move_probability::StateInfo::changed_effects, osl::move_probability::Feature::classifyEffect9(), EffectBase, osl::CArray< T, Capacity >::fill(), osl::container::MoveStack::hasLastMove(), osl::move_probability::StateInfo::history, osl::Square::index(), osl::isPiece(), osl::Piece::isPiece(), osl::NumEffectState::king8Info(), osl::SimpleState::kingSquare(), osl::move_probability::StateInfo::last_add_effect, osl::move_probability::StateInfo::last_move_ptype5, LastEffectChangedBase, osl::container::MoveStack::lastMove(), LastToBase, osl::checkmate::King8Info::libertyCount(), MyKingBase, MyKingSize, osl::Piece::number(), OpKingBase, OpKingSize, osl::Piece::owner(), osl::move_probability::StateInfo::pattern_cache, PatternCacheSize, osl::SimpleState::pieceAt(), osl::move_probability::StateInfo::pin, PinOpenBase, osl::NumEffectState::pinOrOpen(), PromotionBase, osl::PTYPE_BASIC_MIN, osl::PTYPE_EDGE, osl::Piece::ptypeO(), osl::ptypeOIndex(), SquareDim, osl::move_probability::StateInfo::state, osl::move_probability::ToEffect::supportAttack(), osl::PieceMask::test(), osl::container::BoardMask::test(), osl::Move::to(), osl::SimpleState::turn(), osl::move_probability::BlockLong::updateCache(), osl::WHITE, osl::Square::x(), and osl::Square::y().
Referenced by updateCache().