My Project
osl::eval::ml::OpenMidEndingEval Class Reference

#include <openMidEndingEval.h>

Public Member Functions

 OpenMidEndingEval (const NumEffectState &state=NumEffectState(), bool limit_progress_independent_value=! OslConfig::hasByoyomi())
OpenMidEndingEvaloperator= (const OpenMidEndingEval &src)
void changeTurn ()
int progressIndependentValue () const
void debug () const
MultiInt stageValue () const
int openingValue () const
int midgameValue () const
int midgame2Value () const
int endgameValue () const
void invalidateCache ()
int composeOpenMidEndgame () const
int value () const
const Move suggestMove (const NumEffectState &state) const
int expect (const NumEffectState &state, Move move) const
template<Player P>
void updateSub (const NumEffectState &new_state, Move last_move)
void update (const NumEffectState &new_state, Move last_move)
const Progress32 progress32 () const
const Progress16 progress16 () const
int progressValue () const
int progressMax () const
OpenMidEndingEvalDebugInfo debugInfo (const NumEffectState &state)
bool progressIndependentValueLimit () const

Static Public Member Functions

static bool initialized ()
static bool setUp (const char *filename)
static bool setUp ()
static std::string defaultFilename ()
static int progressIndependentValueAdjusted (int value, int progress, int progress_max)
static int infty ()
static int captureValue (PtypeO ptypeO)
static int seeScale ()
static void setRandom ()
static void resetWeights (const int *w, size_t length)

Static Public Attributes

static OpenMidEndingPtypeTable Piece_Value

Private Types

enum  { INVALID =EvalTraits<BLACK>::MAX_VALUE+1 }
enum  { ProgressIndependentValueLimit = 4000 }
enum  LoadStatus { Zero =0 , Loaded , Random }
typedef osl::progress::ml::NewProgress progress_t

Private Member Functions

void updateGoldSilverNearKing (const NumEffectState &state)

Static Private Member Functions

static int roundUp (int v)
template<class Reader>
static void doResetWeights (Reader &reader)

Private Attributes

progress_t progress
MultiIntPair kingx_blocked
MultiIntPair king25_effect_each
MultiIntPair king25_both_side
MultiIntPair king_rook_bishop
MultiIntPair piece_stand_turn
MultiIntPair non_pawn_attacked
MultiIntPair non_pawn_attacked_ptype
MultiIntPair piece_fork_turn
MultiInt ptypey
MultiInt ptypex
MultiInt king_table_value
MultiInt piece_stand_value
MultiInt recalculated_stage_value
MultiInt pawn_advance
MultiInt rook_mobility
MultiInt bishop_mobility
MultiInt lance_mobility
MultiInt knight_advance
MultiInt pawn_drop
MultiInt promoted_minor_piece
MultiInt rook_pawn
MultiInt rook_effect
MultiInt bishop_effect
MultiInt bishop_head
MultiInt nosupport
MultiInt ptype_yy
MultiInt king3pieces
MultiInt rook_promote_defense
MultiInt piece_stand_combination
MultiInt piece_stand_y
MultiInt knight_check
MultiInt knight_head
MultiInt pawn_ptypeo
MultiInt ptype_count_value
MultiInt lance_effect_piece
MultiInt ptype_y_pawn_y
MultiInt bishop_and_king
MultiInt rook_silver_knight
MultiInt bishop_silver_knight
CArray< BoardMask, 2 > knight_fork_squares
CArray< PieceMask, 2 > effect25
CArray< PieceMask, 2 > effect25_supported
CArray< PieceMask, 2 > effected_mask
CArray< PieceMask, 2 > effected_mask_for_attacked
CArray< PieceMask, 40 > attacked_mask
CArray< int, 5 > black_vertical
CArray< int, 5 > white_vertical
CArray< int, 5 > black_king_vertical
CArray< int, 5 > white_king_vertical
CArray< int, 2 > piece_pair_king_value
CArray< int, 2 > non_pawn_stand_count
CArray2d< int, 2, 3 > gs_near_king_count
CArray2d< int, 2, PTYPE_SIZEptype_count
CArray2d< int, 2, PTYPE_SIZEptype_board_count
CArray< std::pair< Square, int >, 2 > knight_drop
CArray< std::pair< Square, int >, 2 > silver_drop
CArray< std::pair< Square, int >, 2 > bishop_drop
CArray< std::pair< Square, int >, 2 > rook_drop
CArray2d< int, 2, 9 > pawns
int progress_independent_value
int recalculated_value
int piece_pair_value
int black_pawn_count
int black_major_count
int black_gold_count
int black_attack_effect
int black_attack_piece
int white_attack_effect
int white_attack_piece
int black_attack_supported_piece
int white_attack_supported_piece
int black_defense_effect
int black_defense_piece
int white_defense_effect
int white_defense_piece
int cache
Player turn
unsigned int ptypeo_mask
CArray< bool, 2 > can_check
bool use_progress_independent_value_limit

