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

SgBookNode Class Reference
[Automatic Opening Book Construction]

State in the Opening Book. More...

#include <SgBookBuilder.h>

List of all members.

Public Member Functions

 SgBookNode ()
 SgBookNode (float heuristicValue)
 Creates a leaf with the given heuristic value.
 SgBookNode (const std::string &str)
 Creates a node from data in string.
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)

Detailed Description

State in the Opening Book.

Definition at line 40 of file SgBookBuilder.h.


Constructor & Destructor Documentation

SgBookNode::SgBookNode (  ) 

Definition at line 90 of file SgBookBuilder.h.

SgBookNode::SgBookNode ( float  heuristicValue  ) 

Creates a leaf with the given heuristic value.

Definition at line 94 of file SgBookBuilder.h.

SgBookNode::SgBookNode ( const std::string &  str  ) 

Creates a node from data in string.

Uses same format as ToString().

Definition at line 102 of file SgBookBuilder.h.

References FromString().


Member Function Documentation

void SgBookNode::FromString ( const std::string &  str  )  [private]

Definition at line 40 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 107 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 25 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 18 of file SgBookBuilder.cpp.

Referenced by SgBookBuilder::Cover(), SgBookBuilder::DoExpansion(), SgBookBuilder::Expand(), SgBookBuilder::IncreaseWidth(), and SgBookBuilder::Refresh().

std::string SgBookNode::ToString (  )  const

Outputs node in string form.

Definition at line 30 of file SgBookBuilder.cpp.

References m_count, m_heurValue, m_priority, and m_value.

Referenced by operator<<().


Member Data Documentation

const float SgBookNode::LEAF_PRIORITY = 0.0 [static]

Priority of newly created leaves.

Definition at line 46 of file SgBookBuilder.h.

Number of times this node was explored.

Definition at line 60 of file SgBookBuilder.h.

Referenced by SgBookBuilder::Cover(), SgBookBuilder::DoExpansion(), FromString(), SgBookBuilder::IncreaseWidth(), IncrementCount(), IsLeaf(), and ToString().

Heuristic value of this state.

Definition at line 51 of file SgBookBuilder.h.

Referenced by FromString(), and ToString().

Expansion priority.

Definition at line 57 of file SgBookBuilder.h.

Referenced by FromString(), SgBookBuilder::Refresh(), ToString(), and SgBookBuilder::UpdatePriority().

Minmax value of this state.

Definition at line 54 of file SgBookBuilder.h.

Referenced by SgBookBuilder::ComputePriority(), FromString(), ToString(), and SgBookBuilder::UpdateValue().


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


Sun Mar 13 2011 Doxygen 1.7.1