玉と他の駒の関係を保持 More...
#include <kingPieceTable.h>
Public Types | |
enum | { EffectiveDimension = 81*2*82*PTYPE_SIZE } |
Public Member Functions | |
int & | valueOf (Square king, Player defense, Square other, Ptype ptype) |
int | valueOf (Square king, Player defense, Square other, Ptype ptype) const |
void | saveText (const char *filename) const |
kingPieceTable.cc | |
void | loadText (const char *filename) |
void | resetWeights (const int *w) |
void | randomize () |
void | clear () |
Static Public Member Functions | |
static int | otherIndex (Square other, Ptype ptype) |
static int | kingIndex (Square king, Player defense) |
static int | effectiveIndexOf (Square king, Player defense, Square other, Ptype ptype) |
static int | dimension () |
Protected Member Functions | |
KingPieceTable () | |
Protected Attributes | |
CArray2d< int, Square::SIZE *2, Square::SIZE *PTYPE_SIZE > | data |
Friends | |
bool | operator== (const KingPieceTable &l, KingPieceTable &r) |
玉と他の駒の関係を保持
Definition at line 28 of file kingPieceTable.h.
anonymous enum |
Definition at line 31 of file kingPieceTable.h.
osl::eval::endgame::KingPieceTable::KingPieceTable | ( | ) | [inline, protected] |
Definition at line 34 of file kingPieceTable.h.
References data.
Definition at line 120 of file kingPieceTable.cc.
static int osl::eval::endgame::KingPieceTable::dimension | ( | ) | [inline, static] |
Definition at line 63 of file kingPieceTable.h.
References EffectiveDimension.
static int osl::eval::endgame::KingPieceTable::effectiveIndexOf | ( | Square | king, |
Player | defense, | ||
Square | other, | ||
Ptype | ptype | ||
) | [inline, static] |
Definition at line 52 of file kingPieceTable.h.
References osl::Square::isPieceStand(), osl::playerToIndex(), osl::PTYPE_SIZE, osl::Square::x(), and osl::Square::y().
static int osl::eval::endgame::KingPieceTable::kingIndex | ( | Square | king, |
Player | defense | ||
) | [inline, static] |
Definition at line 40 of file kingPieceTable.h.
References osl::Square::index(), and osl::playerToIndex().
Referenced by valueOf().
void osl::eval::endgame::KingPieceTable::loadText | ( | const char * | filename | ) |
Definition at line 41 of file kingPieceTable.cc.
Referenced by osl::eval::endgame::DefenseKing::loadText(), and osl::eval::endgame::AttackKing::loadText().
static int osl::eval::endgame::KingPieceTable::otherIndex | ( | Square | other, |
Ptype | ptype | ||
) | [inline, static] |
Definition at line 36 of file kingPieceTable.h.
References osl::Square::index(), and osl::PTYPE_SIZE.
Referenced by valueOf().
Definition at line 89 of file kingPieceTable.cc.
References osl::Square::index(), osl::Square::isPieceStand(), osl::PTYPE_SIZE, and osl::misc::random().
void osl::eval::endgame::KingPieceTable::resetWeights | ( | const int * | w | ) |
Definition at line 59 of file kingPieceTable.cc.
References osl::Square::index(), osl::indexToPlayer(), osl::Square::isPieceStand(), and osl::PTYPE_SIZE.
Referenced by osl::eval::endgame::DefenseKing::resetWeights(), and osl::eval::endgame::AttackKing::resetWeights().
void osl::eval::endgame::KingPieceTable::saveText | ( | const char * | filename | ) | const |
Definition at line 14 of file kingPieceTable.cc.
References osl::Square::index(), osl::Square::isPieceStand(), and osl::PTYPE_SIZE.
Referenced by osl::eval::endgame::DefenseKing::saveText().
int& osl::eval::endgame::KingPieceTable::valueOf | ( | Square | king, |
Player | defense, | ||
Square | other, | ||
Ptype | ptype | ||
) | [inline] |
Definition at line 44 of file kingPieceTable.h.
References data, kingIndex(), and otherIndex().
Referenced by osl::eval::endgame::DefenseKing::valueOf(), and osl::eval::endgame::AttackKing::valueOf().
int osl::eval::endgame::KingPieceTable::valueOf | ( | Square | king, |
Player | defense, | ||
Square | other, | ||
Ptype | ptype | ||
) | const [inline] |
Definition at line 48 of file kingPieceTable.h.
References data, kingIndex(), and otherIndex().
bool operator== | ( | const KingPieceTable & | l, |
KingPieceTable & | r | ||
) | [friend] |
CArray2d<int,Square::SIZE*2,Square::SIZE*PTYPE_SIZE> osl::eval::endgame::KingPieceTable::data [protected] |
Definition at line 33 of file kingPieceTable.h.
Referenced by KingPieceTable(), osl::eval::endgame::operator==(), and valueOf().