All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osl::game_playing::WeightTracer Class Reference

WeightedBookの追跡 More...

#include <weightTracer.h>

Inheritance diagram for osl::game_playing::WeightTracer:
Inheritance graph
[legend]
Collaboration diagram for osl::game_playing::WeightTracer:
Collaboration graph
[legend]

Public Types

typedef
record::opening::WeightedBook 
WeightedBook
 

Public Member Functions

 WeightTracer (WeightedBook &, bool verbose=false, const int weight_coef_for_the_initial_move=16, const int weight_coef=10)
 
 WeightTracer (const WeightTracer &)
 
OpeningBookTracerclone () const
 new したものを返す More...
 
void update (Move)
 指した手に対応して状態を更新する. More...
 
const Move selectMove () const
 良い手を探す.状態は更新しない. More...
 
int stateIndex () const
 
bool isOutOfBook () const
 
void popMove ()
 一手前の状態に戻す More...
 
- Public Member Functions inherited from osl::game_playing::OpeningBookTracer
 OpeningBookTracer ()
 
virtual ~OpeningBookTracer ()
 
bool isVerbose () const
 

Protected Member Functions

const osl::Move selectMoveAtRandom (const std::vector< osl::record::opening::WMove > &moves) const
 

Protected Attributes

WeightedBookbook
 
int state_index
 
int start_index
 
Player turn
 
osl::stack< int > state_stack
 
const int weight_coef_for_the_initial_move
 
const int weight_coef
 
- Protected Attributes inherited from osl::game_playing::OpeningBookTracer
bool verbose
 

Detailed Description

WeightedBookの追跡

Definition at line 24 of file weightTracer.h.

Member Typedef Documentation

Definition at line 27 of file weightTracer.h.

Constructor & Destructor Documentation

osl::game_playing::WeightTracer::WeightTracer ( WeightedBook b,
bool  verbose = false,
const int  weight_coef_for_the_initial_move = 16,
const int  weight_coef = 10 
)
explicit

Definition at line 15 of file weightTracer.cc.

References osl::game_playing::OpeningBookTracer::verbose.

osl::game_playing::WeightTracer::WeightTracer ( const WeightTracer copy)

Definition at line 27 of file weightTracer.cc.

Member Function Documentation

osl::game_playing::OpeningBookTracer * osl::game_playing::WeightTracer::clone ( ) const
virtual

new したものを返す

Implements osl::game_playing::OpeningBookTracer.

Reimplemented in osl::game_playing::DeterminateWeightTracer.

Definition at line 38 of file weightTracer.cc.

bool osl::game_playing::WeightTracer::isOutOfBook ( ) const
virtual

Implements osl::game_playing::OpeningBookTracer.

Definition at line 90 of file weightTracer.cc.

void osl::game_playing::WeightTracer::popMove ( )
virtual

一手前の状態に戻す

Implements osl::game_playing::OpeningBookTracer.

Definition at line 80 of file weightTracer.cc.

References osl::alt(), and verbose.

const osl::Move osl::game_playing::WeightTracer::selectMove ( ) const
virtual

良い手を探す.状態は更新しない.

Returns
定跡をはずれたら Move::INVALID()

Implements osl::game_playing::OpeningBookTracer.

Reimplemented in osl::game_playing::DeterminateWeightTracer.

Definition at line 145 of file weightTracer.cc.

References book(), osl::record::opening::WeightedBook::getMoves(), osl::Move::INVALID(), and moves.

const osl::Move osl::game_playing::WeightTracer::selectMoveAtRandom ( const std::vector< osl::record::opening::WMove > &  moves) const
protected
int osl::game_playing::WeightTracer::stateIndex ( ) const
inline

Definition at line 46 of file weightTracer.h.

References state_index.

void osl::game_playing::WeightTracer::update ( Move  )
virtual

指した手に対応して状態を更新する.

Implements osl::game_playing::OpeningBookTracer.

Definition at line 44 of file weightTracer.cc.

References osl::alt(), book(), osl::ctime_r(), osl::record::opening::WeightedBook::getMoves(), moves, osl::Move::player(), osl::record::csa::show(), and verbose.

Member Data Documentation

WeightedBook& osl::game_playing::WeightTracer::book
protected

Definition at line 29 of file weightTracer.h.

int osl::game_playing::WeightTracer::start_index
protected

Definition at line 30 of file weightTracer.h.

int osl::game_playing::WeightTracer::state_index
protected

Definition at line 30 of file weightTracer.h.

Referenced by stateIndex().

osl::stack<int> osl::game_playing::WeightTracer::state_stack
protected

Definition at line 32 of file weightTracer.h.

Player osl::game_playing::WeightTracer::turn
protected

Definition at line 31 of file weightTracer.h.

const int osl::game_playing::WeightTracer::weight_coef
protected

Definition at line 35 of file weightTracer.h.

const int osl::game_playing::WeightTracer::weight_coef_for_the_initial_move
protected

Definition at line 34 of file weightTracer.h.


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