WeightedBookの追跡 More...
#include <weightTracer.h>
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 &) | |
OpeningBookTracer * | clone () const |
new したものを返す | |
void | update (Move) |
指した手に対応して状態を更新する. | |
const Move | selectMove () const |
良い手を探す.状態は更新しない. | |
int | stateIndex () const |
bool | isOutOfBook () const |
void | popMove () |
一手前の状態に戻す | |
Protected Member Functions | |
const osl::Move | selectMoveAtRandom (const std::vector< osl::record::opening::WMove > &moves) const |
Protected Attributes | |
WeightedBook & | book |
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 |
WeightedBookの追跡
Definition at line 24 of file weightTracer.h.
Definition at line 27 of file weightTracer.h.
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.
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] |
良い手を探す.状態は更新しない.
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] |
Definition at line 96 of file weightTracer.cc.
References osl::Move::INVALID(), osl::record::csa::show(), osl::misc::time_seeded_random(), verbose, and weight.
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.
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.