Static Private Attributes

static volatile LoadStatus initialized_flag = osl::eval::ml::OpenMidEndingEval::Zero
static Weights piece_pair_weights
static const int ROUND_UP = 2

Detailed Description

Definition at line 121 of file openMidEndingEval.h.

Member Typedef Documentation

◆ progress_t

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ProgressIndependentValueLimit 

one should attack king after when he captured almost all pieces

Definition at line 128 of file openMidEndingEval.h.

◆ anonymous enum

anonymous enum
private
Enumerator
INVALID 

Definition at line 127 of file openMidEndingEval.h.

◆ LoadStatus

Enumerator
Zero 
Loaded 
Random 

Definition at line 132 of file openMidEndingEval.h.

Constructor & Destructor Documentation

◆ OpenMidEndingEval()

osl::eval::ml::OpenMidEndingEval::OpenMidEndingEval ( const NumEffectState & state = NumEffectState(),
bool limit_progress_independent_value = OslConfig::hasByoyomi() )
explicit

Definition at line 498 of file openMidEndingEval.cc.

References attacked_mask, bishop_and_king, bishop_drop, bishop_effect, bishop_head, bishop_mobility, bishop_silver_knight, osl::BLACK, black_attack_effect, black_attack_piece, black_attack_supported_piece, black_defense_effect, black_defense_piece, black_gold_count, black_king_vertical, black_major_count, black_pawn_count, black_vertical, can_check, osl::eval::ml::CanCheckNonPawnPieceStandCombination::canCheck(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), osl::SimpleState::countPiecesOnStand(), effect25, effect25_supported, effected_mask, effected_mask_for_attacked, osl::NumEffectState::effectedMask(), osl::eval::ml::AllGold::eval(), osl::eval::ml::AllMajor::eval(), osl::eval::ml::AnagumaEmpty::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::CheckShadowPtype::eval(), osl::eval::ml::EnterKingDefense::eval(), osl::eval::ml::GoldAndSilverNearKing::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::King25Effect3::eval(), osl::eval::ml::King25EffectAttack::eval(), osl::eval::ml::King25EffectCountCombination::eval(), osl::eval::ml::King25EffectDefense::eval(), osl::eval::ml::King25EffectEachBoth::eval(), osl::eval::ml::King25EffectSupported::eval(), osl::eval::ml::King25EffectSupportedY::eval(), osl::eval::ml::King25EffectYAttack::eval(), osl::eval::ml::King25EffectYDefense::eval(), osl::eval::ml::King25Mobility::eval(), osl::eval::ml::King3Pieces::eval(), osl::eval::ml::KingMobility::eval(), osl::eval::ml::KingMobilitySum::eval(), osl::eval::ml::KingPieceRelative::eval(), osl::eval::ml::KingPieceRelativeNoSupport::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::KingXBlocked::eval(), osl::eval::ml::KingXBlockedY::eval(), osl::eval::ml::KingXBothBlocked::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::KnightCheck::eval(), osl::eval::ml::KnightFork::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::MajorCheckWithCapture::eval(), osl::eval::ml::NonPawnAttacked::eval(), osl::eval::ml::NonPawnAttackedPtype::eval(), osl::eval::ml::NonPawnAttackedPtypePair::eval(), osl::eval::ml::NonPawnPieceStand::eval(), osl::eval::ml::NonPawnPieceStandCombination::eval(), osl::eval::ml::NonPawnPieceStandTurn::eval(), osl::eval::ml::NoPawnOnStand::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::PawnAdvance::eval(), osl::eval::ml::PawnDropBoth::eval(), osl::eval::ml::PawnPtypeOPtypeO::eval(), osl::eval::ml::PieceEval::eval(), osl::eval::ml::PiecePair::eval(), osl::eval::ml::PiecePairKing::eval(), osl::eval::ml::PieceStand::eval(), osl::eval::ml::PieceStandCombinationBoth::eval(), osl::eval::ml::PieceStandY::eval(), osl::eval::ml::PinPtypeAll::eval(), osl::eval::ml::PromotedMinorPieces::eval(), osl::eval::ml::Promotion37::eval(), osl::eval::ml::PtypeCombination::eval(), osl::eval::ml::PtypeCount::eval(), osl::eval::ml::PtypeX::eval(), osl::eval::ml::PtypeY::eval(), osl::eval::ml::PtypeYPawnY::eval(), osl::eval::ml::PtypeYY::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::SilverFork::eval(), osl::eval::ml::King25BothSide::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::PieceMask::getMask(), gs_near_king_count, initialized_flag, invalidateCache(), osl::Piece::isOnBoard(), osl::Piece::isPromoted(), osl::KING, king25_both_side, king25_effect_each, king3pieces, king_rook_bishop, king_table_value, osl::SimpleState::kingSquare(), kingx_blocked, knight_advance, knight_check, knight_drop, knight_fork_squares, knight_head, lance_effect_piece, lance_mobility, non_pawn_attacked, non_pawn_attacked_ptype, non_pawn_stand_count, nosupport, osl::PieceStand::order, osl::Piece::owner(), osl::PAWN, pawn_advance, pawn_drop, pawn_ptypeo, pawns, piece_fork_turn, piece_pair_king_value, piece_pair_value, piece_pair_weights, piece_stand_combination, piece_stand_turn, piece_stand_value, piece_stand_y, osl::SimpleState::pieceOf(), progress, progress_independent_value, promoted_minor_piece, osl::NumEffectState::promotedPieces(), osl::Piece::ptype(), ptype_board_count, ptype_count, ptype_count_value, ptype_y_pawn_y, ptype_yy, osl::Piece::ptypeO(), ptypeo_mask, osl::PTYPEO_MIN, ptypex, ptypey, recalculated_stage_value, recalculated_value, rook_drop, rook_effect, rook_mobility, rook_pawn, rook_promote_defense, rook_silver_knight, silver_drop, osl::Piece::SIZE, osl::Piece::square(), turn, osl::SimpleState::turn(), updateGoldSilverNearKing(), use_progress_independent_value_limit, osl::WHITE, white_attack_effect, white_attack_piece, white_attack_supported_piece, white_defense_effect, white_defense_piece, white_king_vertical, white_vertical, osl::Square::x(), osl::Square::y(), and Zero.

