#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) |
| 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 |
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) |
| 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 int | max_progress |
Definition at line 24 of file newProgress.h.
| anonymous enum |
Definition at line 27 of file newProgress.h.
| osl::progress::ml::NewProgress::NewProgress | ( | const NumEffectState & | state | ) |
Definition at line 441 of file newProgress.cc.
References osl::BLACK, osl::PtypeTable::getIndexMin(), osl::PieceStand::order, osl::Ptype_Table, and osl::WHITE.
| int osl::progress::ml::NewProgress::attack5x5Value | ( | const NumEffectState & | state | ) | const [private] |
Definition at line 353 of file newProgress.cc.
References osl::BISHOP, osl::BLACK, osl::GOLD, osl::ROOK, and osl::SILVER.
| std::string osl::progress::ml::NewProgress::defaultFilename | ( | ) | [static] |
Definition at line 255 of file newProgress.cc.
References osl::OslConfig::home().
Referenced by osl::OslConfig::healthCheck().
| static int osl::progress::ml::NewProgress::index | ( | Square | king, |
| Square | target | ||
| ) | [inline, static, private] |
Definition at line 54 of file newProgress.h.
References osl::BLACK, osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::index5x5 | ( | int | rook, |
| int | bishop, | ||
| int | gold, | ||
| int | silver, | ||
| int | promoted | ||
| ) | [inline, static, private] |
Definition at line 87 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
| static int osl::progress::ml::NewProgress::index5x5x | ( | int | rook, |
| int | bishop, | ||
| int | gold, | ||
| int | silver, | ||
| int | promoted, | ||
| int | king_x | ||
| ) | [inline, static, private] |
Definition at line 93 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
| static int osl::progress::ml::NewProgress::index5x5y | ( | int | rook, |
| int | bishop, | ||
| int | gold, | ||
| int | silver, | ||
| int | promoted, | ||
| int | king_y | ||
| ) | [inline, static, private] |
Definition at line 100 of file newProgress.h.
References osl::progress::ml::NewProgressData::rook.
| static int osl::progress::ml::NewProgress::indexPerEffect | ( | Square | king, |
| Square | target, | ||
| int | count | ||
| ) | [inline, static, private] |
Definition at line 108 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::indexPerEffectX | ( | Square | king, |
| Square | target, | ||
| int | count | ||
| ) | [inline, static, private] |
Definition at line 128 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::WHITE, osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::indexPerEffectY | ( | Square | king, |
| Square | target, | ||
| int | count | ||
| ) | [inline, static, private] |
Definition at line 118 of file newProgress.h.
References osl::BLACK, osl::eval::min(), osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::indexRelative | ( | const Square | king, |
| const Ptype | ptype, | ||
| const Square | pos | ||
| ) | [inline, static, private] |
Definition at line 142 of file newProgress.h.
References osl::BLACK, osl::PTYPE_PIECE_MIN, osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::indexRelative | ( | const Player | player, |
| const Square | king, | ||
| const Piece | piece | ||
| ) | [inline, static, private] |
Definition at line 150 of file newProgress.h.
References osl::BLACK, osl::Piece::ptype(), and osl::Piece::square().
| static int osl::progress::ml::NewProgress::indexX | ( | Square | king, |
| Square | target | ||
| ) | [inline, static, private] |
Definition at line 62 of file newProgress.h.
References osl::BLACK, osl::WHITE, osl::Square::x(), and osl::Square::y().
| static int osl::progress::ml::NewProgress::indexY | ( | Square | king, |
| Square | target | ||
| ) | [inline, static, private] |
Definition at line 79 of file newProgress.h.
References osl::BLACK, osl::Square::x(), and osl::Square::y().
| static bool osl::progress::ml::NewProgress::initialized | ( | ) | [inline, static] |
Definition at line 243 of file newProgress.h.
References initialized_flag.
| static int osl::progress::ml::NewProgress::maxProgress | ( | ) | [inline, static] |
Definition at line 183 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().
| int osl::progress::ml::NewProgress::progress | ( | ) | const [inline] |
Definition at line 166 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::progresses, ProgressScale, and osl::progress::ml::NewProgressData::stand_progresses.
Referenced by progress16(), and show().
| const Progress16 osl::progress::ml::NewProgress::progress16 | ( | ) | const [inline] |
Definition at line 196 of file newProgress.h.
References maxProgress(), and progress().
Referenced by show().
| const Progress16 osl::progress::ml::NewProgress::progress16 | ( | Player | p | ) | const [inline] |
Definition at line 200 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.
| const Progress16 osl::progress::ml::NewProgress::progressAttack | ( | Player | p | ) | const [inline] |
Definition at line 217 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.
| const Progress16 osl::progress::ml::NewProgress::progressDefense | ( | Player | p | ) | const [inline] |
Definition at line 231 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.
| void osl::progress::ml::NewProgress::progressOne | ( | const NumEffectState & | state, |
| int & | attack, | ||
| int & | defense | ||
| ) | [static, private] |
Definition at line 263 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().
| const NewProgressData osl::progress::ml::NewProgress::rawData | ( | ) | const [inline] |
Definition at line 250 of file newProgress.h.
Referenced by osl::progress::ml::operator==().
| bool osl::progress::ml::NewProgress::setUp | ( | ) | [static] |
Definition at line 250 of file newProgress.cc.
Referenced by osl::OslConfig::healthCheck(), main(), and osl::OslConfig::setUp().
| bool osl::progress::ml::NewProgress::setUp | ( | const char * | filename | ) | [static] |
Definition at line 48 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, ProgressScale, osl::progress::ml::NewProgressData::promoted, 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().
| void osl::progress::ml::NewProgress::update | ( | const NumEffectState & | new_state, |
| Move | last_move | ||
| ) | [inline] |
Definition at line 186 of file newProgress.h.
References osl::BLACK.
| void osl::progress::ml::NewProgress::updateAttack5x5Pieces | ( | PieceMask | mask, |
| const NumEffectState & | state | ||
| ) | [private] |
Definition at line 334 of file newProgress.cc.
References osl::BISHOP, osl::GOLD, osl::eval::min(), and osl::ROOK.
| void osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState | ( | const NumEffectState & | state | ) | [private] |
Definition at line 303 of file newProgress.cc.
References osl::alt(), osl::eval::max(), osl::eval::min(), target, osl::WHITE, osl::Square::x(), and osl::Square::y().
| void osl::progress::ml::NewProgress::updateMain | ( | const NumEffectState & | new_state, |
| Move | last_move | ||
| ) | [inline, private] |
Definition at line 482 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::Move::oldPtype(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::Ptype_Table, osl::Move::to(), osl::unpromote(), and osl::WHITE.
| void osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePair | ( | const NumEffectState & | state | ) | [private] |
Definition at line 435 of file newProgress.cc.
| void osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne | ( | const NumEffectState & | state | ) | [private] |
Definition at line 403 of file newProgress.cc.
References osl::alt(), osl::BLACK, osl::PAWN, and result.
| void osl::progress::ml::NewProgress::updatePieceKingRelativeBonus | ( | const NumEffectState & | state | ) | [private] |
Definition at line 377 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.
| void osl::progress::ml::NewProgress::updateSub | ( | const NumEffectState & | new_state, |
| Move | last_move | ||
| ) |
Definition at line 573 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::Move::ptype(), osl::PTYPE_EMPTY, and osl::WHITE.
osl::misc::CArray< int, 1125 > osl::progress::ml::NewProgress::attack5x5_weight [static, private] |
Definition at line 31 of file newProgress.h.
Referenced by setUp().
osl::misc::CArray< int, 5625 > osl::progress::ml::NewProgress::attack5x5_x_weight [static, private] |
Definition at line 32 of file newProgress.h.
Referenced by setUp().
osl::misc::CArray< int, 10125 > osl::progress::ml::NewProgress::attack5x5_y_weight [static, private] |
Definition at line 33 of file newProgress.h.
Referenced by setUp().
osl::misc::CArray< int, 81 *15 *10 > osl::progress::ml::NewProgress::attack_relative [static, private] |
Definition at line 35 of file newProgress.h.
Referenced by setUp().
osl::CArray< int, 262144 > osl::progress::ml::NewProgress::attacked_ptype_pair_weight [static, private] |
Definition at line 38 of file newProgress.h.
Referenced by setUp().
osl::misc::CArray< int, 81 *15 *10 > osl::progress::ml::NewProgress::defense_relative [static, private] |
Definition at line 36 of file newProgress.h.
Referenced by setUp().
osl::misc::CArray< int, 75 > osl::progress::ml::NewProgress::effectstate_weight [static, private] |
Definition at line 34 of file newProgress.h.
Referenced by setUp().
bool osl::progress::ml::NewProgress::initialized_flag [static, private] |
Definition at line 29 of file newProgress.h.
Referenced by initialized(), and setUp().
osl::misc::CArray< int, 4284 > osl::progress::ml::NewProgress::king_relative_weight [static, private] |
Definition at line 37 of file newProgress.h.
Referenced by setUp().
int osl::progress::ml::NewProgress::max_progress [static, private] |
Definition at line 39 of file newProgress.h.
Referenced by maxProgress(), progress(), progress16(), progressAttack(), progressDefense(), and setUp().
osl::misc::CArray< int, osl::Piece::SIZE > osl::progress::ml::NewProgress::stand_weight [static, private] |
Definition at line 30 of file newProgress.h.
Referenced by setUp().
1.7.4