Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

DfsData Struct Reference

A solved state. More...

#include <DfsData.hpp>

List of all members.

Public Member Functions

 DfsData ()
 Contructs state with default values.
 DfsData (bool w, int nstates, int nmoves, HexPoint bmove)
 Initializes state to given values.
TransTableStateConcept

bool Initialized () const
 Returns true if this state is not the same as that built by the default constructor.
bool ReplaceWith (const DfsData &other) const
 If true, then this will give up its TT slot to other.
PositionDBStateConcept.

int PackedSize () const
bytePack () const
void Unpack (const byte *t)
void Rotate (const ConstBoard &brd)
void Mirror (const ConstBoard &brd)

Public Attributes

bool m_win
 True if player to move wins.
int m_flags
 Flags.
int m_numStates
 Number of states in proof-tree of this result.
int m_numMoves
 Number of moves losing player can delay until winning player has a winning virtual connection.
HexPoint m_bestMove
 Best move in this state.

Detailed Description

A solved state.

Stored in a TT or DB. Matches TransTableStateConcept. Do not forget to update DFS_DB_VERSION if this class changes in a way that invalidiates old databases.

Definition at line 21 of file DfsData.hpp.


Constructor & Destructor Documentation

DfsData::DfsData (  )  [inline]

Contructs state with default values.

Definition at line 80 of file DfsData.hpp.

DfsData::DfsData ( bool  w,
int  nstates,
int  nmoves,
HexPoint  bmove 
) [inline]

Initializes state to given values.

Definition at line 89 of file DfsData.hpp.


Member Function Documentation

bool DfsData::Initialized (  )  const [inline]

Returns true if this state is not the same as that built by the default constructor.

Definition at line 98 of file DfsData.hpp.

References INVALID_POINT, and m_bestMove.

void DfsData::Mirror ( const ConstBoard brd  ) 

Definition at line 73 of file DfsData.cpp.

References INVALID_POINT, and m_bestMove.

byte * DfsData::Pack (  )  const
Bug:
NOT THREADSAFE!

Definition at line 24 of file DfsData.cpp.

References byte, m_bestMove, m_flags, m_numMoves, m_numStates, m_win, and MiscUtil::WordToBytes().

int DfsData::PackedSize (  )  const

Definition at line 14 of file DfsData.cpp.

References m_bestMove, m_flags, m_numMoves, m_numStates, and m_win.

bool DfsData::ReplaceWith ( const DfsData other  )  const [inline]

If true, then this will give up its TT slot to other.

Note:
ALWAYS RETURNS TRUE FOR NOW!

Definition at line 103 of file DfsData.hpp.

References UNUSED().

void DfsData::Rotate ( const ConstBoard brd  ) 

Definition at line 67 of file DfsData.cpp.

References INVALID_POINT, and m_bestMove.

void DfsData::Unpack ( const byte t  ) 

Definition at line 48 of file DfsData.cpp.

References MiscUtil::BytesToWord(), m_bestMove, m_flags, m_numMoves, m_numStates, and m_win.


Member Data Documentation

Best move in this state.

Very important in winning states, not so important in losing states. That is, in winning states this move *must* be a winning move, in losing states this move is "most blocking", but the definition is fuzzy.

Definition at line 41 of file DfsData.hpp.

Referenced by Initialized(), Mirror(), Pack(), PackedSize(), Rotate(), and Unpack().

Flags.

Definition at line 27 of file DfsData.hpp.

Referenced by Pack(), PackedSize(), and Unpack().

Number of moves losing player can delay until winning player has a winning virtual connection.

Definition at line 34 of file DfsData.hpp.

Referenced by DfsSolver::HandleTerminalNode(), DfsSolver::OrderMoves(), Pack(), PackedSize(), DfsSolver::Solve(), DfsSolver::SolveDecomposition(), DfsSolver::SolveState(), and Unpack().

Number of states in proof-tree of this result.

Definition at line 30 of file DfsData.hpp.

Referenced by DfsSolver::HandleTerminalNode(), DfsSolver::OrderMoves(), Pack(), PackedSize(), DfsSolver::SolveState(), and Unpack().


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


6 Jan 2011 Doxygen 1.6.3