Referenced by operator=().

Member Function Documentation

◆ captureValue()

◆ changeTurn()

Definition at line 232 of file openMidEndingEval.h.

◆ composeOpenMidEndgame()

◆ debug()

◆ debugInfo()

osl::eval::ml::OpenMidEndingEvalDebugInfo osl::eval::ml::OpenMidEndingEval::debugInfo ( const NumEffectState & state)

Definition at line 1121 of file openMidEndingEval.cc.

References osl::eval::ml::OpenMidEndingEvalDebugInfo::ALL_GOLD, osl::eval::ml::OpenMidEndingEvalDebugInfo::ALL_MAJOR, osl::eval::ml::OpenMidEndingEvalDebugInfo::ANAGUMA_EMPTY, osl::eval::ml::OpenMidEndingEvalDebugInfo::ATTACK_MAJORS_IN_BASE, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_AND_KING, bishop_and_king, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_BISHOP_PIECE, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_EFFECT, bishop_effect, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_EXCHANGE_SILVER_KING, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_HEAD, bishop_head, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_MOBILITY, bishop_mobility, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_SILVER_KNIGHT, bishop_silver_knight, osl::eval::ml::OpenMidEndingEvalDebugInfo::BISHOP_STAND_FILE5, osl::BLACK, black_attack_effect, black_attack_piece, black_attack_supported_piece, black_defense_effect, black_defense_piece, black_gold_count, black_king_vertical, black_major_count, black_pawn_count, black_vertical, osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), effect25, effect25_supported, osl::eval::ml::OpenMidEndingEvalDebugInfo::ENTER_KING_DEFENSE, osl::eval::ml::AllGold::eval(), osl::eval::ml::AllMajor::eval(), osl::eval::ml::AnagumaEmpty::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::EnterKingDefense::eval(), osl::eval::ml::GoldAndSilverNearKing::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::King25Effect3::eval(), osl::eval::ml::King25EffectBoth::eval(), osl::eval::ml::King25EffectCountCombination::eval(), osl::eval::ml::King25EffectDefense::eval(), osl::eval::ml::King25EffectSupported::eval(), osl::eval::ml::King25EffectSupportedY::eval(), osl::eval::ml::King25EffectY::eval(), osl::eval::ml::King25EffectYDefense::eval(), osl::eval::ml::King25Mobility::eval(), osl::eval::ml::KingMobility::eval(), osl::eval::ml::KingMobilitySum::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::MajorCheckWithCapture::eval(), osl::eval::ml::NonPawnAttackedPtypePair::eval(), osl::eval::ml::NonPawnPieceStand::eval(), osl::eval::ml::NoPawnOnStand::eval(), osl::eval::ml::PinPtypeAll::eval(), osl::eval::ml::PtypeCombination::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::OpenMidEndingEvalDebugInfo::GOLD_AND_SILVER_NEAR_KING, osl::eval::ml::OpenMidEndingEvalDebugInfo::GOLD_RETREAT, gs_near_king_count, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_BOTH_SIDE, king25_both_side, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT3, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT_ATTACK, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT_COUNT_COMBINATION, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT_DEFENSE, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT_EACH, king25_effect_each, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_EFFECT_SUPPORTED, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING25_MOBILITY, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING3PIECES, king3pieces, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING_MOBILITY, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING_PIECE_RELATIVE, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING_PIECE_RELATIVE_NOSUPPORT, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING_ROOK_BISHOP, king_rook_bishop, king_table_value, osl::eval::ml::OpenMidEndingEvalDebugInfo::KING_X_BLOCKED3, osl::SimpleState::kingSquare(), osl::eval::ml::OpenMidEndingEvalDebugInfo::KNIGHT_CHECK, knight_check, osl::eval::ml::OpenMidEndingEvalDebugInfo::KNIGHT_HEAD, knight_head, osl::eval::ml::OpenMidEndingEvalDebugInfo::LANCE_EFFECT_PIECE, lance_effect_piece, osl::eval::ml::OpenMidEndingEvalDebugInfo::LANCE_MOBILITY, lance_mobility, osl::eval::ml::OpenMidEndingEvalDebugInfo::MAJOR_CHECK_WITH_CAPTURE, osl::eval::ml::OpenMidEndingEvalDebugInfo::NO_PAWN_ON_STAND, osl::eval::ml::OpenMidEndingEvalDebugInfo::NON_PAWN_ATTACKED, non_pawn_attacked, osl::eval::ml::OpenMidEndingEvalDebugInfo::NON_PAWN_ATTACKED_PTYPE, non_pawn_attacked_ptype, osl::eval::ml::OpenMidEndingEvalDebugInfo::NON_PAWN_ATTACKED_PTYPE_PAIR, osl::eval::ml::OpenMidEndingEvalDebugInfo::NON_PAWN_PIECE_STAND, non_pawn_stand_count, nosupport, osl::eval::ml::OpenMidEndingEvalDebugInfo::PAWN_ADVANCE, pawn_advance, osl::eval::ml::OpenMidEndingEvalDebugInfo::PAWN_DROP, pawn_drop, osl::eval::ml::OpenMidEndingEvalDebugInfo::PAWN_PTYPEO, pawn_ptypeo, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_FORK_TURN, piece_fork_turn, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_PAIR, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_PAIR_KING, piece_pair_king_value, piece_pair_value, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_STAND, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_STAND_COMBINATION, piece_stand_combination, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_STAND_TURN, piece_stand_turn, piece_stand_value, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIECE_STAND_Y, piece_stand_y, osl::eval::ml::OpenMidEndingEvalDebugInfo::PIN_PTYPE_ALL, osl::eval::ml::OpenMidEndingEvalDebugInfo::progress, progress16(), progress_independent_value, osl::eval::ml::OpenMidEndingEvalDebugInfo::progress_independent_values, osl::eval::ml::OpenMidEndingEvalDebugInfo::PROMOTED_MINOR_PIECE, promoted_minor_piece, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPE_COMBINATION, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPE_COUNT, ptype_count_value, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPE_Y_PAWN_Y, ptype_y_pawn_y, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPE_YY, ptype_yy, ptypeo_mask, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPEX, ptypex, osl::eval::ml::OpenMidEndingEvalDebugInfo::PTYPEY, ptypey, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_EFFECT, rook_effect, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_MOBILITY, rook_mobility, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_PAWN, rook_pawn, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_PROMOTE_DEFENSE, rook_promote_defense, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_ROOK, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_ROOK_PIECE, osl::eval::ml::OpenMidEndingEvalDebugInfo::ROOK_SILVER_KNIGHT, rook_silver_knight, osl::eval::ml::OpenMidEndingEvalDebugInfo::SILVER_ADVANCE26, osl::eval::ml::OpenMidEndingEvalDebugInfo::SILVER_RETREAT, osl::eval::ml::OpenMidEndingEvalDebugInfo::stage_values, turn, value(), osl::eval::ml::OpenMidEndingEvalDebugInfo::value, osl::WHITE, white_attack_effect, white_attack_piece, white_attack_supported_piece, white_defense_effect, white_defense_piece, white_king_vertical, and white_vertical.

