#include <GoTimeControl.h>
Inheritance diagram for GoTimeControl:
Implements SgDefaultTimeControl. The remaining number of moves in the game is estimated by comparing the number of empty points to the expected final number of empty points (can be tuned with the SetFinalSpace() parameter; default = 0.75).
Definition at line 22 of file GoTimeControl.h.
Public Member Functions | |
GoTimeControl (const GoBoard &bd) | |
void | GetPositionInfo (SgBlackWhite &toPlay, int &movesPlayed, int &estimatedRemainingMoves) |
double | TimeForCurrentMove (const SgTimeRecord &timeRecord, bool quiet=false) |
double | FastOpenFactor () const |
void | SetFastOpenFactor (double factor) |
int | FastOpenMoves () const |
void | SetFastOpenMoves (int nummoves) |
double | RemainingConstant () const |
void | SetRemainingConstant (double value) |
void | SetMinTime (double mintime) |
Parameters | |
float | FinalSpace () const |
Set estimated proportion of occupied points at the end of the game. | |
void | SetFinalSpace (float finalspace) |
See FinalSpace(). | |
Private Attributes | |
const GoBoard & | m_bd |
float | m_finalSpace |
Estimated proportion of remaining space that will be played out. |
GoTimeControl::GoTimeControl | ( | const GoBoard & | bd | ) |
Definition at line 16 of file GoTimeControl.cpp.
float GoTimeControl::FinalSpace | ( | ) | const |
Set estimated proportion of occupied points at the end of the game.
See class description.
Definition at line 22 of file GoTimeControl.cpp.
References m_finalSpace.
Referenced by GoGtpEngine::CmdParamTimecontrol().
void GoTimeControl::GetPositionInfo | ( | SgBlackWhite & | toPlay, | |
int & | movesPlayed, | |||
int & | estimatedRemainingMoves | |||
) | [virtual] |
Implements SgDefaultTimeControl.
Definition at line 27 of file GoTimeControl.cpp.
References GoBoard::AllPoints(), m_bd, m_finalSpace, GoBoard::Occupied(), SgPointSet::Size(), GoBoard::ToPlay(), and GoBoard::TotalNumEmpty().
void GoTimeControl::SetFinalSpace | ( | float | finalspace | ) |
See FinalSpace().
Definition at line 39 of file GoTimeControl.cpp.
References m_finalSpace, and SG_ASSERT.
Referenced by GoGtpEngine::CmdParamTimecontrol().
const GoBoard& GoTimeControl::m_bd [private] |
float GoTimeControl::m_finalSpace [private] |
Estimated proportion of remaining space that will be played out.
Definition at line 50 of file GoTimeControl.h.
Referenced by FinalSpace(), GetPositionInfo(), and SetFinalSpace().