Tries to maximize minimum liberty of own minus opponent blocks. More...
#include <SpMinLibPlayer.h>
Public Member Functions | |
SpMinLibMoveGenerator (const GoBoard &board) | |
virtual int | Evaluate () |
int | LibertyMinimum (SgBlackWhite toplay) |
Value corresponding to minimum liberties for EITHER color. | |
int | EvaluateMove (SgPoint p) |
Execute move, then evaluate board. | |
virtual void | GenerateMoves (SgEvaluatedMoves &eval, SgBlackWhite toPlay) |
Protected Attributes | |
const GoBoard & | m_board |
Reference to go board on which to play. |
Tries to maximize minimum liberty of own minus opponent blocks.
Definition at line 16 of file SpMinLibPlayer.h.
SpMinLibMoveGenerator::SpMinLibMoveGenerator | ( | const GoBoard & | board | ) | [explicit] |
Definition at line 20 of file SpMinLibPlayer.h.
int SpMinLibMoveGenerator::Evaluate | ( | ) | [virtual] |
Implements Sp1PlyMoveGenerator.
Definition at line 51 of file SpMinLibPlayer.cpp.
References LibertyAveragex10(), LibertyMinimum(), SpMoveGenerator::m_board, GoBoard::Opponent(), and SgOppBW().
int Sp1PlyMoveGenerator::EvaluateMove | ( | SgPoint | p | ) | [virtual, inherited] |
Execute move, then evaluate board.
Implements SpMoveGenerator.
Definition at line 35 of file SpMoveGenerator.cpp.
References GoModBoard::Board(), Sp1PlyMoveGenerator::Evaluate(), GoMoveExecutor::IsLegal(), and SpMoveGenerator::m_board.
void SpMoveGenerator::GenerateMoves | ( | SgEvaluatedMoves & | eval, | |
SgBlackWhite | toPlay | |||
) | [virtual, inherited] |
Reimplemented in SpDumbTacticalMoveGenerator, and SpLadderMoveGenerator.
Definition at line 18 of file SpMoveGenerator.cpp.
References SgEvaluatedMoves::AddMove(), GoModBoard::Board(), SpMoveGenerator::EvaluateMove(), SpMoveGenerator::m_board, SgEvaluatedMoves::Relevant(), and GoBoard::SetToPlay().
Referenced by SpSimplePlayer::GenMove().
int SpMinLibMoveGenerator::LibertyMinimum | ( | SgBlackWhite | toplay | ) |
Value corresponding to minimum liberties for EITHER color.
Definition at line 15 of file SpMinLibPlayer.cpp.
References GoBoard::All(), GoBoard::AllEmpty(), SpMoveGenerator::m_board, SG_ASSERT, SgOpp(), and GoBoard::Size().
Referenced by Evaluate().
const GoBoard& SpMoveGenerator::m_board [protected, inherited] |
Reference to go board on which to play.
Definition at line 33 of file SpMoveGenerator.h.
Referenced by SpSafeMoveGenerator::Evaluate(), Evaluate(), SpMaxEyeMoveGenerator::Evaluate(), SpInfluenceMoveGenerator::Evaluate(), SpGreedyMoveGenerator::Evaluate(), SpCaptureMoveGenerator::Evaluate(), SpAverageMoveGenerator::Evaluate(), SpStaticMoveGenerator::EvaluateMove(), Sp1PlyMoveGenerator::EvaluateMove(), SpDumbTacticalMoveGenerator::GenerateAttackMoves(), SpDumbTacticalMoveGenerator::GenerateDefendMoves(), SpMoveGenerator::GenerateMoves(), SpLadderMoveGenerator::GenerateMoves(), SpDumbTacticalMoveGenerator::GenerateMoves(), SpMaxEyeMoveGenerator::Heuristic(), LibertyMinimum(), SpRandomMoveGenerator::Score(), and SpLibertyMoveGenerator::Score().