Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Namespaces | Functions | Variables

GoUctUtil.h File Reference

#include <iosfwd>
#include "GoBoard.h"
#include "GoBoardUtil.h"
#include "GoEyeUtil.h"
#include "GoModBoard.h"
#include "GoUctBoard.h"
#include "SgBlackWhite.h"
#include "SgPoint.h"
#include "SgRandom.h"
#include "SgUctSearch.h"
#include "SgUtil.h"

Go to the source code of this file.

Namespaces

namespace  GoUctUtil
 

General utility functions used in GoUct.


Functions

void GoUctUtil::ClearStatistics (SgPointArray< SgUctStatistics > &stats)
template<class BOARD >
bool GoUctUtil::DoSelfAtariCorrection (const BOARD &bd, SgPoint &p)
 Check if move is self-atari and find other liberty, if yes.
template<class BOARD >
bool GoUctUtil::DoClumpCorrection (const BOARD &bd, SgPoint &p)
 Check if p makes ugly clump.
template<class BOARD >
bool GoUctUtil::GainsLiberties (const BOARD &bd, SgPoint anchor, SgPoint lib)
 Check, if playing at a lib gains liberties.
SgPoint GoUctUtil::GenForcedOpeningMove (const GoBoard &bd)
 Generate a forced opening move.
template<class BOARD >
bool GoUctUtil::GeneratePoint (const BOARD &bd, SgBalancer &balancer, SgPoint p, SgBlackWhite toPlay)
 Filter for generating moves in random phase.
void GoUctUtil::GfxBestMove (const SgUctSearch &search, SgBlackWhite toPlay, std::ostream &out)
 Print information about search as Gfx commands for GoGui.
void GoUctUtil::GfxCounts (const SgUctTree &tree, std::ostream &out)
 Print move counts as Gfx commands for GoGui.
void GoUctUtil::GfxMoveValues (const SgUctSearch &search, SgBlackWhite toPlay, std::ostream &out)
 Print the move values as Gfx commands for GoGui.
void GoUctUtil::GfxSequence (const SgUctSearch &search, SgBlackWhite toPlay, std::ostream &out)
 Print best sequence of search in GoGui live-gfx format.
void GoUctUtil::GfxStatus (const SgUctSearch &search, std::ostream &out)
 Print information about search as GoGui Gfx commands for text in the status line.
void GoUctUtil::GfxTerritoryStatistics (const SgPointArray< SgUctStatistics > &territoryStatistics, const GoBoard &bd, std::ostream &out)
 Print territory statistics as GoGui gfx commands.
template<class BOARD >
bool GoUctUtil::IsMutualAtari (const BOARD &bd, SgBalancer &balancer, SgPoint p, SgBlackWhite toPlay)
 selfatari of a larger number of stones and also atari on opponent.
void GoUctUtil::SaveTree (const SgUctTree &tree, int boardSize, const SgBWSet &stones, SgBlackWhite toPlay, std::ostream &out, int maxDepth=-1)
 Save tree contained in a search as a Go SGF file.
template<class BOARD >
SgPoint GoUctUtil::SelectRandom (const BOARD &bd, SgBlackWhite toPlay, GoPointList &emptyPts, SgRandom &random, SgBalancer &balancer)
 Select a random move from a list of empty points.
template<class BOARD >
void GoUctUtil::SetEdgeCorrection (const BOARD &bd, SgPoint p, int &edgeCorrection)
 Utility function used in DoClumpCorrection().
std::string GoUctUtil::ChildrenStatistics (const SgUctSearch &search, bool bSort, const SgUctNode &node)
 Return statistics of all children of a node.
template<class BOARD >
bool GoUctUtil::SubsetOfBlocks (const BOARD &bd, const SgPoint anchor[], SgPoint nb)
 check if anchors[] are subset of neighbor blocks of nb

Variables

const bool GoUctUtil::REMOVE_SELF_ATARI = false
 reject random move if it was self atari
const bool GoUctUtil::REMOVE_MUTUAL_ATARI = true
 reject random move if it was both atari and self atari
const int GoUctUtil::SELF_ATARI_LIMIT = 8
const int GoUctUtil::MUTUAL_ATARI_LIMIT = 2
const bool GoUctUtil::CONSERVATIVE_CLUMP = true
 Conservative clump correction.
const int GoUctUtil::LINE_1_LIMIT = CONSERVATIVE_CLUMP ? 4 : 3
 Used in clump correction.
const int GoUctUtil::LINE_2_OR_MORE_LIMIT = CONSERVATIVE_CLUMP ? 6 : 5
 Used in clump correction.

Detailed Description

Definition in file GoUctUtil.h.


Sun Mar 13 2011 Doxygen 1.7.1