◆ defaultFilename()

std::string osl::eval::ml::OpenMidEndingEval::defaultFilename ( )
static

Definition at line 486 of file openMidEndingEval.cc.

References osl::OslConfig::home().

Referenced by setUp().

◆ doResetWeights()

◆ endgameValue()

Definition at line 275 of file openMidEndingEval.h.

References osl::EndgameIndex, and stageValue().

Referenced by composeOpenMidEndgame(), and expect().

◆ expect()

◆ infty()

◆ initialized()

Definition at line 233 of file openMidEndingEval.h.

References initialized_flag.

◆ invalidateCache()

Definition at line 279 of file openMidEndingEval.h.

References cache, and INVALID.

Referenced by OpenMidEndingEval(), update(), and updateSub().

◆ midgame2Value()

Definition at line 271 of file openMidEndingEval.h.

References stageValue().

◆ midgameValue()

Definition at line 267 of file openMidEndingEval.h.

References stageValue().

Referenced by composeOpenMidEndgame().

◆ openingValue()

Definition at line 263 of file openMidEndingEval.h.

References stageValue().

Referenced by composeOpenMidEndgame(), and expect().

◆ operator=()

OpenMidEndingEval & osl::eval::ml::OpenMidEndingEval::operator= ( const OpenMidEndingEval & src)
inline

