osl::game_playing::SpeculativeAllMoves::SearchAllMoves 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 Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
osl::game_playing::SpeculativeAllMoves::SearchAllMoves Class Reference

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

`#include <speculativeAllMoves.h>`

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

## Classes
struct | Generator
struct | StatusLock

## Public Types
enum | Status { INITIAL, RUNNING, PREDICTION1, PREDICTION2, SEARCH1, SEARCH2, FINISHED }

## Public Member Functions
| SearchAllMoves (SpeculativeAllMoves::ResultVector &)
| ~SearchAllMoves ()
void | setUp (const GameState &, const SearchPlayer &, int standard_seconds, bool has_byoyomi)
void | run ()
void | stopNow ()
void | stopOtherThan (Move)
void | waitRunning ()
bool | isFinished () const
void | setTimeAssign (const search::TimeAssigned &)
const MilliSeconds | startTime ()
const Move | currentMove () const
SearchPlayer * | currentPlayer ()

## Private Types
typedef boost::mutex | Mutex

## Private Member Functions
const MoveWithComment | testMove (Move)

## Private Attributes
boost::shared_ptr< GameState > | state
boost::shared_ptr< SearchPlayer > | player
boost::scoped_ptr< Generator > | generator
SpeculativeAllMoves::ResultVector & | results
double | next_iteration_coefficient
Move | current_move
volatile Status | status
int | seconds
Mutex | mutex
boost::condition | condition
volatile bool | stop_flag
| true なら次の予想探索にはいらない More...

## Friends
struct | Generator
class | SpeculativeAllMoves

## Detailed Description

指手を生成し，結果をresultsにためる． run を別threadで動かすことを想定しているが，逐次でもテスト可

Definition at line 91 of file speculativeAllMoves.h.

## Member Typedef Documentation

typedef boost::mutex osl::game_playing::SpeculativeAllMoves::SearchAllMoves::Mutex
| private

Definition at line 109 of file speculativeAllMoves.h.

## Member Enumeration Documentation

enum osl::game_playing::SpeculativeAllMoves::SearchAllMoves::Status

Enumerator
INITIAL |
RUNNING |
PREDICTION1 |
PREDICTION2 |
SEARCH1 |
SEARCH2 |
FINISHED |

Definition at line 94 of file speculativeAllMoves.h.

## Constructor & Destructor Documentation

osl::game_playing::SpeculativeAllMoves::SearchAllMoves::SearchAllMoves | ( | SpeculativeAllMoves::ResultVector & | r) |  |
| explicit

Definition at line 158 of file speculativeAllMoves.cc.

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

Definition at line 166 of file speculativeAllMoves.cc.

## Member Function Documentation

const osl::Move osl::game_playing::SpeculativeAllMoves::SearchAllMoves::currentMove | ( | ) |  | const

Definition at line 344 of file speculativeAllMoves.cc.

References osl::game_playing::SpeculativeAllMoves::mutex.

SearchPlayer* osl::game_playing::SpeculativeAllMoves::SearchAllMoves::currentPlayer | ( | ) |  |
| inline

Definition at line 132 of file speculativeAllMoves.h.

References player.

bool osl::game_playing::SpeculativeAllMoves::SearchAllMoves::isFinished | ( | ) |  | const
| inline

Definition at line 126 of file speculativeAllMoves.h.

References FINISHED, and status.

void osl::game_playing::SpeculativeAllMoves::SearchAllMoves::run | ( | ) |  |

Definition at line 197 of file speculativeAllMoves.cc.

References osl::Move::isNormal(), osl::game_playing::SpeculativeAllMoves::mutex, result, and osl::game_playing::SpeculativeAllMoves::results.

void osl::game_playing::SpeculativeAllMoves::SearchAllMoves::setTimeAssign | ( | const search::TimeAssigned & | new_assign) |  |

Definition at line 324 of file speculativeAllMoves.cc.

