#include <SpSimplePlayer.h>
Inheritance diagram for SpSimplePlayer:

It generates random moves if no other move is found.
Definition at line 22 of file SpSimplePlayer.h.
Public Member Functions | |
| virtual | ~SpSimplePlayer () |
| SgPoint | GenMove (const SgTimeRecord &time, SgBlackWhite toPlay) |
| virtual int | MoveValue (SgPoint p) |
| GoBoard & | Board () |
| const GoBoard & | Board () const |
| virtual std::string | Name () const |
| SgNode * | CurrentNode () 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 | |
| SpSimplePlayer (GoBoard &board, SpMoveGenerator *generator) | |
| virtual void | OnBoardChange () |
| virtual void | PrePlay (GoPlayerMove move) |
| virtual void | OnPlay (GoPlayerMove move) |
| virtual void | PreUndo () |
| virtual void | OnUndo () |
Protected Attributes | |
| SgNode * | m_currentNode |
Private Member Functions | |
| virtual bool | UseFilter () const |
| Don't play on safe points. | |
Private Attributes | |
| SpMoveGenerator * | m_generator |
| Move generator. | |
| SpRandomMoveGenerator * | m_randomGenerator |
| Use random generator if no other move found. | |
| SpSimplePlayer::~SpSimplePlayer | ( | ) | [virtual] |
Definition at line 33 of file SpSimplePlayer.cpp.
References m_generator, m_randomGenerator, and SG_ASSERT.
| SpSimplePlayer::SpSimplePlayer | ( | GoBoard & | board, | |
| SpMoveGenerator * | generator | |||
| ) | [protected] |
Definition at line 26 of file SpSimplePlayer.cpp.
| SgPoint SpSimplePlayer::GenMove | ( | const SgTimeRecord & | time, | |
| SgBlackWhite | toPlay | |||
| ) | [virtual] |
Implements GoPlayer.
Definition at line 61 of file SpSimplePlayer.cpp.
References SgEvaluatedMovesArray::BestMove(), GoPlayer::Board(), SpMoveGenerator::GenerateMoves(), SpUtil::GetRelevantMoves(), m_generator, m_randomGenerator, SG_PASS, SG_UNUSED(), and UseFilter().
| int SpSimplePlayer::MoveValue | ( | SgPoint | p | ) | [virtual] |
Reimplemented from GoPlayer.
Definition at line 43 of file SpSimplePlayer.cpp.
References GoBoard::AllEmpty(), GoPlayer::Board(), SpMoveGenerator::EvaluateMove(), GoSafetySolver::FindSafePoints(), m_generator, SG_BLACK, SG_WHITE, and UseFilter().
| virtual bool SpSimplePlayer::UseFilter | ( | ) | const [private, virtual] |
Don't play on safe points.
Reimplemented in SpAveragePlayer, SpMinLibPlayer, and SpRandomPlayer.
Definition at line 43 of file SpSimplePlayer.h.
Referenced by GenMove(), and MoveValue().
SpMoveGenerator* SpSimplePlayer::m_generator [private] |
Move generator.
Definition at line 37 of file SpSimplePlayer.h.
Referenced by GenMove(), MoveValue(), and ~SpSimplePlayer().
Use random generator if no other move found.
Definition at line 40 of file SpSimplePlayer.h.
Referenced by GenMove(), and ~SpSimplePlayer().