Definition at line 226 of file openMidEndingEval.h.

References OpenMidEndingEval().

◆ progress16()

Definition at line 402 of file openMidEndingEval.h.

References progress.

Referenced by debugInfo().

◆ progress32()

Definition at line 397 of file openMidEndingEval.h.

References osl::BLACK, progress, and osl::WHITE.

◆ progressIndependentValue()

◆ progressIndependentValueAdjusted()

int osl::eval::ml::OpenMidEndingEval::progressIndependentValueAdjusted ( int value,
int progress,
int progress_max )
inlinestatic

Definition at line 280 of file openMidEndingEval.h.

References progress, ProgressIndependentValueLimit, and value().

Referenced by composeOpenMidEndgame().

◆ progressIndependentValueLimit()

◆ progressMax()

Definition at line 404 of file openMidEndingEval.h.

References progress.

◆ progressValue()

Definition at line 403 of file openMidEndingEval.h.

References progress.

◆ resetWeights()

void osl::eval::ml::OpenMidEndingEval::resetWeights ( const int * w,
size_t length )
static

Definition at line 195 of file openMidEndingEval.cc.

References doResetWeights().

◆ roundUp()

int osl::eval::ml::OpenMidEndingEval::roundUp ( int v)
inlinestaticprivate

Definition at line 180 of file openMidEndingEval.h.

