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

#include <alphaBeta3.h>

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

Classes

struct  CallQuiesce
 
struct  CallSearch
 
struct  PVInfo
 
struct  PVVector
 
struct  SearchInfo
 

Public Types

enum  MoveCategory {
  Initial, KingEscape, Pass, TakeBack,
  Capture, Killer, CaptureAll, All
}
 
enum  { MaxDepth = 64 }
 
enum  NodeType { PvNode = 0, CutNode = 1, AllNode = -1 }
 
typedef SearchState2::checkmate_t checkmate_t
 
typedef eval::ml::OpenMidEndingEval eval_t
 

Public Member Functions

 AlphaBeta3 (const NumEffectState &s, checkmate_t &checker, SimpleHashTable *t, CountRecorder &)
 
 ~AlphaBeta3 ()
 
Move computeBestMoveIteratively (int limit, int step, int initial_limit=600, size_t node_limit=1600000, const TimeAssigned &assign=TimeAssigned(MilliSeconds::Interval(60 *1000)), MoveWithComment *additional_info=0)
 
bool isReasonableMove (Move move, int pawn_sacrifice=1)
 
void setRootIgnoreMoves (const MoveVector *rim, bool)
 
void setHistory (const MoveStack &h)
 
void enableMultiPV (unsigned int)
 
template<osl::Player P>
osl::Move nextMove ()
 
template<osl::Player P>
void generateAllMoves (const NumEffectState &state, const SearchInfo &parent, SearchInfo &node)
 
template<osl::Player P>
void generateCapture (const NumEffectState &state, SearchInfo &node)
 
template<osl::Player P>
bool seePlusLight (const NumEffectState &state, Move m)
 
template<osl::Player P>
void generateCaptureAll (const NumEffectState &state, SearchInfo &node)
 
- Public Member Functions inherited from osl::search::SearchTimer
 SearchTimer ()
 
 SearchTimer (const SearchTimer &src)
 
virtual ~SearchTimer ()
 
void setTimeAssign (const TimeAssigned &a)
 
void setStartTime (MilliSeconds start)
 
void setStable (bool new_stable)
 
bool isStableNow () const
 
bool hasSchedule () const
 
const TimeAssignedtimeAssigned () const
 
const MilliSeconds startTime () const
 
double elapsed (MilliSeconds now) const
 
double elapsed () const
 
void setNextIterationCoefficient (double new_value)
 
void setNodeCountHardLimit (uint64_t new_value)
 
double nextIterationCoefficient () const
 
bool stopping () const
 
void stopNow ()
 
SearchTimerCommon::StopReason stopReason ()
 
void throwIfNoMoreTime (uint64_t node_count)
 
int nodeAffordable () const
 
void addMonitor (const boost::shared_ptr< SearchMonitor > &)
 
bool hasMonitor () const
 
const vector
< boost::shared_ptr
< SearchMonitor > > & 
monitors () const
 
int lastMemoryUseRatio1000 () const
 

Static Public Member Functions

static void showNodeDepth (std::ostream &)
 
static void clearNodeDepth ()
 
template<Player P>
static void generateAllMoves (const NumEffectState &state, const SearchInfo &, SearchInfo &)
 
template<Player P>
static void generateCapture (const NumEffectState &state, SearchInfo &)
 
template<Player P>
static void generateCaptureAll (const NumEffectState &state, SearchInfo &)
 
template<Player P>
static bool seePlusLight (const NumEffectState &state, Move m)
 
- Static Public Member Functions inherited from osl::search::SearchTimer
static void adjustMemoryUseLimit (double scale=0.9)
 メモリとノード数の関係を調整. More...
 

Private Member Functions

Move searchRoot (int limit)
 
template<Player P>
int makeMoveAndSearch (Move, int consume)
 
template<Player P>
void presearch ()
 
template<Player P>
void search ()
 
template<Player P>
Move nextMove ()
 
template<Player P>
void quiesceRoot ()
 
template<Player P>
int makeMoveAndQuiesce (Move)
 
template<Player P>
void quiesce ()
 
bool reductionOk () const
 
int evalValue () const
 
- Private Member Functions inherited from osl::search::FixedEval
 FixedEval ()
 
void setDrawValue (int value)
 
int drawValue () const
 
 ~FixedEval ()
 

Private Attributes

volatile int stop_by_alarm
 
NumEffectState state
 
int depth
 
CountRecorderrecorder
 
SimpleHashTabletable_common
 

Friends

struct CallSearch< BLACK >
 
struct CallSearch< WHITE >
 
struct CallQuiesce< BLACK >
 
struct CallQuiesce< WHITE >
 

Additional Inherited Members

- Static Private Member Functions inherited from osl::search::FixedEval
static int winByFoul (Player P)
 相手の王手千日手,打歩詰. More...
 
static int winByLoop (Player P)
 駒得するループ. More...
 
static int winByCheckmate (Player P)
 詰による勝 More...
 
static int minusInfty (Player P)
 探索windowの下限 (負けでも更新される値) More...
 
static int winThreshold (Player P)
 この値を越えれば勝. More...
 
static int windowMax (Player P)
 探索して意味がある範囲 (偶数) More...
 
static int brinkmatePenalty (Player P, int limit)
 必死(に見える)局面の評価値 Pが負けそう More...
 
static int threatmatePenalty (Player P)
 末端で詰めろがかかっている場合のペナルティ. More...
 
static int isWinValue (Player P, int val)
 勝かどうか. More...
 

Detailed Description

Definition at line 21 of file alphaBeta3.h.

Member Typedef Documentation

Definition at line 25 of file alphaBeta3.h.

Definition at line 26 of file alphaBeta3.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MaxDepth 

Definition at line 47 of file alphaBeta3.h.

Enumerator
Initial 
KingEscape 
Pass 
TakeBack 
Capture 
Killer 
CaptureAll 
All 

Definition at line 46 of file alphaBeta3.h.

Enumerator
PvNode 
CutNode 
AllNode 

Definition at line 48 of file alphaBeta3.h.

Constructor & Destructor Documentation

osl::search::AlphaBeta3::AlphaBeta3 ( const NumEffectState &  s,
checkmate_t checker,
SimpleHashTable t,
CountRecorder r 
)

Definition at line 142 of file alphaBeta3.cc.

References osl::rating::StandardFeatureSet::instance(), and MaxDepth.

osl::search::AlphaBeta3::~AlphaBeta3 ( )

Definition at line 153 of file alphaBeta3.cc.

Member Function Documentation

void osl::search::AlphaBeta3::clearNodeDepth ( )
static

Definition at line 261 of file alphaBeta3.cc.

osl::Move osl::search::AlphaBeta3::computeBestMoveIteratively ( int  limit,
int  step,
int  initial_limit = 600,
size_t  node_limit = 1600000,
const TimeAssigned assign = TimeAssigned(MilliSeconds::Interval(60*1000)),
MoveWithComment additional_info = 0 
)
void osl::search::AlphaBeta3::enableMultiPV ( unsigned  int)
inline

Definition at line 40 of file alphaBeta3.h.

int osl::search::AlphaBeta3::evalValue ( ) const
private

Definition at line 158 of file alphaBeta3.cc.

References depth.

template<Player P>
static void osl::search::AlphaBeta3::generateAllMoves ( const NumEffectState &  state,
const SearchInfo ,
SearchInfo  
)
static
template<osl::Player P>
void osl::search::AlphaBeta3::generateAllMoves ( const NumEffectState &  state,
const SearchInfo parent,
SearchInfo node 
)
template<Player P>
static void osl::search::AlphaBeta3::generateCapture ( const NumEffectState &  state,
SearchInfo  
)
static
template<osl::Player P>
void osl::search::AlphaBeta3::generateCapture ( const NumEffectState &  state,
SearchInfo node 
)
template<Player P>
static void osl::search::AlphaBeta3::generateCaptureAll ( const NumEffectState &  state,
SearchInfo  
)
static
template<osl::Player P>
void osl::search::AlphaBeta3::generateCaptureAll ( const NumEffectState &  state,
SearchInfo node 
)
bool osl::search::AlphaBeta3::isReasonableMove ( Move  move,
int  pawn_sacrifice = 1 
)

Definition at line 242 of file alphaBeta3.cc.

template<osl::Player P>
int osl::search::AlphaBeta3::makeMoveAndQuiesce ( Move  move)
private

Definition at line 935 of file alphaBeta3.cc.

References depth.

template<osl::Player P>
int osl::search::AlphaBeta3::makeMoveAndSearch ( Move  move,
int  consume 
)
private
template<Player P>
Move osl::search::AlphaBeta3::nextMove ( )
private
template<osl::Player P>
osl::Move osl::search::AlphaBeta3::nextMove ( )
template<osl::Player P>
void osl::search::AlphaBeta3::presearch ( )
private
template<osl::Player P>
void osl::search::AlphaBeta3::quiesce ( )
private
template<osl::Player P>
void osl::search::AlphaBeta3::quiesceRoot ( )
private
bool osl::search::AlphaBeta3::reductionOk ( ) const
inlineprivate
template<osl::Player P>
void osl::search::AlphaBeta3::search ( )
private
osl::Move osl::search::AlphaBeta3::searchRoot ( int  limit)
private
template<Player P>
static bool osl::search::AlphaBeta3::seePlusLight ( const NumEffectState &  state,
Move  m 
)
static
template<osl::Player P>
bool osl::search::AlphaBeta3::seePlusLight ( const NumEffectState &  state,
Move  m 
)
inline
void osl::search::AlphaBeta3::setHistory ( const MoveStack &  h)

Definition at line 252 of file alphaBeta3.cc.

void osl::search::AlphaBeta3::setRootIgnoreMoves ( const MoveVector *  rim,
bool   
)

Definition at line 248 of file alphaBeta3.cc.

void osl::search::AlphaBeta3::showNodeDepth ( std::ostream &  )
static

Definition at line 257 of file alphaBeta3.cc.

Friends And Related Function Documentation

friend struct CallQuiesce< BLACK >
friend

Definition at line 87 of file alphaBeta3.h.

friend struct CallQuiesce< WHITE >
friend

Definition at line 88 of file alphaBeta3.h.

friend struct CallSearch< BLACK >
friend

Definition at line 84 of file alphaBeta3.h.

friend struct CallSearch< WHITE >
friend

Definition at line 86 of file alphaBeta3.h.

Member Data Documentation

int osl::search::AlphaBeta3::depth
private

Definition at line 100 of file alphaBeta3.h.

CountRecorder& osl::search::AlphaBeta3::recorder
private

Definition at line 101 of file alphaBeta3.h.

NumEffectState osl::search::AlphaBeta3::state
private

Definition at line 99 of file alphaBeta3.h.

volatile int osl::search::AlphaBeta3::stop_by_alarm
private

Definition at line 98 of file alphaBeta3.h.

SimpleHashTable* osl::search::AlphaBeta3::table_common
private

Definition at line 102 of file alphaBeta3.h.


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