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

定跡がある間は定跡を使うComputerPlayer More...

#include <bookPlayer.h>

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

Public Member Functions

 BookPlayer (OpeningBookTracer *, ComputerPlayer *)
 所有権移転: new したものを渡すこと More...
 
 ~BookPlayer ()
 
ComputerPlayerclone () const
 new したものを返す More...
 
void setBookLimit (int new_limit)
 何手まで定跡を使うかを設定. More...
 
void setInitialState (const NumEffectState &)
 
void pushMove (Move m)
 
void popMove ()
 
const MoveWithComment selectBestMove (const GameState &, int seconds, int elapsed, int byoyomi)
 
const MoveWithComment selectBestMoveInTime (const GameState &, const search::TimeAssigned &)
 
bool bookAvailable () const
 
void allowSpeculativeSearch (bool value)
 相手時間の探索を許可する (GameManager が操作) More...
 
virtual bool stopSearchNow ()
 探索をとめる More...
 
void setRootIgnoreMoves (const container::MoveVector *rim, bool prediction)
 注意: 定跡に関しては指定は無効 More...
 
- Public Member Functions inherited from osl::game_playing::ComputerPlayer
 ComputerPlayer ()
 
virtual ~ComputerPlayer ()
 
virtual bool isReasonableMove (const GameState &, Move move, int pawn_sacrifice)
 
- Public Member Functions inherited from osl::game_playing::ComputerPlayerSelectBestMoveInTime
virtual ~ComputerPlayerSelectBestMoveInTime ()
 

Private Member Functions

const Move moveByBook (const GameState &state)
 

Private Attributes

boost::scoped_ptr
< OpeningBookTracer
book
 
boost::scoped_ptr< ComputerPlayersearcher
 
int book_limit
 
int current_moves
 
bool valid_initial_position
 

Additional Inherited Members

- Protected Attributes inherited from osl::game_playing::ComputerPlayer
bool speculative_search_allowed
 

Detailed Description

定跡がある間は定跡を使うComputerPlayer

Definition at line 16 of file bookPlayer.h.

Constructor & Destructor Documentation

osl::game_playing::BookPlayer::BookPlayer ( OpeningBookTracer b,
ComputerPlayer s 
)

所有権移転: new したものを渡すこと

Definition at line 13 of file bookPlayer.cc.

osl::game_playing::BookPlayer::~BookPlayer ( )

Definition at line 19 of file bookPlayer.cc.

Member Function Documentation

void osl::game_playing::BookPlayer::allowSpeculativeSearch ( bool  value)
virtual

相手時間の探索を許可する (GameManager が操作)

Reimplemented from osl::game_playing::ComputerPlayer.

Definition at line 104 of file bookPlayer.cc.

References osl::game_playing::ComputerPlayer::allowSpeculativeSearch().

bool osl::game_playing::BookPlayer::bookAvailable ( ) const

Definition at line 62 of file bookPlayer.cc.

References book().

osl::game_playing::ComputerPlayer * osl::game_playing::BookPlayer::clone ( ) const
virtual

new したものを返す

Implements osl::game_playing::ComputerPlayer.

Definition at line 24 of file bookPlayer.cc.

References book().

const osl::Move osl::game_playing::BookPlayer::moveByBook ( const GameState state)
private
void osl::game_playing::BookPlayer::popMove ( )
virtual

Implements osl::game_playing::ComputerPlayer.

Definition at line 53 of file bookPlayer.cc.

References book().

void osl::game_playing::BookPlayer::pushMove ( Move  m)
virtual

Implements osl::game_playing::ComputerPlayer.

Definition at line 45 of file bookPlayer.cc.

References book().

const osl::search::MoveWithComment osl::game_playing::BookPlayer::selectBestMove ( const GameState ,
int  seconds,
int  elapsed,
int  byoyomi 
)
virtual
Parameters
seconds残り持ち時間

Implements osl::game_playing::ComputerPlayer.

Definition at line 83 of file bookPlayer.cc.

References osl::Move::isNormal().

const osl::search::MoveWithComment osl::game_playing::BookPlayer::selectBestMoveInTime ( const GameState state,
const search::TimeAssigned msec 
)
virtual
void osl::game_playing::BookPlayer::setBookLimit ( int  new_limit)

何手まで定跡を使うかを設定.

-1 なら無限大

Definition at line 30 of file bookPlayer.cc.

void osl::game_playing::BookPlayer::setInitialState ( const NumEffectState &  state)
virtual

Reimplemented from osl::game_playing::ComputerPlayer.

Definition at line 36 of file bookPlayer.cc.

References book(), and osl::HIRATE.

void osl::game_playing::BookPlayer::setRootIgnoreMoves ( const container::MoveVector rim,
bool  prediction 
)
virtual

注意: 定跡に関しては指定は無効

Reimplemented from osl::game_playing::ComputerPlayer.

Definition at line 111 of file bookPlayer.cc.

References osl::game_playing::ComputerPlayer::setRootIgnoreMoves().

bool osl::game_playing::BookPlayer::stopSearchNow ( )
virtual

探索をとめる

Reimplemented from osl::game_playing::ComputerPlayer.

Definition at line 118 of file bookPlayer.cc.

Member Data Documentation

boost::scoped_ptr<OpeningBookTracer> osl::game_playing::BookPlayer::book
private

Definition at line 20 of file bookPlayer.h.

int osl::game_playing::BookPlayer::book_limit
private

Definition at line 22 of file bookPlayer.h.

int osl::game_playing::BookPlayer::current_moves
private

Definition at line 23 of file bookPlayer.h.

boost::scoped_ptr<ComputerPlayer> osl::game_playing::BookPlayer::searcher
private

Definition at line 21 of file bookPlayer.h.

bool osl::game_playing::BookPlayer::valid_initial_position
private

Definition at line 24 of file bookPlayer.h.


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