References ROUND_UP.

Referenced by captureValue(), expect(), and value().

◆ seeScale()

Definition at line 420 of file openMidEndingEval.h.

References osl::progress::ml::NewProgress::maxProgress().

Referenced by captureValue().

◆ setRandom()

void osl::eval::ml::OpenMidEndingEval::setRandom ( )
static

Definition at line 1315 of file openMidEndingEval.cc.

References osl::EndgameIndex, initialize_mutex, initialized_flag, and Random.

◆ setUp() [1/2]

bool osl::eval::ml::OpenMidEndingEval::setUp ( )
static

Definition at line 493 of file openMidEndingEval.cc.

References defaultFilename(), and setUp().

◆ setUp() [2/2]

bool osl::eval::ml::OpenMidEndingEval::setUp ( const char * filename)
static

Definition at line 202 of file openMidEndingEval.cc.

References doResetWeights(), initialize_mutex, initialized_flag, Loaded, and Zero.

Referenced by setUp().

◆ stageValue()

◆ suggestMove()

◆ update()

void osl::eval::ml::OpenMidEndingEval::update ( const NumEffectState & new_state,
Move last_move )

◆ updateGoldSilverNearKing()

◆ updateSub()

template<osl::Player P>
void osl::eval::ml::OpenMidEndingEval::updateSub ( const NumEffectState & new_state,
Move last_move )

Definition at line 768 of file openMidEndingEval.cc.

