Default root filter used by GoUctPlayer. More...
#include <GoUctDefaultRootFilter.h>
Public Member Functions | |
GoUctDefaultRootFilter (const GoBoard &bd) | |
Pure virtual functions of GoUctRootFilter | |
std::vector< SgPoint > | Get () |
Get moves to filter in the current position. | |
Parameters | |
bool | CheckLadders () const |
Prune unsuccesful ladder defense moves (unless the ladder would be short). | |
void | SetCheckLadders (bool enable) |
See CheckLadders(). | |
Private Attributes | |
const GoBoard & | m_bd |
GoLadder | m_ladder |
bool | m_checkLadders |
See CheckLadders(). | |
int | m_minLadderLength |
Minimum ladder length necessary to prune loosing ladder defense moves. | |
SgVector< SgPoint > | m_ladderSequence |
Local variable in Get(). |
Default root filter used by GoUctPlayer.
Definition at line 16 of file GoUctDefaultRootFilter.h.
GoUctDefaultRootFilter::GoUctDefaultRootFilter | ( | const GoBoard & | bd | ) |
Definition at line 47 of file GoUctDefaultRootFilter.cpp.
bool GoUctDefaultRootFilter::CheckLadders | ( | ) | const |
Prune unsuccesful ladder defense moves (unless the ladder would be short).
Definition at line 62 of file GoUctDefaultRootFilter.h.
References m_checkLadders.
Referenced by GoUctCommands::CmdParamRootFilter().
vector< SgPoint > GoUctDefaultRootFilter::Get | ( | ) | [virtual] |
Get moves to filter in the current position.
This function is invoked by the player before the search, it does not need to be thread-safe.
Implements GoUctRootFilter.
Definition at line 54 of file GoUctDefaultRootFilter.cpp.
References GoBoard::AllPoints(), GoModBoard::Board(), SgBWSet::Both(), GoBensonSolver::FindSafePoints(), GoSafetySolver::FindSafePoints(), GoBoard::GetStone(), GoBoard::HasNeighbors(), GoBoard::InAtari(), IsEmptyEdge(), GoBoard::IsLegal(), GoLadder::Ladder(), SgVector< T >::Length(), m_bd, m_checkLadders, m_ladder, m_ladderSequence, m_minLadderLength, SgOppBW(), GoBoard::TheLiberty(), and GoBoard::ToPlay().
void GoUctDefaultRootFilter::SetCheckLadders | ( | bool | enable | ) |
See CheckLadders().
Definition at line 67 of file GoUctDefaultRootFilter.h.
References m_checkLadders.
Referenced by GoUctCommands::CmdParamRootFilter().
const GoBoard& GoUctDefaultRootFilter::m_bd [private] |
Definition at line 46 of file GoUctDefaultRootFilter.h.
Referenced by Get().
bool GoUctDefaultRootFilter::m_checkLadders [private] |
See CheckLadders().
Definition at line 51 of file GoUctDefaultRootFilter.h.
Referenced by CheckLadders(), Get(), and SetCheckLadders().
GoLadder GoUctDefaultRootFilter::m_ladder [private] |
Definition at line 48 of file GoUctDefaultRootFilter.h.
Referenced by Get().
SgVector<SgPoint> GoUctDefaultRootFilter::m_ladderSequence [mutable, private] |
Local variable in Get().
Reused for efficiency.
Definition at line 59 of file GoUctDefaultRootFilter.h.
Referenced by Get().
int GoUctDefaultRootFilter::m_minLadderLength [private] |
Minimum ladder length necessary to prune loosing ladder defense moves.
Definition at line 55 of file GoUctDefaultRootFilter.h.
Referenced by Get().