My Project
osl::progress::ml::NewProgress Class Reference

#include <progress.h>

Inheritance diagram for osl::progress::ml::NewProgress:
osl::progress::ml::NewProgressData

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

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::SIZEstand_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

Private Attributes inherited from osl::progress::ml::NewProgressData
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

Detailed Description

Definition at line 75 of file progress.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ProgressScale 

Definition at line 78 of file progress.h.

Constructor & Destructor Documentation

◆ NewProgress()

Member Function Documentation

◆ attack5x5Value()

◆ debugInfo()

◆ defaultFilename()

std::string osl::progress::ml::NewProgress::defaultFilename ( )
static

Definition at line 288 of file progress.cc.

References osl::OslConfig::home().

Referenced by osl::OslConfig::healthCheck(), and setUp().

◆ index()

template<Player P>
int osl::progress::ml::NewProgress::index ( Square king,
Square target )
inlinestaticprivate

Definition at line 113 of file progress.h.

References osl::BLACK, osl::Square::x(), and osl::Square::y().

Referenced by setUp(), and updateAttack5x5PiecesAndState().

◆ index5x5()

◆ index5x5x()

◆ index5x5y()

◆ indexPerEffect()

template<Player P>
int osl::progress::ml::NewProgress::indexPerEffect ( Square king,
Square target,
int count )
inlinestaticprivate

Definition at line 167 of file progress.h.

References osl::BLACK, osl::Square::x(), and osl::Square::y().

Referenced by setUp().

◆ indexPerEffectX()

template<Player P>
int osl::progress::ml::NewProgress::indexPerEffectX ( Square king,
Square target,
int count )
inlinestaticprivate

Definition at line 187 of file progress.h.

References osl::BLACK, osl::WHITE, osl::Square::x(), and osl::Square::y().

Referenced by setUp().

◆ indexPerEffectY()

template<Player P>
int osl::progress::ml::NewProgress::indexPerEffectY ( Square king,
Square target,
int count )
inlinestaticprivate

Definition at line 177 of file progress.h.

References osl::BLACK, osl::Square::x(), and osl::Square::y().

Referenced by setUp().

◆ indexRelative() [1/2]

int osl::progress::ml::NewProgress::indexRelative ( const Player player,
const Square king,
const Piece piece )
inlinestaticprivate

Definition at line 209 of file progress.h.

References osl::BLACK, indexRelative(), osl::Piece::ptype(), and osl::Piece::square().

◆ indexRelative() [2/2]

template<Player P>
int osl::progress::ml::NewProgress::indexRelative ( const Square king,
const Ptype ptype,
const Square pos )
inlinestaticprivate

◆ indexX()

template<Player P>
int osl::progress::ml::NewProgress::indexX ( Square king,
Square target )
inlinestaticprivate

Definition at line 121 of file progress.h.

References osl::BLACK, osl::WHITE, osl::Square::x(), and osl::Square::y().

Referenced by setUp().

◆ indexY()

template<Player P>
int osl::progress::ml::NewProgress::indexY ( Square king,
Square target )
inlinestaticprivate

Definition at line 138 of file progress.h.

References osl::BLACK, osl::Square::x(), and osl::Square::y().

Referenced by setUp().

◆ initialized()

Definition at line 304 of file progress.h.

References initialized_flag.

◆ maxProgress()

◆ progress()

◆ progress16() [1/2]

Definition at line 257 of file progress.h.

References maxProgress(), and progress().

◆ progress16() [2/2]

◆ progressAttack()

◆ progressDefense()

◆ progressOne()

template<osl::Player P>
void osl::progress::ml::NewProgress::progressOne ( const NumEffectState & state,
int & attack,
int & defense )
staticprivate

◆ promotion37One()

◆ rawData()

Definition at line 311 of file progress.h.

Referenced by osl::progress::ml::operator==().

◆ setUp() [1/2]

bool osl::progress::ml::NewProgress::setUp ( )
static

Definition at line 283 of file progress.cc.

References defaultFilename(), and setUp().

Referenced by osl::OslConfig::healthCheck().

◆ setUp() [2/2]

◆ update()

void osl::progress::ml::NewProgress::update ( const NumEffectState & new_state,
Move last_move )
inline

Definition at line 246 of file progress.h.

References osl::BLACK, osl::SimpleState::turn(), and updateSub().

◆ updateAttack5x5Pieces()

◆ updateAttack5x5PiecesAndState()

template<osl::Player P>
void osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState ( const NumEffectState & state)
private

◆ updateMain()

◆ updateNonPawnAttackedPtypePair()

void osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePair ( const NumEffectState & state)
private

Definition at line 468 of file progress.cc.

References updateNonPawnAttackedPtypePairOne().

Referenced by NewProgress(), and updateMain().

◆ updateNonPawnAttackedPtypePairOne()

◆ updatePawnFacing()

◆ updatePieceKingRelativeBonus()

◆ updatePieceStand7()

void osl::progress::ml::NewProgress::updatePieceStand7 ( const NumEffectState & state)
private

◆ updatePromotion37()

void osl::progress::ml::NewProgress::updatePromotion37 ( const NumEffectState & state)
private

◆ updateSub()

Member Data Documentation

◆ attack5x5_weight

Definition at line 82 of file progress.h.

Referenced by setUp().

◆ attack5x5_x_weight

Definition at line 83 of file progress.h.

Referenced by attack5x5Value(), and setUp().

◆ attack5x5_y_weight

Definition at line 84 of file progress.h.

Referenced by attack5x5Value(), and setUp().

◆ attack_relative

Definition at line 86 of file progress.h.

Referenced by progressOne(), and setUp().

◆ attacked_ptype_pair_weight

Definition at line 89 of file progress.h.

Referenced by setUp(), and updateNonPawnAttackedPtypePairOne().

◆ defense_relative

Definition at line 87 of file progress.h.

Referenced by progressOne(), and setUp().

◆ effectstate_weight

Definition at line 85 of file progress.h.

Referenced by setUp(), and updateAttack5x5PiecesAndState().

◆ initialized_flag

Definition at line 80 of file progress.h.

Referenced by initialized(), NewProgress(), and setUp().

◆ king_relative_weight

Definition at line 88 of file progress.h.

Referenced by setUp(), updateMain(), and updatePieceKingRelativeBonus().

◆ max_progress

◆ pawn_facing_weight

Definition at line 90 of file progress.h.

Referenced by setUp(), and updatePawnFacing().

◆ piecestand7_weight

Definition at line 92 of file progress.h.

Referenced by setUp(), and updatePieceStand7().

◆ promotion37_weight

Definition at line 91 of file progress.h.

Referenced by promotion37One(), and setUp().

◆ stand_weight

Definition at line 81 of file progress.h.

Referenced by NewProgress(), setUp(), and updateMain().


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