My Project
Public Member Functions | Private Attributes | List of all members
osl::MoveLogProb Class Reference

#include <moveLogProb.h>

Inheritance diagram for osl::MoveLogProb:
osl::Move

Public Member Functions

 MoveLogProb (Move m, int l)
 
 MoveLogProb ()
 
void setLogProb (int l)
 
void setLogProbAtLeast (int l)
 logProb を数字上最低 l にする.
 
void setLogProbAtMost (int l)
 logProb を数字上最高 l にする.
 
const Move move () const
 
int logProb () const
 
bool validMove () const
 
Player player () const
 
bool isNormal () const
 INVALID でも PASS でもない.
 
bool isPass () const
 

Private Attributes

int log_prob
 

Additional Inherited Members

- Private Member Functions inherited from osl::Move
int intValue () const
 
unsigned int hash () const
 駒を取らない手を [0, 16305] にmap
 
 Move ()
 
bool isNormal () const
 INVALID でも PASS でもない.
 
bool isPass () const
 
 Move (Square from, Square to, Ptype ptype, Ptype capture_ptype, bool is_promote, Player player)
 移動
 
 Move (Square to, Ptype ptype, Player player)
 drop
 
Move16 toMove16 () const
 
const Square from () const
 
const Square to () const
 
unsigned int fromTo () const
 fromとtoをまとめて同一性の判定など
 
int promoteMask () const
 pieceに使うためのmaskなので
 
bool isPromotion () const
 
bool isCapture () const
 
bool isCaptureOrPromotion () const
 
bool isDrop () const
 
bool isPawnDrop () const
 
Ptype ptype () const
 
PtypeO ptypeO () const
 移動後のPtype, i.e., 成る手だった場合成った後
 
PtypeO oldPtypeO () const
 移動前のPtypeO, i.e., 成る手だった場合成る前
 
Ptype oldPtype () const
 移動前のPtype, i.e., 成る手だった場合成る前
 
Ptype capturePtype () const
 
PtypeO capturePtypeO () const
 
PtypeO capturePtypeOSafe () const
 
Player player () const
 
bool isValid () const
 
bool isInvalid () const
 state に apply 可能でない場合にtrue
 
bool isValidOrPass () const
 
Move newFrom (Square new_from) const
 
Move newAddFrom (Square new_from) const
 
const Move newAddCapture (Piece capture) const
 no capture moveからcapture moveを作る
 
const Move newCapture (Piece capture) const
 
const Move newCapture (Ptype capture) const
 
const Move unpromote () const
 promote moveからunpromote moveを作る
 
const Move promote () const
 unpromote moveからpromote moveを作る
 
Move newAddTo (Offset o) const
 moveのtoをoffsetだけ変える. 元のtoが0以外でも使える
 
Move newAddTo (Square sq) const
 つくってあったmoveの雛形のsquareをsetする. mのtoは0
 
Move newAddPtype (Ptype newPtype) const
 作ってあったPTYPE_EMPTYのひな形のPTYPEをsetする
 
template<Player P>
bool ignoreUnpromote () const
 合法手ではあるが,打歩詰め絡み以外では有利にはならない手.
 
bool ignoreUnpromote () const
 
template<Player P>
bool hasIgnoredUnpromote () const
 MoveをunpromoteするとcutUnpromoteなMoveになる
 
bool hasIgnoredUnpromote () const
 
const Move rotate180 () const
 
- Static Private Member Functions inherited from osl::Move
static const Move makeDirect (int value)
 
static const Move PASS (Player P)
 
static const Move INVALID ()
 
static const Move DeclareWin ()
 
static const Move fromMove16 (Move16, const SimpleState &)
 
template<Player P>
static bool ignoreUnpromote (Ptype ptype, Square from, Square to)
 
- Static Private Attributes inherited from osl::Move
static const int BitOffsetPromote =Piece::BitOffsetMovePromote
 
static const unsigned int MaxUniqMoves =600
 一局面辺りの合法手の最大値 重複して手を生成することがある場合は,600では不足かもしれない
 

Detailed Description

Definition at line 9 of file moveLogProb.h.

Constructor & Destructor Documentation

◆ MoveLogProb() [1/2]

osl::MoveLogProb::MoveLogProb ( Move  m,
int  l 
)
inline

Definition at line 13 of file moveLogProb.h.

References osl::Move::isInvalid(), and osl::Move::isValidOrPass().

◆ MoveLogProb() [2/2]

osl::MoveLogProb::MoveLogProb ( )
inline

Definition at line 17 of file moveLogProb.h.

Member Function Documentation

◆ isNormal()

bool osl::Move::isNormal ( ) const
inline

INVALID でも PASS でもない.

isValid()かどうかは分からない.

Definition at line 1088 of file basic_type.h.

◆ isPass()

bool osl::Move::isPass ( ) const
inline

Definition at line 1092 of file basic_type.h.

◆ logProb()

int osl::MoveLogProb::logProb ( ) const
inline

◆ move()

const Move osl::MoveLogProb::move ( ) const
inline

◆ player()

Player osl::Move::player ( ) const
inline

Definition at line 1195 of file basic_type.h.

◆ setLogProb()

void osl::MoveLogProb::setLogProb ( int  l)
inline

Definition at line 19 of file moveLogProb.h.

References log_prob.

Referenced by setLogProbAtLeast(), and setLogProbAtMost().

◆ setLogProbAtLeast()

void osl::MoveLogProb::setLogProbAtLeast ( int  l)
inline

logProb を数字上最低 l にする.

確率としては,高すぎる確率の場合, l に補正する

Definition at line 24 of file moveLogProb.h.

References logProb(), and setLogProb().

◆ setLogProbAtMost()

void osl::MoveLogProb::setLogProbAtMost ( int  l)
inline

logProb を数字上最高 l にする.

確率としては,低すぎる確率の場合, l に補正する

Definition at line 33 of file moveLogProb.h.

References logProb(), and setLogProb().

◆ validMove()

bool osl::MoveLogProb::validMove ( ) const
inline

Definition at line 41 of file moveLogProb.h.

References log_prob.

Member Data Documentation

◆ log_prob

int osl::MoveLogProb::log_prob
private

Definition at line 11 of file moveLogProb.h.

Referenced by logProb(), setLogProb(), and validMove().


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