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

Defines EndOfGame to return true after two passes.
Definition at line 19 of file GoSearch.h.
Public Member Functions | |
| GoSearch (GoBoard &board, SgSearchHashTable *hash) | |
| GoBoard & | Board () |
| const GoBoard & | Board () const |
| bool | CheckDepthLimitReached () const |
| Return false, because some Go searches require it. | |
| bool | EndOfGame () const |
| bool | Execute (SgMove move, int *delta, int depth) |
| Default implementation of SgSearch::Execute() for Go searches. | |
| SgHashCode | GetHashCode () const |
| Default implementation of SgSearch::GetHashCode() for Go searches. | |
| SgBlackWhite | GetToPlay () const |
| Default implementation of SgSearch::ToPlay() for Go searches. | |
| void | SetToPlay (SgBlackWhite toPlay) |
| std::string | MoveString (SgMove move) const |
| void | TakeBack () |
| Default implementation of SgSearch::TakeBack() for Go searches. | |
| const SgSearchHashTable * | HashTable () const |
| void | SetHashTable (SgSearchHashTable *hashtable) |
| const SgSearchControl * | SearchControl () const |
| void | SetSearchControl (SgSearchControl *control) |
| void | SetProbCut (SgProbCut *probcut) |
| virtual void | OnStartSearch () |
| int | DepthFirstSearch (int depthLimit, int boundLo, int boundHi, SgVector< SgMove > *sequence, bool clearHash=true, SgNode *traceNode=0) |
| int | DepthFirstSearch (int depthLimit, SgVector< SgMove > *sequence, bool clearHash=true, SgNode *traceNode=0) |
| int | IteratedSearch (int depthMin, int depthMax, int boundLo, int boundHi, SgVector< SgMove > *sequence, bool clearHash=true, SgNode *traceNode=0) |
| int | IteratedSearch (int depthMin, int depthMax, SgVector< SgMove > *sequence, bool clearHash=true, SgNode *traceNode=0) |
| int | IteratedSearchDepthLimit () const |
| virtual void | StartOfDepth (int depthLimit) |
| bool | Aborted () const |
| void | SetAbortSearch (bool fAborted=true) |
| void | SetScout (bool flag=true) |
| void | SetKillers (bool flag=true) |
| void | SetOpponentBest (bool flag=true) |
| void | SetNullMove (bool flag=true) |
| void | SetNullMoveDepth (int depth) |
| void | GetStatistics (SgSearchStatistics *stat) |
| const SgSearchStatistics & | Statistics () const |
| void | StartTime () |
| void | StopTime () |
| virtual void | Generate (SgVector< SgMove > *moves, int depth)=0 |
| virtual int | Evaluate (bool *isExact, int depth)=0 |
| virtual bool | AbortSearch () |
| int | CurrentDepth () const |
| SgMove | PrevMove () const |
| SgMove | PrevMove2 () const |
| void | InitSearch (int startDepth=0) |
| bool | TraceIsOn () const |
| virtual void | CreateTracer () |
| void | SetTracer (SgSearchTracer *tracer) |
| SgSearchTracer * | Tracer () const |
| void | SetAbortFrequency (int value) |
| int | SearchEngine (int depth, int alpha, int beta, SgStack< SgMove, SgSearch::MAX_DEPTH > &stack, bool *isExactValue, bool lastNullMove=false) |
Static Public Attributes | |
| static const int | DEPTH_UNIT |
| static const int | MAX_DEPTH |
| static const int | SG_INFINITY |
Private Attributes | |
| GoBoard & | m_board |
| GoSearch::GoSearch | ( | GoBoard & | board, | |
| SgSearchHashTable * | hash | |||
| ) |
| const GoBoard & GoSearch::Board | ( | ) | const |
| GoBoard & GoSearch::Board | ( | ) |
Definition at line 65 of file GoSearch.h.
References m_board.
Referenced by Execute(), GetHashCode(), GetToPlay(), SetToPlay(), and TakeBack().
| bool GoSearch::CheckDepthLimitReached | ( | ) | const [virtual] |
Return false, because some Go searches require it.
Implements SgSearch.
Definition at line 27 of file GoSearch.cpp.
| bool GoSearch::EndOfGame | ( | ) | const [virtual] |
Implements SgSearch.
Definition at line 32 of file GoSearch.cpp.
References SgSearch::PrevMove(), SgSearch::PrevMove2(), and SG_PASS.
| bool GoSearch::Execute | ( | SgMove | move, | |
| int * | delta, | |||
| int | depth | |||
| ) | [virtual] |
Default implementation of SgSearch::Execute() for Go searches.
Executes the move is legal.
Implements SgSearch.
Definition at line 37 of file GoSearch.cpp.
References Board(), GoBoardUtil::PlayIfLegal(), SG_UNUSED(), and GoBoard::ToPlay().
| SgHashCode GoSearch::GetHashCode | ( | ) | const [virtual] |
Default implementation of SgSearch::GetHashCode() for Go searches.
Implements SgSearch.
Definition at line 48 of file GoSearch.cpp.
References Board(), and GoBoard::GetHashCodeInclToPlay().
| SgBlackWhite GoSearch::GetToPlay | ( | ) | const [virtual] |
Default implementation of SgSearch::ToPlay() for Go searches.
Implements SgSearch.
Definition at line 53 of file GoSearch.cpp.
References Board(), and GoBoard::ToPlay().
| std::string GoSearch::MoveString | ( | SgMove | move | ) | const [virtual] |
| void GoSearch::SetToPlay | ( | SgBlackWhite | toPlay | ) | [virtual] |
Implements SgSearch.
Definition at line 65 of file GoSearch.cpp.
References Board(), and GoBoard::SetToPlay().
| void GoSearch::TakeBack | ( | ) | [virtual] |
Default implementation of SgSearch::TakeBack() for Go searches.
Takes back the move on the board.
Implements SgSearch.
Definition at line 70 of file GoSearch.cpp.
References Board(), and GoBoard::Undo().
GoBoard& GoSearch::m_board [private] |