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

GoUctDefaultPriorKnowledge Class Reference

Default prior knowledge heuristic. More...

#include <GoUctDefaultPriorKnowledge.h>

Inheritance diagram for GoUctDefaultPriorKnowledge:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GoUctDefaultPriorKnowledge (const GoBoard &bd, const GoUctPlayoutPolicyParam &param)
void ProcessPosition (std::vector< SgUctMoveInfo > &moves)
bool FindGlobalPatternAndAtariMoves (SgPointSet &pattern, SgPointSet &atari, GoPointList &empty) const
 Find global moves that match a playout pattern or set a block into atari.

Protected Member Functions

void Add (SgPoint p, SgUctValue value, SgUctValue count)
void Initialize (SgPoint p, SgUctValue value, SgUctValue count)
void ClearValues ()
void TransferValues (std::vector< SgUctMoveInfo > &outmoves) const

Protected Attributes

const GoBoardm_bd
SgArray< SgStatisticsBase
< SgUctValue, SgUctValue >
, SG_PASS+1 > 
m_values

Private Member Functions

void AddLocalityBonus (GoPointList &emptyPoints, bool isSmallBoard)

Private Attributes

GoUctPlayoutPolicy< GoBoardm_policy

Detailed Description

Default prior knowledge heuristic.

Mainly uses GoUctPlayoutPolicy to generate prior knowledge.

Definition at line 41 of file GoUctDefaultPriorKnowledge.h.


Constructor & Destructor Documentation

GoUctDefaultPriorKnowledge::GoUctDefaultPriorKnowledge ( const GoBoard bd,
const GoUctPlayoutPolicyParam param 
)

Definition at line 83 of file GoUctDefaultPriorKnowledge.cpp.


Member Function Documentation

void GoUctKnowledge::Add ( SgPoint  p,
SgUctValue  value,
SgUctValue  count 
) [protected, inherited]

Definition at line 49 of file GoUctDefaultPriorKnowledge.cpp.

References GoUctKnowledge::m_values.

Referenced by AddLocalityBonus().

void GoUctDefaultPriorKnowledge::AddLocalityBonus ( GoPointList emptyPoints,
bool  isSmallBoard 
) [private]
void GoUctKnowledge::ClearValues (  )  [protected, inherited]

Definition at line 59 of file GoUctDefaultPriorKnowledge.cpp.

References GoUctKnowledge::m_values, and SG_PASS.

bool GoUctDefaultPriorKnowledge::FindGlobalPatternAndAtariMoves ( SgPointSet pattern,
SgPointSet atari,
GoPointList empty 
) const

Find global moves that match a playout pattern or set a block into atari.

Parameters:
[out] pattern 
[out] atari 
[out] empty As a side effect, this function finds all empty points on the board
Returns:
true if any such moves was found

Definition at line 127 of file GoUctDefaultPriorKnowledge.cpp.

References SgPointSet::Include(), GoBoard::IsEmpty(), SgArrayList< T, SIZE >::IsEmpty(), GoUctKnowledge::m_bd, m_policy, GoUctPlayoutPolicy< BOARD >::Patterns(), SgArrayList< T, SIZE >::PushBack(), and SG_ASSERT.

Referenced by GoUctCommands::CmdDefaultPolicy(), and ProcessPosition().

void GoUctKnowledge::Initialize ( SgPoint  p,
SgUctValue  value,
SgUctValue  count 
) [protected, inherited]

Definition at line 54 of file GoUctDefaultPriorKnowledge.cpp.

References GoUctKnowledge::m_values.

Referenced by ProcessPosition().

void GoUctDefaultPriorKnowledge::ProcessPosition ( std::vector< SgUctMoveInfo > &  moves  )  [virtual]
void GoUctKnowledge::TransferValues ( std::vector< SgUctMoveInfo > &  outmoves  )  const [protected, inherited]

Member Data Documentation

const GoBoard& GoUctKnowledge::m_bd [protected, inherited]

Definition at line 55 of file GoUctDefaultPriorKnowledge.h.

Referenced by FindGlobalPatternAndAtariMoves(), and ProcessPosition().


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


Sun Mar 13 2011 Doxygen 1.7.1