All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions
osl::search::AlphaBeta2< EvalT > Class Template Reference

AlphaBeta の書き直し版 More...

#include <alphaBeta2.h>

Inheritance diagram for osl::search::AlphaBeta2< EvalT >:
Inheritance graph
[legend]
Collaboration diagram for osl::search::AlphaBeta2< EvalT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef AlphaBeta2Tree< EvalT > base_t
typedef base_t::checkmate_t checkmate_t
typedef base_t::Window Window

Public Member Functions

 AlphaBeta2 (const NumEffectState &s, checkmate_t &checker, SimpleHashTable *t, CountRecorder &)
 ~AlphaBeta2 ()
template<Player P>
int alphaBetaSearchRoot (Window window, MoveLogProb &best_move, int limit)
 entrance of alpha beta window search.
int alphaBetaSearchRoot (Window window, MoveLogProb &best_move, int limit)
int alphaBetaSearchRoot (MoveLogProb &best_move, int limit)
Move computeBestMoveIteratively (int limit, const int step=100, int initialLimit=600, size_t nodeLimit=1600000, const TimeAssigned &assign=TimeAssigned(MilliSeconds::Interval(60 *1000)), MoveWithComment *additional_info=0)
 entrance of alpha beta iterative search.
bool isReasonableMove (Move move, int pawn_sacrifice=1)
void setRootIgnoreMoves (const MoveVector *rim, bool prediction)
void enableMultiPV (unsigned int width)
const AlphaBeta2SharedRoot sharedRootInfo () const
void setRoot (int limit)
 root で limitを閾値に探索を始めることを設定
void makeMove (Move)

Static Public Member Functions

static const Window fullWindow (Player P)
static void showNodeDepth (std::ostream &)
static void clearNodeDepth ()

Private Types

enum  PVCheckmateStatus { PVStable, PVThreatmateNotRecord, PVThreatmate, PVCheckmate }

Private Member Functions

PVCheckmateStatus findCheckmateInPV (int verify_node, CArray< bool, 2 > &king_in_threat)

Detailed Description

template<class EvalT>
class osl::search::AlphaBeta2< EvalT >

AlphaBeta の書き直し版

Definition at line 284 of file alphaBeta2.h.


Member Typedef Documentation

template<class EvalT >
typedef AlphaBeta2Tree<EvalT> osl::search::AlphaBeta2< EvalT >::base_t

Definition at line 288 of file alphaBeta2.h.

template<class EvalT >
typedef base_t::checkmate_t osl::search::AlphaBeta2< EvalT >::checkmate_t

Reimplemented from osl::search::SearchState2Core.

Definition at line 289 of file alphaBeta2.h.

template<class EvalT >
typedef base_t::Window osl::search::AlphaBeta2< EvalT >::Window

Reimplemented from osl::search::AlphaBeta2Tree< EvalT >.

Definition at line 290 of file alphaBeta2.h.


Member Enumeration Documentation

template<class EvalT >
enum osl::search::AlphaBeta2::PVCheckmateStatus [private]
Enumerator:
PVStable 
PVThreatmateNotRecord 
PVThreatmate 
PVCheckmate 

Definition at line 344 of file alphaBeta2.h.


Constructor & Destructor Documentation

template<class EvalT >
osl::search::AlphaBeta2< EvalT >::AlphaBeta2 ( const NumEffectState &  s,
checkmate_t checker,
SimpleHashTable t,
CountRecorder r 
)

Definition at line 1650 of file alphaBeta2.cc.

References osl::search::MoveGenerator::initOnce().

template<class EvalT >
osl::search::AlphaBeta2< EvalT >::~AlphaBeta2 ( )

Definition at line 1659 of file alphaBeta2.cc.


Member Function Documentation

template<class EvalT >
template<osl::Player P>
int osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot ( Window  window,
MoveLogProb best_move,
int  limit 
)

entrance of alpha beta window search.

see http://www.logos.t.u-tokyo.ac.jp/~gekisashi/algorithm/re_search.html. rootDepth, curLimit are initialized here.

Definition at line 2071 of file alphaBeta2.cc.

