Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SpRandomPlayer Class Reference

#include <SpRandomPlayer.h>

Inheritance diagram for SpRandomPlayer:

Inheritance graph
[legend]
List of all members.

Detailed Description

Simple player using SpRandomMoveGenerator.

Definition at line 32 of file SpRandomPlayer.h.

Public Member Functions

 SpRandomPlayer (GoBoard &board)
std::string Name () const
SgPoint GenMove (const SgTimeRecord &time, SgBlackWhite toPlay)
virtual int MoveValue (SgPoint p)
GoBoardBoard ()
const GoBoardBoard () const
SgNodeCurrentNode () const
void SetCurrentNode (SgNode *node)
virtual void OnGameFinished ()
virtual void OnNewGame ()
virtual void Ponder ()
int Variant () const
void SetVariant (int variant)
void SetSubscriber (GoBoard &subscriber)
void UpdateSubscriber ()

Protected Member Functions

bool UseFilter () const
 Don't play on safe points.
virtual void OnBoardChange ()
virtual void PrePlay (GoPlayerMove move)
virtual void OnPlay (GoPlayerMove move)
virtual void PreUndo ()
virtual void OnUndo ()

Protected Attributes

SgNodem_currentNode


Constructor & Destructor Documentation

SpRandomPlayer::SpRandomPlayer ( GoBoard board  ) 

Definition at line 36 of file SpRandomPlayer.h.


Member Function Documentation

SgPoint SpSimplePlayer::GenMove ( const SgTimeRecord time,
SgBlackWhite  toPlay 
) [virtual, inherited]

Implements GoPlayer.

Definition at line 61 of file SpSimplePlayer.cpp.

References SgEvaluatedMovesArray::BestMove(), GoPlayer::Board(), SpMoveGenerator::GenerateMoves(), SpUtil::GetRelevantMoves(), SpSimplePlayer::m_generator, SpSimplePlayer::m_randomGenerator, SG_PASS, SG_UNUSED(), and SpSimplePlayer::UseFilter().

int SpSimplePlayer::MoveValue ( SgPoint  p  )  [virtual, inherited]

Reimplemented from GoPlayer.

Definition at line 43 of file SpSimplePlayer.cpp.

References GoBoard::AllEmpty(), GoPlayer::Board(), SpMoveGenerator::EvaluateMove(), GoSafetySolver::FindSafePoints(), SpSimplePlayer::m_generator, SG_BLACK, SG_WHITE, and SpSimplePlayer::UseFilter().

std::string SpRandomPlayer::Name (  )  const [virtual]

Reimplemented from GoPlayer.

Definition at line 40 of file SpRandomPlayer.h.

bool SpRandomPlayer::UseFilter (  )  const [protected, virtual]

Don't play on safe points.

Reimplemented from SpSimplePlayer.

Definition at line 46 of file SpRandomPlayer.h.


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


17 Jun 2010 Doxygen 1.4.7