Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoAutoBook Class Reference

#include <GoAutoBook.h>

List of all members.


Detailed Description

Definition at line 63 of file GoAutoBook.h.

Public Member Functions

 GoAutoBook (const std::string &filename) throw ()
 ~GoAutoBook ()
bool Get (const GoAutoBookState &state, SgBookNode &node) const
void Put (const GoAutoBookState &state, const SgBookNode &node)
void Flush ()
void Save (const std::string &filename) const
SgMove LookupMove (const GoBoard &brd) const
SgMove FindBestChild (GoAutoBookState &state) const

Private Types

typedef std::map< SgHashCode,
SgBookNode
Map

Private Attributes

Map m_data
std::string m_filename


Member Typedef Documentation

typedef std::map<SgHashCode, SgBookNode> GoAutoBook::Map [private]

Definition at line 83 of file GoAutoBook.h.


Constructor & Destructor Documentation

GoAutoBook::GoAutoBook ( const std::string &  filename  )  throw ()

Definition at line 70 of file GoAutoBook.cpp.

References SgHash< N >::FromString(), and SgDebug().

GoAutoBook::~GoAutoBook (  ) 

Definition at line 101 of file GoAutoBook.cpp.


Member Function Documentation

SgMove GoAutoBook::FindBestChild ( GoAutoBookState state  )  const

Definition at line 137 of file GoAutoBook.cpp.

References GoAutoBookState::Board(), Get(), SgBookNode::IsLeaf(), GoBoard::IsLegal(), SgBookNode::IsTerminal(), SgBookNode::m_count, GoAutoBookState::Play(), SG_NULLMOVE, and GoAutoBookState::Undo().

Referenced by LookupMove().

void GoAutoBook::Flush (  ) 

Definition at line 121 of file GoAutoBook.cpp.

References m_filename, and Save().

bool GoAutoBook::Get ( const GoAutoBookState state,
SgBookNode node 
) const

Definition at line 105 of file GoAutoBook.cpp.

References GoAutoBookState::GetHashCode(), and m_data.

Referenced by FindBestChild().

SgMove GoAutoBook::LookupMove ( const GoBoard brd  )  const

Definition at line 165 of file GoAutoBook.cpp.

References FindBestChild(), and GoAutoBookState::Synchronize().

void GoAutoBook::Put ( const GoAutoBookState state,
const SgBookNode node 
)

Definition at line 116 of file GoAutoBook.cpp.

References GoAutoBookState::GetHashCode(), and m_data.

void GoAutoBook::Save ( const std::string &  filename  )  const

Definition at line 126 of file GoAutoBook.cpp.

References m_data.

Referenced by Flush().


Member Data Documentation

Map GoAutoBook::m_data [private]

Definition at line 85 of file GoAutoBook.h.

Referenced by Get(), Put(), and Save().

std::string GoAutoBook::m_filename [private]

Definition at line 87 of file GoAutoBook.h.

Referenced by Flush().


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


17 Jun 2010 Doxygen 1.4.7