#include <newProgress.h>
Public Types | |
enum | { ProgressScale = 2 } |
Public Member Functions | |
NewProgress (const NumEffectState &state) | |
int | progress () const |
template<Player P> | |
void | updateSub (const NumEffectState &new_state, Move last_move) |
void | update (const NumEffectState &new_state, Move last_move) |
NewProgressDebugInfo | debugInfo () const |
const Progress16 | progress16 () const |
const Progress16 | progress16 (Player p) const |
const Progress16 | progressAttack (Player p) const |
const Progress16 | progressDefense (Player p) const |
const NewProgressData | rawData () const |
template<osl::Player P> | |
void | progressOne (const NumEffectState &state, int &attack, int &defense) |
Static Public Member Functions | |
static int | maxProgress () |
static bool | initialized () |
static bool | setUp (const char *filename) |
static bool | setUp () |
static std::string | defaultFilename () |
Private Member Functions | |
void | updatePieceKingRelativeBonus (const NumEffectState &state) |
void | updateNonPawnAttackedPtypePair (const NumEffectState &state) |
template<Player Owner> | |
void | updateNonPawnAttackedPtypePairOne (const NumEffectState &state) |
void | updatePawnFacing (const NumEffectState &state) |
template<Player Attack> | |
void | promotion37One (const NumEffectState &state, int rank) |
void | updatePromotion37 (const NumEffectState &state) |
void | updatePieceStand7 (const NumEffectState &state) |
template<Player P> | |
void | updateAttack5x5PiecesAndState (const NumEffectState &state) |
template<Player P> | |
void | updateAttack5x5Pieces (PieceMask, const NumEffectState &) |
template<Player P> | |
int | attack5x5Value (const NumEffectState &state) const |
template<Player P> | |
void | updateMain (const NumEffectState &new_state, Move last_move) |
Static Private Member Functions | |
template<Player P> | |
static void | progressOne (const NumEffectState &state, int &attack, int &defense) |
template<Player P> | |
static int | index (Square king, Square target) |
template<Player P> | |
static int | indexX (Square king, Square target) |
template<Player P> | |
static int | indexY (Square king, Square target) |
static int | index5x5 (int rook, int bishop, int gold, int silver, int promoted) |
static int | index5x5x (int rook, int bishop, int gold, int silver, int promoted, int king_x) |
static int | index5x5y (int rook, int bishop, int gold, int silver, int promoted, int king_y) |
template<Player P> | |
static int | indexPerEffect (Square king, Square target, int count) |
template<Player P> | |
static int | indexPerEffectY (Square king, Square target, int count) |
template<Player P> | |
static int | indexPerEffectX (Square king, Square target, int count) |
template<Player P> | |
static int | indexRelative (const Square king, const Ptype ptype, const Square pos) |
static int | indexRelative (const Player player, const Square king, const Piece piece) |
Static Private Attributes | |
static bool | initialized_flag |
static CArray< int, Piece::SIZE > | stand_weight |
static CArray< int, 1125 > | attack5x5_weight |
static CArray< int, 5625 > | attack5x5_x_weight |
static CArray< int, 10125 > | attack5x5_y_weight |
static CArray< int, 75 > | effectstate_weight |
static CArray< int, 81 *15 *10 > | attack_relative |
static CArray< int, 81 *15 *10 > | defense_relative |
static CArray< int, 4284 > | king_relative_weight |
static CArray< int, 262144 > | attacked_ptype_pair_weight |
static CArray< int, 10 > | pawn_facing_weight |
static CArray< int, 16 > | promotion37_weight |
static CArray< int, 56 > | piecestand7_weight |
static int | max_progress |
Additional Inherited Members | |
![]() | |
CArray< MultiInt, 2 > | non_pawn_ptype_attacked_pair_eval |
MultiInt | promotion37_eval |
CArray< int, 2 > | progresses |
CArray< int, 2 > | attack5x5_progresses |
CArray< int, 2 > | stand_progresses |
CArray< int, 2 > | effect_progresses |
CArray< int, 2 > | defenses |
CArray< int, 2 > | rook |
CArray< int, 2 > | bishop |
CArray< int, 2 > | gold |
CArray< int, 2 > | silver |
CArray< int, 2 > | promoted |
CArray< int, 2 > | king_relative_attack |
CArray< int, 2 > | king_relative_defense |
CArray< int, 2 > | non_pawn_ptype_attacked_pair |
int | pawn_facing |
int | promotion37 |
int | piecestand7 |
Definition at line 44 of file newProgress.h.
anonymous enum |
Enumerator | |
---|---|
ProgressScale |
Definition at line 47 of file newProgress.h.
osl::progress::ml::NewProgress::NewProgress | ( | const NumEffectState & | state) |
Definition at line 547 of file newProgress.cc.
References osl::BLACK, osl::PtypeTable::getIndexMin(), osl::PieceStand::order, osl::Ptype_Table, and osl::WHITE.
|
private |
Definition at line 387 of file newProgress.cc.
References osl::BISHOP, osl::BLACK, osl::GOLD, osl::ROOK, and osl::SILVER.
osl::progress::ml::NewProgressDebugInfo osl::progress::ml::NewProgress::debugInfo | ( | ) | const |
Definition at line 727 of file newProgress.cc.
References osl::progress::ml::NewProgressDebugInfo::ATTACK5X5, osl::progress::ml::NewProgressDebugInfo::ATTACK_5X3, osl::progress::ml::NewProgressDebugInfo::black_values, osl::progress::ml::NewProgressDebugInfo::DEFENSE_5X3, osl::progress::ml::NewProgressDebugInfo::EFFECT5X5, osl::progress::ml::NewProgressDebugInfo::KING_RELATIVE_ATTACK, osl::progress::ml::NewProgressDebugInfo::KING_RELATIVE_DEFENSE, osl::progress::ml::NewProgressDebugInfo::NON_PAWN_ATTACKED_PAIR, osl::progress::ml::NewProgressDebugInfo::STAND, and osl::progress::ml::NewProgressDebugInfo::white_values.
|
static |
Definition at line 289 of file newProgress.cc.
References osl::OslConfig::home().
Referenced by osl::OslConfig::healthCheck().
|
inlinestaticprivate |
Definition at line 82 of file newProgress.h.
References osl::BLACK, osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 115 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
|
inlinestaticprivate |
Definition at line 121 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
|
inlinestaticprivate |
Definition at line 128 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
|
inlinestaticprivate |
Definition at line 136 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 156 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::WHITE, osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 146 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 170 of file newProgress.h.
References osl::BLACK, osl::PTYPE_PIECE_MIN, osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 178 of file newProgress.h.
References osl::BLACK, osl::Piece::ptype(), and osl::Piece::square().
|
inlinestaticprivate |
Definition at line 90 of file newProgress.h.
References osl::BLACK, osl::WHITE, osl::Square::x(), and osl::Square::y().
|
inlinestaticprivate |
Definition at line 107 of file newProgress.h.
References osl::BLACK, osl::Square::x(), and osl::Square::y().
|
inlinestatic |
Definition at line 273 of file newProgress.h.
References initialized_flag.
|
inlinestatic |
Definition at line 212 of file newProgress.h.
References max_progress, and ProgressScale.
Referenced by osl::eval::ml::OpenMidEndingEval::composeOpenMidEndgame(), osl::eval::ml::OpenMidEndingEval::expect(), osl::eval::ml::OpenMidEndingEval::infty(), progress16(), progressAttack(), progressDefense(), and osl::eval::ml::OpenMidEndingEval::seeScale().
|
inline |
Definition at line 194 of file newProgress.h.
References osl::progress::ml::NewProgressData::attack5x5_progresses, osl::progress::ml::NewProgressData::defenses, osl::progress::ml::NewProgressData::effect_progresses, osl::progress::ml::NewProgressData::king_relative_attack, osl::progress::ml::NewProgressData::king_relative_defense, osl::eval::max(), max_progress, osl::eval::min(), osl::progress::ml::NewProgressData::non_pawn_ptype_attacked_pair, osl::progress::ml::NewProgressData::pawn_facing, osl::progress::ml::NewProgressData::piecestand7, osl::progress::ml::NewProgressData::progresses, ProgressScale, osl::progress::ml::NewProgressData::promotion37, and osl::progress::ml::NewProgressData::stand_progresses.
Referenced by osl::eval::ml::OpenMidEndingEval::composeOpenMidEndgame(), main(), progress16(), and show().
|
inline |
Definition at line 226 of file newProgress.h.
References maxProgress(), and progress().
Referenced by osl::game_playing::UsiResponse::genmoveProbability(), and show().
|
inline |
Definition at line 230 of file newProgress.h.
References osl::alt(), osl::progress::ml::NewProgressData::attack5x5_progresses, osl::progress::ml::NewProgressData::defenses, osl::progress::ml::NewProgressData::effect_progresses, osl::progress::ml::NewProgressData::king_relative_attack, osl::progress::ml::NewProgressData::king_relative_defense, osl::eval::max(), max_progress, maxProgress(), osl::eval::min(), osl::progress::ml::NewProgressData::non_pawn_ptype_attacked_pair, osl::playerToIndex(), osl::progress::ml::NewProgressData::progresses, ProgressScale, and osl::progress::ml::NewProgressData::stand_progresses.
|
inline |
Definition at line 247 of file newProgress.h.
References osl::alt(), osl::progress::ml::NewProgressData::attack5x5_progresses, osl::progress::ml::NewProgressData::effect_progresses, osl::progress::ml::NewProgressData::king_relative_attack, osl::eval::max(), max_progress, maxProgress(), osl::eval::min(), osl::progress::ml::NewProgressData::progresses, ProgressScale, and osl::progress::ml::NewProgressData::stand_progresses.
|
inline |
Definition at line 261 of file newProgress.h.
References osl::alt(), osl::progress::ml::NewProgressData::defenses, osl::progress::ml::NewProgressData::king_relative_defense, osl::eval::max(), max_progress, maxProgress(), osl::eval::min(), osl::progress::ml::NewProgressData::non_pawn_ptype_attacked_pair, and ProgressScale.
|
staticprivate |
void osl::progress::ml::NewProgress::progressOne | ( | const NumEffectState & | state, |
int & | attack, | ||
int & | defense | ||
) |
Definition at line 297 of file newProgress.cc.
References osl::Centering5x3::adjustCenter(), osl::alt(), osl::BLACK, center, osl::eval::min(), osl::Square::rotate180(), target, osl::WHITE, osl::Square::x(), and osl::Square::y().
|
private |
Definition at line 493 of file newProgress.cc.
References osl::alt(), count, osl::move_generator::addeffect8::hasEffect(), osl::isPiece(), osl::isPromoted(), osl::playerToMul(), osl::PTYPE_BASIC_MIN, osl::PTYPE_MAX, and target.
|
inline |
Definition at line 280 of file newProgress.h.
Referenced by osl::progress::ml::operator==().
|
static |
Definition at line 55 of file newProgress.cc.
References osl::Centering5x3::adjustCenter(), attack5x5_weight, attack5x5_x_weight, attack5x5_y_weight, attack_relative, attacked_ptype_pair_weight, osl::progress::ml::NewProgressData::bishop, center, count, defense_relative, osl::eval::ml::Weights::dimension(), effectstate_weight, osl::progress::ml::NewProgressData::gold, osl::eval::ml::NonPawnAttackedPtypePair::index2(), initialized_flag, king_relative_weight, max_progress, pawn_facing_weight, piecestand7_weight, ProgressScale, osl::progress::ml::NewProgressData::promoted, promotion37_weight, osl::PTYPE_SIZE, osl::eval::ml::Weights::resetDimension(), osl::progress::ml::NewProgressData::rook, osl::progress::ml::NewProgressData::silver, osl::Piece::SIZE, stand_weight, target, osl::Square::x(), and osl::Square::y().
|
static |
Definition at line 284 of file newProgress.cc.
Referenced by osl::OslConfig::healthCheck(), main(), and osl::OslConfig::setUp().
|
inline |
|
private |
Definition at line 368 of file newProgress.cc.
References osl::BISHOP, osl::GOLD, osl::eval::min(), and osl::ROOK.
|
private |
Definition at line 337 of file newProgress.cc.
References osl::alt(), osl::eval::max(), osl::eval::min(), target, osl::WHITE, osl::Square::x(), and osl::Square::y().
|
inlineprivate |
Definition at line 591 of file newProgress.cc.
References osl::BLACK, osl::container::Board_Mask_Table5x3_Center, osl::captured(), osl::Move::capturePtype(), count, osl::Move::from(), osl::PtypeTable::getIndexMin(), osl::Move::isDrop(), osl::KING, osl::container::BoardMaskTable5x3Center::mask(), osl::Move::oldPtype(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Ptype_Table, osl::Move::to(), osl::unpromote(), and osl::WHITE.
|
private |
Definition at line 470 of file newProgress.cc.
|
private |
Definition at line 437 of file newProgress.cc.
References osl::alt(), osl::BLACK, osl::PAWN, and result.
|
private |
Definition at line 477 of file newProgress.cc.
References osl::BLACK, count, osl::PAWN, osl::Piece::square(), and osl::WHITE.
|
private |
Definition at line 411 of file newProgress.cc.
References osl::alt(), osl::BLACK, osl::Piece::isOnBoard(), osl::KING, osl::Piece::owner(), osl::Piece::ptype(), osl::Piece::SIZE, and osl::WHITE.
|
private |
Definition at line 533 of file newProgress.cc.
References osl::indexToPlayer(), osl::eval::min(), osl::PieceStand::order, and osl::PTYPE_BASIC_MIN.
|
private |
Definition at line 524 of file newProgress.cc.
void osl::progress::ml::NewProgress::updateSub | ( | const NumEffectState & | new_state, |
Move | last_move | ||
) |
Definition at line 685 of file newProgress.cc.
References osl::BLACK, osl::container::Board_Mask_Table5x5, osl::captured(), osl::Move::capturePtype(), osl::Move::isDrop(), osl::Move::isPass(), osl::KING, osl::container::BoardMaskTable5x5::mask(), osl::Move::ptype(), osl::PTYPE_EMPTY, and osl::WHITE.
|
staticprivate |
Definition at line 51 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 52 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 53 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 55 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 58 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 56 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 54 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 49 of file newProgress.h.
Referenced by initialized(), and setUp().
|
staticprivate |
Definition at line 57 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 62 of file newProgress.h.
Referenced by maxProgress(), progress(), progress16(), progressAttack(), progressDefense(), and setUp().
|
staticprivate |
Definition at line 59 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 61 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 60 of file newProgress.h.
Referenced by setUp().
|
staticprivate |
Definition at line 50 of file newProgress.h.
Referenced by setUp().