#include <SgEvaluatedMoves.h>
Inheritance diagram for SgEvaluatedMoves:
Definition at line 21 of file SgEvaluatedMoves.h.
Public Member Functions | |
SgEvaluatedMoves (const SgPointSet &relevant) | |
SgEvaluatedMoves (const SgEvaluatedMoves &original) | |
virtual | ~SgEvaluatedMoves () |
virtual void | AddMove (SgPoint move, int value) |
virtual void | AddMoves (const SgPointSet &moves, int value) |
virtual void | AddMoves (const SgVector< SgPoint > &moves, int value) |
virtual void | Clear () |
SgPoint | BestMove () |
int | BestValue () |
const SgPointSet & | Relevant () const |
bool | IsRelevant (SgPoint p) const |
void | Disable (SgPoint p) |
void | Enable (SgPoint p) |
virtual SgEvaluatedMoves * | Duplicate () const |
virtual int | GetEvaluation (SgPoint p) const |
virtual void | BestMoves (SgVector< SgPoint > &best, int nuMoves) const |
Compute list of the n best moves. | |
Protected Attributes | |
int | m_bestValue |
SgVector< SgPoint > | m_moveList |
SgPointSet | m_relevant |
Static Protected Attributes | |
static const int | s_minValue = INT_MIN + 1 |
SgEvaluatedMoves::SgEvaluatedMoves | ( | const SgPointSet & | relevant | ) | [explicit] |
SgEvaluatedMoves::SgEvaluatedMoves | ( | const SgEvaluatedMoves & | original | ) |
Definition at line 29 of file SgEvaluatedMoves.h.
virtual SgEvaluatedMoves::~SgEvaluatedMoves | ( | ) | [virtual] |
Definition at line 35 of file SgEvaluatedMoves.h.
void SgEvaluatedMoves::AddMove | ( | SgPoint | move, | |
int | value | |||
) | [virtual] |
Reimplemented in SgEvaluatedMovesArray.
Definition at line 19 of file SgEvaluatedMoves.cpp.
References SgPointUtil::InBoardRange(), m_bestValue, m_moveList, and m_relevant.
Referenced by SgEvaluatedMovesArray::AddMove(), AddMoves(), and SgEvaluatedMovesArray::ReduceMove().
void SgEvaluatedMoves::AddMoves | ( | const SgPointSet & | moves, | |
int | value | |||
) | [virtual] |
SgPoint SgEvaluatedMoves::BestMove | ( | ) |
Definition at line 45 of file SgEvaluatedMoves.cpp.
References SgRandom::Global(), SgRandom::Int(), m_moveList, and SG_PASS.
Compute list of the n best moves.
Reimplemented in SgEvaluatedMovesArray.
Definition at line 53 of file SgEvaluatedMoves.cpp.
References m_moveList, and SG_UNUSED().
int SgEvaluatedMoves::BestValue | ( | ) |
virtual void SgEvaluatedMoves::Clear | ( | ) | [virtual] |
Reimplemented in SgEvaluatedMovesArray.
Definition at line 44 of file SgEvaluatedMoves.h.
References m_bestValue, m_moveList, and s_minValue.
void SgEvaluatedMoves::Disable | ( | SgPoint | p | ) |
virtual SgEvaluatedMoves* SgEvaluatedMoves::Duplicate | ( | ) | const [virtual] |
Reimplemented in SgEvaluatedMovesArray.
Definition at line 77 of file SgEvaluatedMoves.h.
References SgEvaluatedMoves().
void SgEvaluatedMoves::Enable | ( | SgPoint | p | ) |
virtual int SgEvaluatedMoves::GetEvaluation | ( | SgPoint | p | ) | const [virtual] |
Reimplemented in SgEvaluatedMovesArray.
Definition at line 82 of file SgEvaluatedMoves.h.
References m_bestValue, and m_moveList.
bool SgEvaluatedMoves::IsRelevant | ( | SgPoint | p | ) | const |
const SgPointSet& SgEvaluatedMoves::Relevant | ( | ) | const |
int SgEvaluatedMoves::m_bestValue [protected] |
Definition at line 94 of file SgEvaluatedMoves.h.
Referenced by AddMove(), BestValue(), Clear(), and GetEvaluation().
SgVector<SgPoint> SgEvaluatedMoves::m_moveList [protected] |
Definition at line 96 of file SgEvaluatedMoves.h.
Referenced by AddMove(), BestMove(), BestMoves(), Clear(), and GetEvaluation().
SgPointSet SgEvaluatedMoves::m_relevant [protected] |
Definition at line 98 of file SgEvaluatedMoves.h.
Referenced by SgEvaluatedMovesArray::AddMove(), AddMove(), Disable(), Enable(), IsRelevant(), SgEvaluatedMovesArray::ReduceMove(), and Relevant().
const int SgEvaluatedMoves::s_minValue = INT_MIN + 1 [static, protected] |
Definition at line 101 of file SgEvaluatedMoves.h.
Referenced by Clear(), and SgEvaluatedMovesArray::SelectNextBest().