#include <SgBookBuilder.h>
Definition at line 44 of file SgBookBuilder.h.
Public Member Functions | |
SgBookNode () | |
SgBookNode (float heuristicValue) | |
SgBookNode (const std::string &str) | |
bool | IsLeaf () const |
Returns true if this node is a leaf in the opening book, ie, its count is zero. | |
bool | IsTerminal () const |
Returns true if propagated value is a win or a loss. | |
void | IncrementCount () |
Increment the node's counter. | |
std::string | ToString () const |
Outputs node in string form. | |
Public Attributes | |
float | m_heurValue |
Heuristic value of this state. | |
float | m_value |
Minmax value of this state. | |
float | m_priority |
Expansion priority. | |
unsigned | m_count |
Number of times this node was explored. | |
Static Public Attributes | |
static const float | LEAF_PRIORITY = 0.0 |
Priority of newly created leaves. | |
Private Member Functions | |
void | FromString (const std::string &str) |
SgBookNode::SgBookNode | ( | ) |
Definition at line 91 of file SgBookBuilder.h.
SgBookNode::SgBookNode | ( | float | heuristicValue | ) |
Definition at line 95 of file SgBookBuilder.h.
SgBookNode::SgBookNode | ( | const std::string & | str | ) |
void SgBookNode::FromString | ( | const std::string & | str | ) | [private] |
Definition at line 37 of file SgBookBuilder.cpp.
References m_count, m_heurValue, m_priority, and m_value.
Referenced by SgBookNode().
void SgBookNode::IncrementCount | ( | ) |
Increment the node's counter.
Definition at line 108 of file SgBookBuilder.h.
References m_count.
Referenced by SgBookBuilder::DoExpansion().
bool SgBookNode::IsLeaf | ( | ) | const |
Returns true if this node is a leaf in the opening book, ie, its count is zero.
Definition at line 22 of file SgBookBuilder.cpp.
References m_count.
Referenced by SgBookBuilder::DoExpansion(), SgBookBuilder::IncreaseWidth(), and SgBookBuilder::Refresh().
bool SgBookNode::IsTerminal | ( | ) | const |
Returns true if propagated value is a win or a loss.
Definition at line 15 of file SgBookBuilder.cpp.
Referenced by SgBookBuilder::DoExpansion(), SgBookBuilder::Expand(), SgBookBuilder::IncreaseWidth(), and SgBookBuilder::Refresh().
std::string SgBookNode::ToString | ( | ) | const |
Outputs node in string form.
Definition at line 27 of file SgBookBuilder.cpp.
References m_count, m_heurValue, m_priority, and m_value.
Referenced by operator<<().
const float SgBookNode::LEAF_PRIORITY = 0.0 [static] |
unsigned SgBookNode::m_count |
Number of times this node was explored.
Definition at line 64 of file SgBookBuilder.h.
Referenced by SgBookBuilder::DoExpansion(), FromString(), SgBookBuilder::IncreaseWidth(), IncrementCount(), IsLeaf(), and ToString().
float SgBookNode::m_heurValue |
Heuristic value of this state.
Definition at line 55 of file SgBookBuilder.h.
Referenced by FromString(), and ToString().
float SgBookNode::m_priority |
Expansion priority.
Definition at line 61 of file SgBookBuilder.h.
Referenced by FromString(), SgBookBuilder::Refresh(), ToString(), and SgBookBuilder::UpdatePriority().
float SgBookNode::m_value |
Minmax value of this state.
Definition at line 58 of file SgBookBuilder.h.
Referenced by SgBookBuilder::ComputePriority(), FromString(), ToString(), and SgBookBuilder::UpdateValue().