void osl::game_playing::SpeculativeAllMoves::SearchAllMoves::setUp | ( | const GameState & | main_state,
|  | const SearchPlayer & | main_player,
|  | int | standard_seconds,
|  | bool | has_byoyomi
| ) |  |

Definition at line 171 of file speculativeAllMoves.cc.

References osl::game_playing::ComputerPlayer::clone(), osl::game_playing::GameState::clone(), osl::eval::max(), osl::eval::min(), and osl::game_playing::SearchPlayer::nextIterationCoefficient().

const osl::MilliSeconds osl::game_playing::SpeculativeAllMoves::SearchAllMoves::startTime | ( | ) |  |

Definition at line 333 of file speculativeAllMoves.cc.

void osl::game_playing::SpeculativeAllMoves::SearchAllMoves::stopNow | ( | ) |  |

Definition at line 297 of file speculativeAllMoves.cc.

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

Definition at line 276 of file speculativeAllMoves.cc.

References osl::OslConfig::setUsiSilent(), osl::record::csa::show(), and osl::OslConfig::usiMode().

const osl::search::MoveWithComment osl::game_playing::SpeculativeAllMoves::SearchAllMoves::testMove | ( | Move | predicted_move) |  |
| private

Definition at line 228 of file speculativeAllMoves.cc.

References osl::ctime_r(), osl::Move::INVALID(), osl::game_playing::SpeculativeAllMoves::mutex, result, and osl::record::csa::show().

void osl::game_playing::SpeculativeAllMoves::SearchAllMoves::waitRunning | ( | ) |  |

Definition at line 312 of file speculativeAllMoves.cc.

References osl::game_playing::SpeculativeAllMoves::mutex.

## Friends And Related Function Documentation

friend struct Generator
| friend

Definition at line 97 of file speculativeAllMoves.h.

friend class SpeculativeAllMoves
| friend

Definition at line 99 of file speculativeAllMoves.h.

## Member Data Documentation

boost::condition osl::game_playing::SpeculativeAllMoves::SearchAllMoves::condition
| private

Definition at line 111 of file speculativeAllMoves.h.

Move osl::game_playing::SpeculativeAllMoves::SearchAllMoves::current_move
| private

Definition at line 106 of file speculativeAllMoves.h.

boost::scoped_ptr<Generator> osl::game_playing::SpeculativeAllMoves::SearchAllMoves::generator
| private

Definition at line 103 of file speculativeAllMoves.h.

Mutex osl::game_playing::SpeculativeAllMoves::SearchAllMoves::mutex
| mutableprivate

Definition at line 110 of file speculativeAllMoves.h.

double osl::game_playing::SpeculativeAllMoves::SearchAllMoves::next_iteration_coefficient
| private

Definition at line 105 of file speculativeAllMoves.h.

boost::shared_ptr<SearchPlayer> osl::game_playing::SpeculativeAllMoves::SearchAllMoves::player
| private

Definition at line 102 of file speculativeAllMoves.h.

Referenced by currentPlayer().

SpeculativeAllMoves::ResultVector& osl::game_playing::SpeculativeAllMoves::SearchAllMoves::results
| private

Definition at line 104 of file speculativeAllMoves.h.

int osl::game_playing::SpeculativeAllMoves::SearchAllMoves::seconds
| private

Definition at line 108 of file speculativeAllMoves.h.

boost::shared_ptr<GameState> osl::game_playing::SpeculativeAllMoves::SearchAllMoves::state
| private

Definition at line 101 of file speculativeAllMoves.h.

volatile Status osl::game_playing::SpeculativeAllMoves::SearchAllMoves::status
| private

Definition at line 107 of file speculativeAllMoves.h.

Referenced by isFinished().

volatile bool osl::game_playing::SpeculativeAllMoves::SearchAllMoves::stop_flag
| private

true なら次の予想探索にはいらない

Definition at line 113 of file speculativeAllMoves.h.

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

- speculativeAllMoves.h
- speculativeAllMoves.cc