All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes
osl::progress::ml::NewProgress Class Reference

#include <newProgress.h>

Inheritance diagram for osl::progress::ml::NewProgress:
Inheritance graph
[legend]
Collaboration diagram for osl::progress::ml::NewProgress:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Definition at line 44 of file newProgress.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ProgressScale 

Definition at line 47 of file newProgress.h.


Constructor & Destructor Documentation

osl::progress::ml::NewProgress::NewProgress ( const NumEffectState &  state)

Member Function Documentation

template<osl::Player P>
int osl::progress::ml::NewProgress::attack5x5Value ( const NumEffectState &  state) const [private]

Definition at line 386 of file newProgress.cc.

References osl::BISHOP, osl::BLACK, osl::GOLD, osl::ROOK, and osl::SILVER.

Definition at line 288 of file newProgress.cc.

References osl::OslConfig::home().

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

template<Player P>
static int osl::progress::ml::NewProgress::index ( Square  king,
Square  target 
) [inline, static, private]

Definition at line 82 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 115 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 121 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 128 of file newProgress.h.

References osl::progress::ml::NewProgressData::rook.

template<Player P>
static int osl::progress::ml::NewProgress::indexPerEffect ( Square  king,
Square  target,
int  count 
) [inline, static, private]

Definition at line 136 of file newProgress.h.

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

template<Player P>
static int osl::progress::ml::NewProgress::indexPerEffectX ( Square  king,
Square  target,
int  count 
) [inline, static, private]

Definition at line 156 of file newProgress.h.

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

template<Player P>
static int osl::progress::ml::NewProgress::indexPerEffectY ( Square  king,
Square  target,
int  count 
) [inline, static, private]

Definition at line 146 of file newProgress.h.

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

template<Player P>
static int osl::progress::ml::NewProgress::indexRelative ( const Square  king,
const Ptype  ptype,
const Square  pos 
) [inline, static, private]

Definition at line 170 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 178 of file newProgress.h.

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

template<Player P>
static int osl::progress::ml::NewProgress::indexX ( Square  king,
Square  target 
) [inline, static, private]

Definition at line 90 of file newProgress.h.

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

template<Player P>
static int osl::progress::ml::NewProgress::indexY ( Square  king,
Square  target 
) [inline, static, private]

Definition at line 107 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 273 of file newProgress.h.

References initialized_flag.

static int osl::progress::ml::NewProgress::maxProgress ( ) [inline, static]

Definition at line 226 of file newProgress.h.

References maxProgress(), and progress().

Referenced by osl::game_playing::UsiResponse::genmoveProbability(), and show().

template<osl::Player P>
void osl::progress::ml::NewProgress::progressOne ( const NumEffectState &  state,
int &  attack,
int &  defense 
) [static, private]
template<osl::Player P>
void osl::progress::ml::NewProgress::promotion37One ( const NumEffectState &  state,
int  rank 
) [private]

Definition at line 280 of file newProgress.h.

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

bool osl::progress::ml::NewProgress::setUp ( const char *  filename) [static]

Definition at line 283 of file newProgress.cc.

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

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

Definition at line 215 of file newProgress.h.

References osl::BLACK.

Referenced by main().

template<osl::Player P>
void osl::progress::ml::NewProgress::updateAttack5x5Pieces ( PieceMask  mask,
const NumEffectState &  state 
) [private]

Definition at line 367 of file newProgress.cc.

References osl::BISHOP, osl::GOLD, osl::eval::min(), and osl::ROOK.

template<osl::Player P>
void osl::progress::ml::NewProgress::updateAttack5x5PiecesAndState ( const NumEffectState &  state) [private]
template<osl::Player P>
void osl::progress::ml::NewProgress::updateMain ( const NumEffectState &  new_state,
Move  last_move 
) [inline, private]
void osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePair ( const NumEffectState &  state) [private]

Definition at line 469 of file newProgress.cc.

template<osl::Player Owner>
void osl::progress::ml::NewProgress::updateNonPawnAttackedPtypePairOne ( const NumEffectState &  state) [private]

Definition at line 436 of file newProgress.cc.

References osl::alt(), osl::BLACK, osl::PAWN, and result.

void osl::progress::ml::NewProgress::updatePawnFacing ( const NumEffectState &  state) [private]

Definition at line 476 of file newProgress.cc.

References osl::BLACK, count, osl::PAWN, osl::Piece::square(), and osl::WHITE.

void osl::progress::ml::NewProgress::updatePieceKingRelativeBonus ( const NumEffectState &  state) [private]
void osl::progress::ml::NewProgress::updatePieceStand7 ( const NumEffectState &  state) [private]
void osl::progress::ml::NewProgress::updatePromotion37 ( const NumEffectState &  state) [private]

Definition at line 523 of file newProgress.cc.

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

Member Data Documentation

Definition at line 51 of file newProgress.h.

Referenced by setUp().

Definition at line 52 of file newProgress.h.

Referenced by setUp().

Definition at line 53 of file newProgress.h.

Referenced by setUp().

Definition at line 55 of file newProgress.h.

Referenced by setUp().

osl::CArray< int, 262144 > osl::progress::ml::NewProgress::attacked_ptype_pair_weight [static, private]

Definition at line 58 of file newProgress.h.

Referenced by setUp().

Definition at line 56 of file newProgress.h.

Referenced by setUp().

Definition at line 54 of file newProgress.h.

Referenced by setUp().

Definition at line 49 of file newProgress.h.

Referenced by initialized(), and setUp().

Definition at line 57 of file newProgress.h.

Referenced by setUp().

Definition at line 62 of file newProgress.h.

Referenced by maxProgress(), progress(), progress16(), progressAttack(), progressDefense(), and setUp().

osl::CArray< int, 10 > osl::progress::ml::NewProgress::pawn_facing_weight [static, private]

Definition at line 59 of file newProgress.h.

Referenced by setUp().

osl::CArray< int, 56 > osl::progress::ml::NewProgress::piecestand7_weight [static, private]

Definition at line 61 of file newProgress.h.

Referenced by setUp().

osl::CArray< int, 16 > osl::progress::ml::NewProgress::promotion37_weight [static, private]

Definition at line 60 of file newProgress.h.

Referenced by setUp().

Definition at line 50 of file newProgress.h.

Referenced by setUp().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines