All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
osl::search::SearchState2 Class Reference

SearchFramework のうち,template parameter を含まない部分. More...

#include <searchState2.h>

Inheritance diagram for osl::search::SearchState2:
Inheritance graph
[legend]
Collaboration diagram for osl::search::SearchState2:
Collaboration graph
[legend]

Public Member Functions

 SearchState2 (const NumEffectState &s, checkmate_t &checker)
 
virtual ~SearchState2 ()
 
void setState (const NumEffectState &s)
 state のコピーを行う. More...
 
void setKillerMove (Move best_move)
 
int curLimit () const
 
bool abort (Move) const
 
- Public Member Functions inherited from osl::search::SearchState2Core
 SearchState2Core (const NumEffectState &s, checkmate_t &checker)
 
virtual ~SearchState2Core ()
 
int curDepth () const
 
void setHistory (const MoveStack &h)
 
bool hasLastRecord (unsigned int n=0) const
 
SimpleHashRecordlastRecord (unsigned int n=0)
 
const SimpleHashRecordlastRecord (unsigned int n=0) const
 
SimpleHashRecordrootRecord ()
 
void setCurrentRecord (SimpleHashRecord *r)
 
void setRootRecord (SimpleHashRecord *root)
 
void setKillerMove (Move best_move)
 
void getBigramKillerMoves (MoveVector &moves) const
 
void getKillerMoves (MoveVector &moves) const
 
const BigramKillerMovebigramKillerMove () const
 
void setBigramKillerMove (const BigramKillerMove &killers)
 
HistoryTablehistoryTable ()
 
const HistoryTablehistoryTable () const
 
void pushPass ()
 
void popPass ()
 
template<Player P, class Function >
void doUndoMoveOrPass (const HashKey &new_hash, Move move, Function &f)
 まともなdoUndo More...
 
void makeMove (Move move)
 
const Move lastMove (int i=1) const
 
const MoveStack & history () const
 
const RecordStack2recordHistory () const
 
const PathEncodingpath () const
 
const NumEffectState & state () const
 
const NumEffectState & rootState () const
 
void restoreRootState ()
 
const checkmate_tcheckmateSearcher () const
 
const RepetitionCounterrepetitionCounter () const
 
const HashKey & currentHash () const
 
template<Player P, class Function >
void doUndoMoveLight (Move move, Function &f)
 軽量化版 doUndo 千日手情報や, hash を更新しない More...
 
template<Player P>
bool isLosingState (int node_limit)
 
template<Player P>
bool isWinningState (int node_limit, Move &checkmate_move, bool parallel=false)
 
template<Player P>
bool isWinningStateShort (int depth, Move &checkmate_move)
 FixedDepthSearcher を呼ぶ More...
 
template<Player P>
bool isThreatmateState (int node_limit, Move &threatmate_move, bool=false)
 P の手番でPの玉に詰めろがかかっているかどうか More...
 
template<Player P>
bool isThreatmateStateShort (int depth, Move &threatmate_move)
 
bool abort () const
 
bool tryThreatmate () const
 
void makePV (Move m)
 
void initPV ()
 
void makePV (PVVector &parent, Move m, PVVector &pv) const
 
int countCheckAfterThreatmate (Player turn, int depth=1) const
 turn の側が連続王手で詰ろを逃れている回数 More...
 
int countCheckAfterThreatmateSacrifice (Player turn, int depth=1) const
 

Static Public Attributes

static const int ReSearchLimitMargin = 80
 再探索や,指手生成でより確率の高い手があったときに無視する範囲 More...
 
- Static Public Attributes inherited from osl::search::SearchState2Core
static CArray< int, MaxDepthdepth_node_count_quiesce
 

Protected Member Functions

void setRoot (int limit)
 root で limitを閾値に探索を始めることを設定 More...
 
void addLimit (int limit)
 
void subLimit (int limit)
 
int countSacrificeCheck2 (int history_max) const
 王手の捨て駒の連続を2ループまで数える More...
 
void checkPointSearchAllMoves ()
 debug 用途 More...
 

Protected Attributes

int root_limit
 
int cur_limit
 
- Protected Attributes inherited from osl::search::SearchState2Core
NumEffectState current_state
 
NumEffectState root_state
 
checkmate_tcheckmate_searcher
 
PathEncoding current_path
 
MoveStack move_history
 
int root_depth
 
RecordStack2 record_stack
 
RepetitionCounter repetition_counter
 
boost::shared_ptr
< SearchState2Shared
shared
 
CArray< PVVector, MaxDepthpv
 
CArray< NodeType, MaxDepthnode_type
 

Additional Inherited Members

- Public Types inherited from osl::search::SearchState2Core
enum  { MaxDepth = 64 }
 
typedef DualDfpn checkmate_t
 
typedef FixedCapacityVector
< Move, MaxDepth
PVVector
 
- Static Public Member Functions inherited from osl::search::SearchState2Core
template<Player P>
static bool isWinningState (checkmate_t &search, NumEffectState &state, const HashKey &key, PathEncoding path, int node_limit, Move &checkmate_move, Move last_move, bool=false)
 
static bool isWinningState (checkmate_t &search, NumEffectState &state, const HashKey &key, PathEncoding path, int node_limit, Move &checkmate_move, Move last_move, bool parallel=false)
 
- Public Attributes inherited from osl::search::SearchState2Core
volatile bool stop_tree
 beta cut in parallel search More...
 
- Protected Types inherited from osl::search::SearchState2Core
enum  NodeType { PvNode = 0, AllNode = 1, CutNode = -1 }
 

Detailed Description

SearchFramework のうち,template parameter を含まない部分.

Definition at line 495 of file searchState2.h.

Constructor & Destructor Documentation

osl::search::SearchState2::SearchState2 ( const NumEffectState &  s,
checkmate_t checker 
)

Definition at line 179 of file searchState2.cc.

osl::search::SearchState2::~SearchState2 ( )
virtual

Definition at line 185 of file searchState2.cc.

Member Function Documentation

bool osl::search::SearchState2::abort ( Move  best_move) const
virtual

Reimplemented from osl::search::SearchState2Core.

Definition at line 203 of file searchState2.cc.

References osl::search::SearchState2Core::abort().

void osl::search::SearchState2::addLimit ( int  limit)
inlineprotected

Definition at line 528 of file searchState2.h.

References cur_limit, limit, and search_assert.

void osl::search::SearchState2::checkPointSearchAllMoves ( )
protected

debug 用途

Definition at line 212 of file searchState2.cc.

int osl::search::SearchState2::countSacrificeCheck2 ( int  history_max) const
protected

王手の捨て駒の連続を2ループまで数える

Parameters
history_maxこれ以上を逆上らない

Definition at line 197 of file searchState2.cc.

References osl::search::SacrificeCheck::count2().

int osl::search::SearchState2::curLimit ( ) const
inline

Definition at line 515 of file searchState2.h.

References cur_limit.

void osl::search::SearchState2::setKillerMove ( Move  best_move)
inline
void osl::search::SearchState2::setRoot ( int  limit)
inlineprotected

root で limitを閾値に探索を始めることを設定

Definition at line 523 of file searchState2.h.

References cur_limit, limit, and root_limit.

Referenced by osl::search::AlphaBeta2< EvalT >::setRoot().

void osl::search::SearchState2::setState ( const NumEffectState &  s)
virtual

state のコピーを行う.

this->state は探索終了後も保存されるが,探索中に exception が起こると 破壊されている

Reimplemented from osl::search::SearchState2Core.

Definition at line 190 of file searchState2.cc.

References osl::search::SearchState2Core::setState().

void osl::search::SearchState2::subLimit ( int  limit)
inlineprotected

Definition at line 529 of file searchState2.h.

References cur_limit, limit, and search_assert.

Member Data Documentation

int osl::search::SearchState2::cur_limit
protected

Definition at line 502 of file searchState2.h.

Referenced by addLimit(), curLimit(), setRoot(), and subLimit().

const int osl::search::SearchState2::ReSearchLimitMargin = 80
static

再探索や,指手生成でより確率の高い手があったときに無視する範囲

Definition at line 499 of file searchState2.h.

int osl::search::SearchState2::root_limit
protected

Definition at line 501 of file searchState2.h.

Referenced by setRoot().


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