#include <GoAutoBook.h>
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 |
typedef std::map<SgHashCode, SgBookNode> GoAutoBook::Map [private] |
Definition at line 83 of file GoAutoBook.h.
| GoAutoBook::GoAutoBook | ( | const std::string & | filename | ) | throw () |
| GoAutoBook::~GoAutoBook | ( | ) |
Definition at line 101 of file GoAutoBook.cpp.
| 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 | ( | ) |
| 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().
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 |
Map GoAutoBook::m_data [private] |
std::string GoAutoBook::m_filename [private] |