Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoTimeControl Class Reference

#include <GoTimeControl.h>

Inheritance diagram for GoTimeControl:

Inheritance graph
[legend]
List of all members.

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


Constructor & Destructor Documentation

GoTimeControl::GoTimeControl ( const GoBoard bd  ) 

Definition at line 16 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 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().


Member Data Documentation

const GoBoard& GoTimeControl::m_bd [private]

Definition at line 47 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 50 of file GoTimeControl.h.

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


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


17 Jun 2010 Doxygen 1.4.7