#include <feature.h>
Public Types | |
enum | { AttackPtype = 8, BasicAttack = AttackPtype*osl::PTYPEO_SIZE, OptionSize = 8, LongAttackSize = BasicAttack * OptionSize, DIM = PTYPE_SIZE * 2 * LongAttackSize } |
Public Member Functions | |
BlockLong () | |
double | match (const StateInfo &state, const MoveInfo &move, int offset, const double *w) const |
Static Public Member Functions | |
static int | longAttackIndex (osl::PtypeO ptypeo) |
static double | addPiece (const StateInfo &state, Piece piece, Square to, const double *w, int offset) |
static int | ptypeSupport (Ptype moved, bool has_support) |
static double | findAll (const StateInfo &state, Player P, Square target, const double *w, int offset) |
static double | findAll (const StateInfo &state, Move move, const double *w, int offset=0) |
static void | updateCache (StateInfo &) |
Static Private Member Functions | |
static void | makeLongAttackOne (StateInfo &info, Piece piece, Direction d) |
Definition at line 702 of file move_probability/feature.h.
anonymous enum |
Definition at line 705 of file move_probability/feature.h.
osl::move_probability::BlockLong::BlockLong | ( | ) | [inline] |
Definition at line 712 of file move_probability/feature.h.
static double osl::move_probability::BlockLong::addPiece | ( | const StateInfo & | state, |
Piece | piece, | ||
Square | to, | ||
const double * | w, | ||
int | offset | ||
) | [inline, static] |
Definition at line 729 of file move_probability/feature.h.
References osl::BLACK, osl::Board_Table, osl::BoardTable::getLongDirection(), osl::move_probability::StateInfo::long_attack_cache, osl::longToShort(), osl::Piece::number(), osl::Piece::square(), and osl::move_probability::StateInfo::state.
static double osl::move_probability::BlockLong::findAll | ( | const StateInfo & | state, |
Player | P, | ||
Square | target, | ||
const double * | w, | ||
int | offset | ||
) | [inline, static] |
Definition at line 748 of file move_probability/feature.h.
References osl::alt(), and osl::move_probability::StateInfo::state.
Referenced by osl::move_probability::AddEffectLong::addOne(), osl::move_probability::BlockLongFrom::findAll(), and osl::move_probability::LongRecapture::match().
static double osl::move_probability::BlockLong::findAll | ( | const StateInfo & | state, |
Move | move, | ||
const double * | w, | ||
int | offset = 0 |
||
) | [inline, static] |
Definition at line 766 of file move_probability/feature.h.
References osl::Move::isDrop(), osl::Move::player(), osl::Move::ptype(), osl::move_probability::StateInfo::state, target, and osl::Move::to().
static int osl::move_probability::BlockLong::longAttackIndex | ( | osl::PtypeO | ptypeo | ) | [inline, static] |
Definition at line 715 of file move_probability/feature.h.
References osl::BISHOP, osl::getOwner(), osl::getPtype(), osl::LANCE, osl::PBISHOP, osl::PROOK, osl::ROOK, and osl::WHITE.
void osl::move_probability::BlockLong::makeLongAttackOne | ( | StateInfo & | info, |
Piece | piece, | ||
Direction | d | ||
) | [static, private] |
Definition at line 148 of file move_probability/feature.cc.
References osl::alt(), osl::move_probability::StateInfo::attack_shadow, osl::BLACK, osl::Board_Table, osl::Square::canPromote(), osl::BoardTable::getOffsetForBlack(), osl::BoardTable::getShortOffsetNotKnight(), osl::BoardTable::isBetween(), osl::Neighboring8::isNeighboring8(), osl::Move::isNormal(), osl::Piece::isOnBoardByOwner(), osl::isPiece(), osl::move_probability::StateInfo::long_attack_cache, osl::Piece::number(), out, osl::Piece::owner(), osl::Piece::ptypeO(), osl::PTYPEO_SIZE, osl::ptypeOIndex(), osl::Piece::square(), osl::move_probability::StateInfo::state, osl::move_probability::StateInfo::threatmate_move, osl::Move::to(), osl::WHITE, and osl::Offset::zero().
double osl::move_probability::BlockLong::match | ( | const StateInfo & | state, |
const MoveInfo & | move, | ||
int | offset, | ||
const double * | w | ||
) | const [inline, virtual] |
Implements osl::move_probability::Feature.
Definition at line 774 of file move_probability/feature.h.
References osl::move_probability::MoveInfo::move.
static int osl::move_probability::BlockLong::ptypeSupport | ( | Ptype | moved, |
bool | has_support | ||
) | [inline, static] |
Definition at line 744 of file move_probability/feature.h.
void osl::move_probability::BlockLong::updateCache | ( | StateInfo & | info | ) | [static] |
Definition at line 114 of file move_probability/feature.cc.
References osl::BLACK, osl::D, osl::DL, osl::DR, osl::PtypeTraits< LANCE >::indexMin, osl::PtypeTraits< BISHOP >::indexMin, osl::PtypeTraits< ROOK >::indexMin, osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::L, osl::Piece::owner(), osl::R, osl::move_probability::StateInfo::state, osl::U, osl::UL, and osl::UR.