References osl::alt(), osl::NumEffectState::anyEffectChanged(), osl::container::BoardMask::anyInRange(), attacked_mask, osl::BISHOP, bishop_and_king, bishop_drop, bishop_effect, bishop_head, bishop_mobility, bishop_silver_knight, osl::BLACK, black_attack_effect, black_attack_piece, black_attack_supported_piece, black_defense_effect, black_defense_piece, black_gold_count, black_king_vertical, black_major_count, black_pawn_count, black_vertical, osl::Board_Mask_Table5x5, can_check, osl::eval::ml::CanCheckNonPawnPieceStandCombination::canCheck(), osl::captured(), osl::Move::capturePtype(), osl::NumEffectState::changedEffects(), osl::eval::ml::King25EffectBoth::countEffectAndPiecesBoth(), effect25, effect25_supported, effected_mask, effected_mask_for_attacked, osl::NumEffectState::effectedMask(), osl::eval::ml::AllGold::eval(), osl::eval::ml::AllMajor::eval(), osl::eval::ml::AnagumaEmpty::eval(), osl::eval::ml::AttackMajorsInBase::eval(), osl::eval::ml::BishopBishopPiece::eval(), osl::eval::ml::BishopEffectBase::eval(), osl::eval::ml::BishopExchangeSilverKing::eval(), osl::eval::ml::BishopHead::eval(), osl::eval::ml::BishopMobilityAll::eval(), osl::eval::ml::BishopRookFork::eval(), osl::eval::ml::BishopSilverKnight::eval(), osl::eval::ml::BishopStandFile5::eval(), osl::eval::ml::CheckShadowPtype::eval(), osl::eval::ml::EnterKingDefense::eval(), osl::eval::ml::GoldAndSilverNearKing::eval(), osl::eval::ml::GoldFeatures::eval(), osl::eval::ml::King25Effect3::eval(), osl::eval::ml::King25EffectAttack::eval(), osl::eval::ml::King25EffectCountCombination::eval(), osl::eval::ml::King25EffectDefense::eval(), osl::eval::ml::King25EffectSupported::eval(), osl::eval::ml::King25EffectSupportedY::eval(), osl::eval::ml::King25EffectYAttack::eval(), osl::eval::ml::King25EffectYDefense::eval(), osl::eval::ml::King25Mobility::eval(), osl::eval::ml::KingMobility::eval(), osl::eval::ml::KingMobilitySum::eval(), osl::eval::ml::KingXBlocked3::eval(), osl::eval::ml::KnightAdvance::eval(), osl::eval::ml::KnightCheck::eval(), osl::eval::ml::KnightHead::eval(), osl::eval::ml::LanceEffectPieceKingRelative::eval(), osl::eval::ml::LanceMobilityAll::eval(), osl::eval::ml::MajorCheckWithCapture::eval(), osl::eval::ml::NonPawnAttackedPtypePair::eval(), osl::eval::ml::NonPawnPieceStand::eval(), osl::eval::ml::NoPawnOnStand::eval(), osl::eval::ml::NumPiecesBetweenBishopAndKing::eval(), osl::eval::ml::PieceStandCombinationBoth::eval(), osl::eval::ml::PinPtypeAll::eval(), osl::eval::ml::Promotion37::eval(), osl::eval::ml::PtypeCombination::eval(), osl::eval::ml::RookEffectBase::eval(), osl::eval::ml::RookMobilityAll::eval(), osl::eval::ml::RookPawnY::eval(), osl::eval::ml::RookPromoteDefense::eval(), osl::eval::ml::RookRook::eval(), osl::eval::ml::RookRookPiece::eval(), osl::eval::ml::RookSilverKnight::eval(), osl::eval::ml::SilverAdvance26::eval(), osl::eval::ml::SilverFeatures::eval(), osl::eval::ml::SilverFork::eval(), osl::eval::ml::King25BothSide::evalOne(), osl::eval::ml::KingRookBishop::evalOne(), osl::eval::ml::King25EffectEachBoth::evalWithUpdate(), osl::eval::ml::King3Pieces::evalWithUpdate(), osl::eval::ml::KingPieceRelative::evalWithUpdate(), osl::eval::ml::KingPieceRelativeNoSupport::evalWithUpdate(), osl::eval::ml::KnightFork::evalWithUpdate(), osl::eval::ml::NonPawnPieceStandCombination::evalWithUpdate(), osl::eval::ml::PawnDropBoth::evalWithUpdate(), osl::eval::ml::PieceEval::evalWithUpdate(), osl::eval::ml::PieceStand::evalWithUpdate(), osl::eval::ml::PieceStandY::evalWithUpdate(), osl::eval::ml::PromotedMinorPieces::evalWithUpdate(), osl::eval::ml::PtypeX::evalWithUpdate(), osl::eval::ml::PtypeY::evalWithUpdate(), osl::eval::ml::PtypeYY::evalWithUpdate(), osl::eval::ml::KingXBlockedBoth::evalWithUpdateBang(), osl::eval::ml::NonPawnAttacked::evalWithUpdateBang(), osl::eval::ml::NonPawnAttackedPtype::evalWithUpdateBang(), osl::eval::ml::NonPawnPieceStandTurn::evalWithUpdateBang(), osl::eval::ml::PawnAdvanceAll::evalWithUpdateBang(), osl::eval::ml::PiecePairKing::evalWithUpdateBang(), osl::eval::ml::PtypeCount::evalWithUpdateBang(), osl::eval::ml::PtypeYPawnY::evalWithUpdateBang(), osl::eval::ml::PiecePair::evalWithUpdateCompiled(), osl::Move::from(), osl::GOLD, gs_near_king_count, invalidateCache(), osl::Move::isDrop(), osl::isMajorBasic(), osl::isMajorNonPieceOK(), osl::Move::isPromotion(), osl::KING, king25_both_side, king25_effect_each, king3pieces, king_rook_bishop, king_table_value, osl::SimpleState::kingSquare(), kingx_blocked, osl::KNIGHT, knight_advance, knight_check, knight_drop, knight_fork_squares, knight_head, osl::LANCE, lance_effect_piece, lance_mobility, osl::NumEffectState::longEffectChanged(), non_pawn_attacked, non_pawn_attacked_ptype, non_pawn_stand_count, nosupport, osl::PAWN, pawn_advance, pawn_drop, pawn_ptypeo, pawns, osl::PBISHOP, piece_fork_turn, piece_pair_king_value, piece_pair_value, piece_stand_combination, piece_stand_turn, piece_stand_value, piece_stand_y, osl::Move::player(), osl::PPAWN, progress, progress_independent_value, promoted_minor_piece, osl::NumEffectState::promotedPieces(), osl::PROOK, osl::Move::ptype(), ptype_board_count, ptype_count, ptype_count_value, osl::PTYPE_EMPTY, ptype_y_pawn_y, ptype_yy, ptypeo_mask, ptypex, ptypey, recalculated_stage_value, recalculated_value, osl::ROOK, rook_drop, rook_effect, rook_mobility, rook_pawn, rook_promote_defense, rook_silver_knight, osl::container::BoardMask::set(), osl::SILVER, silver_drop, osl::Move::to(), osl::unpromote(), updateGoldSilverNearKing(), osl::WHITE, white_attack_effect, white_attack_piece, white_attack_supported_piece, white_defense_effect, white_defense_piece, white_king_vertical, white_vertical, osl::Square::x(), and osl::Square::y().

