osl::game_playing::SpeculativeAllMoves Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

1threadで全ての手を順番に投機的探索をする More...

`#include <speculativeAllMoves.h>`

Inheritance diagram for osl::game_playing::SpeculativeAllMoves:
[legend]
Collaboration diagram for osl::game_playing::SpeculativeAllMoves:
[legend]

## Classes
class | ResultVector
struct | Runner
class | SearchAllMoves
| 指手を生成し，結果をresultsにためる． run を別threadで動かすことを想定しているが，逐次でもテスト可 More...

## Public Member Functions
| SpeculativeAllMoves ()
| ~SpeculativeAllMoves ()
void | startSpeculative (const boost::shared_ptr< GameState > state, const SearchPlayer &main_player)
void | stopOtherThan (Move)
void | stopAll ()
void | setMaxThreads (int new_max_threads)
const MoveWithComment | waitResult (Move last_move, search::TimeAssigned wait_for, SearchPlayer &main_player, int byoyomi)
void | selectBestMoveCleanUp ()
void | clearResource ()
const HashKey | searchState () const
Public Member Functions inherited from osl::game_playing::SpeculativeModel
virtual | ~SpeculativeModel ()
void | clearResource ()

## Private Attributes
boost::shared_ptr< SearchAllMoves > | searcher
boost::scoped_ptr< boost::thread > | thread
boost::scoped_ptr< ResultVector > | results
boost::mutex | mutex
int | last_search_seconds
bool | has_byoyomi
bool | allowed
HashKey | search_state

## Detailed Description

1threadで全ての手を順番に投機的探索をする

Definition at line 32 of file speculativeAllMoves.h.

## Constructor & Destructor Documentation

osl::game_playing::SpeculativeAllMoves::SpeculativeAllMoves | ( | ) |  |

Definition at line 373 of file speculativeAllMoves.cc.

osl::game_playing::SpeculativeAllMoves::~SpeculativeAllMoves | ( | ) |  |

Definition at line 380 of file speculativeAllMoves.cc.

## Member Function Documentation

void osl::game_playing::SpeculativeAllMoves::clearResource | ( | ) |  |

Definition at line 410 of file speculativeAllMoves.cc.

const HashKey osl::game_playing::SpeculativeAllMoves::searchState | ( | ) |  | const
| inlinevirtual

Implements osl::game_playing::SpeculativeModel.

Definition at line 66 of file speculativeAllMoves.h.

References search_state.

void osl::game_playing::SpeculativeAllMoves::selectBestMoveCleanUp | ( | ) |  |
| virtual

Implements osl::game_playing::SpeculativeModel.

Definition at line 530 of file speculativeAllMoves.cc.

void osl::game_playing::SpeculativeAllMoves::setMaxThreads | ( | int | new_max_threads) |  |
| inlinevirtual

Reimplemented from osl::game_playing::SpeculativeModel.

Definition at line 55 of file speculativeAllMoves.h.

References allowed, and mutex.

void osl::game_playing::SpeculativeAllMoves::startSpeculative | ( | const boost::shared_ptr< GameState > | state,
|  | const SearchPlayer & | main_player
| ) |  |
| virtual

Implements osl::game_playing::SpeculativeModel.

Definition at line 387 of file speculativeAllMoves.cc.

void osl::game_playing::SpeculativeAllMoves::stopAll | ( | ) |  |
| virtual

Implements osl::game_playing::SpeculativeModel.

Definition at line 426 of file speculativeAllMoves.cc.

void osl::game_playing::SpeculativeAllMoves::stopOtherThan | ( | Move | the_move) |  |
| virtual

Implements osl::game_playing::SpeculativeModel.

Definition at line 418 of file speculativeAllMoves.cc.

const osl::search::MoveWithComment osl::game_playing::SpeculativeAllMoves::waitResult | ( | Move | last_move,
|  | search::TimeAssigned | ,
|  | SearchPlayer & | main_player,
|  | int | byoyomi
| ) |  |
| virtual

Parameters

  byoyomi | 対局条件を伝えるために利用

Implements osl::game_playing::SpeculativeModel.

Definition at line 435 of file speculativeAllMoves.cc.

References osl::BLACK, osl::ctime_r(), osl::Move::INVALID(), osl::Move::isNormal(), osl::search::TimeAssigned::max, osl::Move::player(), result, osl::search::UsiReporter::showPV(), osl::search::TimeAssigned::standard, osl::game_playing::SearchPlayer::swapTable(), and osl::OslConfig::usiMode().

## Member Data Documentation

bool osl::game_playing::SpeculativeAllMoves::allowed
| private

Definition at line 44 of file speculativeAllMoves.h.

Referenced by setMaxThreads().

bool osl::game_playing::SpeculativeAllMoves::has_byoyomi
| private

Definition at line 43 of file speculativeAllMoves.h.

int osl::game_playing::SpeculativeAllMoves::last_search_seconds
| private

Definition at line 42 of file speculativeAllMoves.h.

boost::mutex osl::game_playing::SpeculativeAllMoves::mutex
| private

Definition at line 41 of file speculativeAllMoves.h.

Referenced by osl::game_playing::SpeculativeAllMoves::SearchAllMoves::currentMove(), osl::game_playing::SpeculativeAllMoves::SearchAllMoves::run(), setMaxThreads(), osl::game_playing::SpeculativeAllMoves::SearchAllMoves::testMove(), and osl::game_playing::SpeculativeAllMoves::SearchAllMoves::waitRunning().

boost::scoped_ptr<ResultVector> osl::game_playing::SpeculativeAllMoves::results
| private

Definition at line 40 of file speculativeAllMoves.h.

Referenced by osl::game_playing::SpeculativeAllMoves::SearchAllMoves::run().

HashKey osl::game_playing::SpeculativeAllMoves::search_state
| private

Definition at line 45 of file speculativeAllMoves.h.

Referenced by searchState().

boost::shared_ptr<SearchAllMoves> osl::game_playing::SpeculativeAllMoves::searcher
| private

Definition at line 36 of file speculativeAllMoves.h.

boost::scoped_ptr<boost::thread> osl::game_playing::SpeculativeAllMoves::thread
| private

Definition at line 39 of file speculativeAllMoves.h.

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

- speculativeAllMoves.h
- speculativeAllMoves.cc