#include <SgProbCut.h>
Classes | |
struct | Cutoff |
Public Member Functions | |
SgProbCut () | |
void | AddCutoff (const Cutoff &c) |
bool | GetCutoff (int deep, int index, Cutoff &cutoff) |
float | GetThreshold () const |
bool | IsEnabled () const |
bool | ProbCut (SgSearch &search, int depth, int alpha, int beta, SgSearchStack &moveStack, bool *isExactValue, int *value) |
void | SetEnabled (bool flag) |
void | SetThreshold (float t) |
Static Public Attributes | |
static const int | MAX_PROBCUT = 20 |
Private Attributes | |
float | m_threshold |
bool | m_enabled |
SgArray< SgArray< Cutoff, MAX_PROBCUT+1 >, MAX_PROBCUT+1 > | m_cutoffs |
SgArray< int, MAX_PROBCUT+1 > | m_cutoff_sizes |
Definition at line 22 of file SgProbCut.h.
SgProbCut::SgProbCut | ( | ) |
Definition at line 60 of file SgProbCut.h.
References m_cutoff_sizes, m_enabled, m_threshold, and MAX_PROBCUT.
void SgProbCut::AddCutoff | ( | const Cutoff & | c | ) |
Definition at line 67 of file SgProbCut.h.
References SgProbCut::Cutoff::deep, m_cutoff_sizes, and m_cutoffs.
bool SgProbCut::GetCutoff | ( | int | deep, | |
int | index, | |||
Cutoff & | cutoff | |||
) |
Definition at line 74 of file SgProbCut.h.
References m_cutoff_sizes, m_cutoffs, and MAX_PROBCUT.
Referenced by ProbCut().
float SgProbCut::GetThreshold | ( | ) | const |
bool SgProbCut::IsEnabled | ( | ) | const |
Definition at line 97 of file SgProbCut.h.
References m_enabled.
Referenced by ProbCut(), and SgSearch::SearchEngine().
bool SgProbCut::ProbCut | ( | SgSearch & | search, | |
int | depth, | |||
int | alpha, | |||
int | beta, | |||
SgSearchStack & | moveStack, | |||
bool * | isExactValue, | |||
int * | value | |||
) |
Definition at line 14 of file SgProbCut.cpp.
References SgProbCut::Cutoff::a, SgProbCut::Cutoff::b, SgSearch::DEPTH_UNIT, GetCutoff(), GetThreshold(), IsEnabled(), SgStack< T, SIZE >::PushAll(), SgMath::RoundToInt(), SgSearch::SearchEngine(), SetEnabled(), SG_ASSERT, SgSearch::SG_INFINITY, SgProbCut::Cutoff::shallow, SgProbCut::Cutoff::sigma, and SgStack< T, SIZE >::SwapWith().
Referenced by SgSearch::SearchEngine().
void SgProbCut::SetEnabled | ( | bool | flag | ) |
void SgProbCut::SetThreshold | ( | float | t | ) |
Definition at line 82 of file SgProbCut.h.
References m_threshold.
SgArray<int, MAX_PROBCUT+1> SgProbCut::m_cutoff_sizes [private] |
Definition at line 57 of file SgProbCut.h.
Referenced by AddCutoff(), GetCutoff(), and SgProbCut().
SgArray<SgArray<Cutoff, MAX_PROBCUT+1>, MAX_PROBCUT+1> SgProbCut::m_cutoffs [private] |
Definition at line 56 of file SgProbCut.h.
Referenced by AddCutoff(), and GetCutoff().
bool SgProbCut::m_enabled [private] |
Definition at line 54 of file SgProbCut.h.
Referenced by IsEnabled(), SetEnabled(), and SgProbCut().
float SgProbCut::m_threshold [private] |
Definition at line 53 of file SgProbCut.h.
Referenced by GetThreshold(), SetThreshold(), and SgProbCut().
const int SgProbCut::MAX_PROBCUT = 20 [static] |
Definition at line 25 of file SgProbCut.h.
Referenced by GetCutoff(), and SgProbCut().