Referenced by update().

◆ value()

Member Data Documentation

◆ attacked_mask

◆ bishop_and_king

◆ bishop_drop

Definition at line 163 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), suggestMove(), and updateSub().

◆ bishop_effect

◆ bishop_head

◆ bishop_mobility

◆ bishop_silver_knight

◆ black_attack_effect

◆ black_attack_piece

◆ black_attack_supported_piece

◆ black_defense_effect

◆ black_defense_piece

◆ black_gold_count

◆ black_king_vertical

◆ black_major_count

◆ black_pawn_count

◆ black_vertical

◆ cache

Definition at line 174 of file openMidEndingEval.h.

Referenced by invalidateCache(), and value().

◆ can_check

Definition at line 177 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), and updateSub().

◆ effect25

◆ effect25_supported

◆ effected_mask

◆ effected_mask_for_attacked

◆ gs_near_king_count

◆ initialized_flag

◆ king25_both_side

◆ king25_effect_each

◆ king3pieces

◆ king_rook_bishop

◆ king_table_value

◆ kingx_blocked

◆ knight_advance

◆ knight_check

◆ knight_drop

Definition at line 163 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), suggestMove(), and updateSub().

◆ knight_fork_squares

◆ knight_head

◆ lance_effect_piece

◆ lance_mobility

◆ non_pawn_attacked

◆ non_pawn_attacked_ptype

◆ non_pawn_stand_count

◆ nosupport

◆ pawn_advance

◆ pawn_drop

◆ pawn_ptypeo

◆ pawns

Definition at line 164 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), and updateSub().

◆ piece_fork_turn

◆ piece_pair_king_value

◆ piece_pair_value

◆ piece_pair_weights

◆ piece_stand_combination

◆ piece_stand_turn

◆ piece_stand_value

◆ piece_stand_y

◆ Piece_Value

◆ progress

◆ progress_independent_value

◆ promoted_minor_piece

◆ ptype_board_count

◆ ptype_count

◆ ptype_count_value

◆ ptype_y_pawn_y

◆ ptype_yy

◆ ptypeo_mask

Definition at line 176 of file openMidEndingEval.h.

Referenced by debugInfo(), OpenMidEndingEval(), and updateSub().

◆ ptypex

◆ ptypey

◆ recalculated_stage_value

◆ recalculated_value

◆ rook_drop

Definition at line 163 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), suggestMove(), and updateSub().

◆ rook_effect

◆ rook_mobility

◆ rook_pawn

◆ rook_promote_defense

◆ rook_silver_knight

◆ ROUND_UP

const int osl::eval::ml::OpenMidEndingEval::ROUND_UP = 2
staticprivate

Definition at line 179 of file openMidEndingEval.h.

Referenced by roundUp().

◆ silver_drop

Definition at line 163 of file openMidEndingEval.h.

Referenced by OpenMidEndingEval(), suggestMove(), and updateSub().

◆ turn

◆ use_progress_independent_value_limit

◆ white_attack_effect

◆ white_attack_piece

◆ white_attack_supported_piece

◆ white_defense_effect

◆ white_defense_piece

◆ white_king_vertical

◆ white_vertical


The documentation for this class was generated from the following files: