#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 |
Static Public Member Functions | |
| static void | updateCache (StateInfo &info) |
Static Private Member Functions | |
| static void | updateCacheOne (Square target, StateInfo &info) |
Definition at line 472 of file move_probability/feature.h.
| anonymous enum |
Definition at line 475 of file move_probability/feature.h.
| osl::move_probability::PatternCommon::PatternCommon | ( | const std::string & | name, |
| int | dim | ||
| ) | [inline] |
Definition at line 489 of file move_probability/feature.h.
| double osl::move_probability::PatternCommon::addOne | ( | const StateInfo & | state, |
| int | offset, | ||
| const double * | w, | ||
| Square | position | ||
| ) | const [inline] |
Definition at line 492 of file move_probability/feature.h.
References osl::Square::index(), osl::Square::isOnBoardRegion(), osl::move_probability::StateInfo::pattern_cache, osl::PTYPEO_EDGE, osl::ptypeOIndex(), and osl::move_probability::StateInfo::state.
| void osl::move_probability::PatternCommon::updateCache | ( | StateInfo & | info | ) | [static] |
Definition at line 15 of file move_probability/feature.cc.
References updateCacheOne().
| void osl::move_probability::PatternCommon::updateCacheOne | ( | Square | target, |
| StateInfo & | info | ||
| ) | [static, private] |
Definition at line 26 of file move_probability/feature.cc.
References osl::alt(), osl::altIfPiece(), osl::move_probability::StateInfo::attack_shadow, osl::BLACK, osl::Square::canPromote(), osl::move_probability::StateInfo::changed_effects, osl::move_probability::StateInfo::history, osl::Square::index(), osl::isPiece(), osl::Piece::isPiece(), osl::move_probability::StateInfo::last_add_effect, osl::move_probability::StateInfo::last_move_ptype5, osl::Piece::number(), osl::Piece::owner(), osl::move_probability::StateInfo::pattern_cache, osl::move_probability::StateInfo::pin, osl::PTYPE_BASIC_MIN, osl::PTYPE_EDGE, osl::Piece::ptypeO(), osl::ptypeOIndex(), osl::move_probability::StateInfo::state, osl::move_probability::ToEffect::supportAttack(), target, osl::WHITE, osl::Square::x(), and osl::Square::y().
Referenced by updateCache().
1.7.6.1