Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgMove.h File Reference


Detailed Description

Definitions for game-independent moves.

Useful for games that can encode moves as positive integers (including 0). Negative integers are reserved for special meanings, like pass or null move and defined in this file. Don't make an assumption about the exact values of the special moves (apart that they are negative). If you do, at least document it with a static assertion. Classes that can work with moves of different games should only include this header.

Definition in file SgMove.h.

Go to the source code of this file.

Namespaces

namespace  SgMoveUtil

Typedefs

typedef int SgMove

Functions

bool SgMoveUtil::IsCouponMove (SgMove move)
 Is move SG_COUPONMOVE or SG_COUPONMOVE_VIRTUAL?
bool SgMoveUtil::IsCouponMove (SgMove move)
 Is move SG_COUPONMOVE or SG_COUPONMOVE_VIRTUAL?

Variables

const SgMove SG_NULLMOVE = -1
 A null move is an uninitialized move, not legal to execute.
const SgMove SG_COUPONMOVE = -2
 Used for coupon search.
const SgMove SG_COUPONMOVE_VIRTUAL = -3
 Used for coupon search.
const SgMove SG_RESIGN = -4
 Resign.


Typedef Documentation

typedef int SgMove

Definition at line 20 of file SgMove.h.


Variable Documentation

const SgMove SG_COUPONMOVE = -2

Used for coupon search.

Indicates that no move was made in the game, but a coupon taken from the coupon stack.

Definition at line 31 of file SgMove.h.

Referenced by SgMoveUtil::IsCouponMove(), SgPointUtil::PointToString(), and SgReadPoint::Read().

const SgMove SG_COUPONMOVE_VIRTUAL = -3

Used for coupon search.

Indicates that no move was made in the game, but a virtual coupon taken from the coupon stack.

Definition at line 37 of file SgMove.h.

Referenced by SgMoveUtil::IsCouponMove(), SgPointUtil::PointToString(), and SgReadPoint::Read().

const SgMove SG_NULLMOVE = -1

A null move is an uninitialized move, not legal to execute.

Not the same as a pass move or a null move in null-move-search.

Definition at line 25 of file SgMove.h.

Referenced by SgSearch::AddSequenceToHash(), SgUctTree::Clear(), SgKiller::Clear(), SgUctAllocator::CreateN(), SgPropMove::FromString(), SgSearch::InitSearch(), SgKiller::MarkKiller(), SgUctNode::Move(), SgNode::NodeMove(), SgUctSearch::PlayoutGame(), SgPropUtil::PointToSgfString(), SgPointUtil::PointToString(), SgUctSearch::SearchOnePly(), SgPropUtil::SgfStringToPoint(), SgSearch::TryMove(), and SgBookBuilder::UpdatePriority().

const SgMove SG_RESIGN = -4

Resign.

Definition at line 40 of file SgMove.h.

Referenced by SgPointUtil::PointToString(), and SgReadPoint::Read().


17 Jun 2010 Doxygen 1.4.7