References osl::search::SimpleHashTable::allocate(), osl::search::AlphaBeta2Window::alpha(), osl::alt(), osl::search::SimpleHashRecord::bestMove(), osl::search::QuiescenceRecord::bestMove(), osl::search::AlphaBeta2Window::beta(), osl::eval::betterThan(), osl::search::QuiescenceRecord::checkmateNodesLeft(), count, osl::eval::delta(), osl::container::GeneralSimpleHashTable< Record >::find(), osl::Move::from(), osl::search::MoveGenerator::generateAll(), osl::search::SimpleHashRecord::hasGreaterLowerBound(), osl::search::SimpleHashRecord::hasUpperBound(), osl::search::SearchTable::HistorySpecialDepth, osl::search::MoveGenerator::init(), osl::Move::INVALID(), osl::Move::isDrop(), osl::Move::isNormal(), osl::search::DualThreatmateState::isThreatmate(), osl::search::SimpleHashTable::isVerbose(), osl::KING, osl::OslConfig::lock_io, osl::eval::max(), osl::eval::min(), osl::MoveLogProb::move(), osl::Move::move, moves, osl::newPtypeO(), osl::PieceStand::order, osl::Move::PASS(), osl::PAWN, osl::Move::ptype(), osl::search::SimpleHashRecord::qrecord, osl::search::SimpleHashRecord::resetValue(), result, osl::OslConfig::searchExactValueInOneReply(), osl::search::SimpleHashRecord::setInCheck(), osl::search::SimpleHashRecord::setLowerBound(), osl::search::DualThreatmateState::setThreatmate(), osl::search::SimpleHashRecord::threatmate(), osl::Move::to(), osl::search::SimpleHashRecord::upperBound(), osl::OslConfig::usiOutputPawnValue(), osl::MoveLogProb::validMove(), and osl::search::SimpleHashTable::verboseLevel().

template<class EvalT >
int osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot ( Window  window,
MoveLogProb best_move,
int  limit 
) [inline]

Definition at line 309 of file alphaBeta2.h.

References osl::BLACK, limit, and osl::search::SearchState2Core::state().

template<class EvalT >
int osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot ( MoveLogProb best_move,
int  limit 
)

Definition at line 1748 of file alphaBeta2.cc.

template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::clearNodeDepth ( ) [static]

Definition at line 2532 of file alphaBeta2.cc.

template<class EvalT >
osl::Move osl::search::AlphaBeta2< EvalT >::computeBestMoveIteratively ( int  limit,
const int  step = 100,
int  initialLimit = 600,
size_t  nodeLimit = 1600000,
const TimeAssigned assign = TimeAssigned(MilliSeconds::Interval(60*1000)),
MoveWithComment additional_info = 0 
)
template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::enableMultiPV ( unsigned int  width) [inline]

Definition at line 338 of file alphaBeta2.h.

References osl::search::AlphaBeta2Common< EvalT >::multi_pv, and width.

template<class EvalT >
osl::search::AlphaBeta2< EvalT >::PVCheckmateStatus osl::search::AlphaBeta2< EvalT >::findCheckmateInPV ( int  verify_node,
CArray< bool, 2 > &  king_in_threat 
) [private]
template<class EvalT >
static const Window osl::search::AlphaBeta2< EvalT >::fullWindow ( Player  P) [inline, static]

Definition at line 305 of file alphaBeta2.h.

References osl::alt(), and osl::search::FixedEval::winThreshold().

template<class EvalT >
bool osl::search::AlphaBeta2< EvalT >::isReasonableMove ( Move  move,
int  pawn_sacrifice = 1 
)

Definition at line 2491 of file alphaBeta2.cc.

template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::makeMove ( Move  move)
template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::setRoot ( int  limit)

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

Reimplemented from osl::search::SearchState2.

Definition at line 2465 of file alphaBeta2.cc.

References osl::search::SimpleHashTable::allocate(), osl::eval::max(), and osl::search::SearchState2::setRoot().

template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::setRootIgnoreMoves ( const MoveVector *  rim,
bool  prediction 
) [inline]
template<class EvalT >
const AlphaBeta2SharedRoot osl::search::AlphaBeta2< EvalT >::sharedRootInfo ( ) const [inline]
template<class EvalT >
void osl::search::AlphaBeta2< EvalT >::showNodeDepth ( std::ostream &  os) [static]

Definition at line 2498 of file alphaBeta2.cc.

References osl::eval::max(), and max_depth.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines