Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

SpDumbTacticalMoveGenerator Class Reference

Plays mostly to extend/reduce liberties. More...

#include <SpDumbTacticalPlayer.h>

Inheritance diagram for SpDumbTacticalMoveGenerator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SpDumbTacticalMoveGenerator (const GoBoard &board)
virtual void GenerateMoves (SgEvaluatedMoves &eval, SgBlackWhite toPlay)
virtual bool ExecuteMoveForScoring ()
virtual int Score (SgPoint p)
int EvaluateMove (SgPoint p)
 Static move evaluation.

Protected Attributes

const GoBoardm_board
 Reference to go board on which to play.

Private Member Functions

void GenerateAttackMoves (SgEvaluatedMoves &eval)
void GenerateDefendMoves (SgEvaluatedMoves &eval)

Private Attributes

bool m_useLadders

Detailed Description

Plays mostly to extend/reduce liberties.

Plays the following, in priority order: 1. If own group has single liberty, play there 2. Amongst opponent groups without two eyes, find the one with the least libs, and fill the one with the most second order liberties. If there is a tie pick one at random. 3. Make a random move that doesn't fill own eye 4. Pass

Definition at line 22 of file SpDumbTacticalPlayer.h.


Constructor & Destructor Documentation

SpDumbTacticalMoveGenerator::SpDumbTacticalMoveGenerator ( const GoBoard board  )  [explicit]

Definition at line 20 of file SpDumbTacticalPlayer.cpp.


Member Function Documentation

int SpStaticMoveGenerator::EvaluateMove ( SgPoint  p  )  [virtual, inherited]

Static move evaluation.

Implements SpMoveGenerator.

Definition at line 46 of file SpMoveGenerator.cpp.

References GoBoard::IsLegal(), SpMoveGenerator::m_board, and SpStaticMoveGenerator::Score().

virtual bool SpDumbTacticalMoveGenerator::ExecuteMoveForScoring (  )  [virtual]

Definition at line 30 of file SpDumbTacticalPlayer.h.

void SpDumbTacticalMoveGenerator::GenerateAttackMoves ( SgEvaluatedMoves eval  )  [private]
void SpDumbTacticalMoveGenerator::GenerateDefendMoves ( SgEvaluatedMoves eval  )  [private]
void SpDumbTacticalMoveGenerator::GenerateMoves ( SgEvaluatedMoves eval,
SgBlackWhite  toPlay 
) [virtual]
int SpDumbTacticalMoveGenerator::Score ( SgPoint  p  )  [virtual]

Implements SpStaticMoveGenerator.

Definition at line 24 of file SpDumbTacticalPlayer.cpp.

References SG_ASSERT, and SG_UNUSED().


Member Data Documentation

const GoBoard& SpMoveGenerator::m_board [protected, inherited]

Definition at line 38 of file SpDumbTacticalPlayer.h.

Referenced by GenerateAttackMoves(), and GenerateDefendMoves().


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


Sun Mar 13 2011 Doxygen 1.7.1