Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

GoTimeControl Class Reference

Default time management for Go. More...

#include <GoTimeControl.h>

Inheritance diagram for GoTimeControl:
Inheritance graph
[legend]

List of all members.

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 GoBoardm_bd
float m_finalSpace
 Estimated proportion of remaining space that will be played out.

Detailed Description

Default time management for Go.

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 20 of file GoTimeControl.h.


Constructor & Destructor Documentation

GoTimeControl::GoTimeControl ( const GoBoard bd  ) 

Definition at line 15 of file GoTimeControl.cpp.


Member Function Documentation

float GoTimeControl::FinalSpace (  )  const

Set estimated proportion of occupied points at the end of the game.

See class description.

Definition at line 21 of file GoTimeControl.cpp.

References m_finalSpace.

Referenced by GoGtpEngine::CmdParamTimecontrol().

void GoTimeControl::GetPositionInfo ( SgBlackWhite toPlay,
int &  movesPlayed,
int &  estimatedRemainingMoves 
) [virtual]
void GoTimeControl::SetFinalSpace ( float  finalspace  ) 

See FinalSpace().

Definition at line 38 of file GoTimeControl.cpp.

References m_finalSpace, and SG_ASSERT.

Referenced by GoGtpEngine::CmdParamTimecontrol().


Member Data Documentation

const GoBoard& GoTimeControl::m_bd [private]

Definition at line 44 of file GoTimeControl.h.

Referenced by GetPositionInfo().

float GoTimeControl::m_finalSpace [private]

Estimated proportion of remaining space that will be played out.

Definition at line 47 of file GoTimeControl.h.

Referenced by FinalSpace(), GetPositionInfo(), and SetFinalSpace().


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


Sun Mar 13 2011 Doxygen 1.7.1