Public Member Functions | Public Attributes
osl::search::StateElements Struct Reference

複数のmoveによる差分を分解したもの 一回のmoveでOnBoarPlusは手番の駒のみ OnBoardMinusは手番と相手の駒がありうる OnBoardPlusは 最大深さ/2 OnBoardMinusは 最大深さ分用意する. More...

#include <moveStackRejections.h>

Collaboration diagram for osl::search::StateElements:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StateElements ()
void clear ()
void addStand (Ptype ptype)
 相手が駒を取りptypeの持駒が増えた. 自分がptypeの持駒を使った
void subStand (Ptype ptype)
 相手がtypeの持駒を使った 自分が駒を取りptypeの持駒が増えた.
void addMyBoard (Square pos, PtypeO ptypeO)
void subMyBoard (Square pos, PtypeO ptypeO)
void addOpBoard (Square pos, PtypeO ptypeO)
void subOpBoard (Square pos, PtypeO ptypeO)
void addMyMove (Move move)
 自分のmoveに従って更新 
void addOpMove (Move move)
 相手のmoveに従って更新
bool isLoop () const
 盤面が増減なし
template<Player P>
bool validSimpleMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement) const
 PによるSimpleMoveが可能
template<Player P>
bool validSimpleMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, Move lastMove) const
 stateにlastMoveを施した後の盤面で  PによるSimpleMoveが可能
template<Player P>
bool validCaptureMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, OnBoardElement const &captureElement) const
 PによるcaptureMoveが可能
template<Player P>
bool validCaptureMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, OnBoardElement const &captureElement, Move lastMove) const
 stateにlastMoveを施した後の盤面で  PによるCaptureMoveが可能
template<Player P>
bool canReject (NumEffectState const &state, bool notRejectSennichite, bool notRootMove, Move lastMove, Move actualMove) const
 Pがあるmoveをする前の2n手前からmove後への差分からrejectするかどうか決める. playerに取って有利な持ち駒渡しがある -> false playerに取って不利な持ち駒渡しがある 差分がない場合 -> 一手パス+駒損 -> true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能ならtrue 持ち駒渡しがない 差分がない場合 -> 一手パス notRootMoveの時は true (root以外ではそこでPASSできる) そうでないときは false 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能で notRejectSennichiteの時は false (千日手の方がましな可能性がある) そうでないときは true (有利だったら相手に千日手のチャンスを耐えない)
template<osl::Player P>
bool validSimpleMove (osl::state::NumEffectState const &state, osl::search::OnBoardElement const &fromElement, osl::search::OnBoardElement const &toElement, Move lastMove) const
 こちらはstateにlastMoveをapplyした後に可能かどうかのチェックをおこなう.
template<osl::Player P>
bool validCaptureMove (osl::state::NumEffectState const &state, osl::search::OnBoardElement const &fromElement, osl::search::OnBoardElement const &toElement, osl::search::OnBoardElement const &captureElement, osl::Move lastMove) const
template<osl::Player P>
bool canReject (osl::state::NumEffectState const &state, bool notRejectSennichite, bool notRootMove, Move lastMove, Move actualMove) const
 rejectable patterns 0 - sennichite (or piece losing loop) myPlus 1 myMinus 1 - my simple move myPlus 1 myMinus 1 opMinus 1 - my capture move myPlus 1 - my drop move opPlus 1 opMinus 1 - op simple move opPlus 1 opMinus 1 myPlus 1 - op capture move opMinus 1 - op drop move

Public Attributes

FixedCapacityVector
< OnBoardElement, 32 > 
myOnboardPlus
FixedCapacityVector
< OnBoardElement, 32 > 
opOnboardPlus
FixedCapacityVector
< OnBoardElement, 64 > 
myOnboardMinus
FixedCapacityVector
< OnBoardElement, 64 > 
opOnboardMinus
StandElements stand

Detailed Description

複数のmoveによる差分を分解したもの 一回のmoveでOnBoarPlusは手番の駒のみ OnBoardMinusは手番と相手の駒がありうる OnBoardPlusは 最大深さ/2 OnBoardMinusは 最大深さ分用意する.

Definition at line 80 of file moveStackRejections.h.


Constructor & Destructor Documentation

osl::search::StateElements::StateElements ( ) [inline]

Definition at line 87 of file moveStackRejections.h.


Member Function Documentation

void osl::search::StateElements::addMyBoard ( osl::Square  pos,
osl::PtypeO  ptypeO 
)
void osl::search::StateElements::addMyMove ( osl::Move  move)
void osl::search::StateElements::addOpBoard ( osl::Square  pos,
osl::PtypeO  ptypeO 
)
void osl::search::StateElements::addOpMove ( osl::Move  move)
void osl::search::StateElements::addStand ( osl::Ptype  ptype)

相手が駒を取りptypeの持駒が増えた. 自分がptypeの持駒を使った

Definition at line 81 of file moveStackRejections.cc.

template<osl::Player P>
bool osl::search::StateElements::canReject ( osl::state::NumEffectState const &  state,
bool  notRejectSennichite,
bool  notRootMove,
Move  lastMove,
Move  actualMove 
) const

rejectable patterns 0 - sennichite (or piece losing loop) myPlus 1 myMinus 1 - my simple move myPlus 1 myMinus 1 opMinus 1 - my capture move myPlus 1 - my drop move opPlus 1 opMinus 1 - op simple move opPlus 1 opMinus 1 myPlus 1 - op capture move opMinus 1 - op drop move

Definition at line 221 of file moveStackRejections.cc.

References osl::search::StandElements::add(), osl::Move::from(), osl::getPtype(), osl::search::StandElements::geZero(), osl::Move::isDrop(), osl::isPromoted(), osl::search::StandElements::isZero(), osl::Move::player(), osl::Move::ptypeO(), osl::search::StandElements::sub(), osl::Move::to(), and osl::unpromote().

template<Player P>
bool osl::search::StateElements::canReject ( NumEffectState const &  state,
bool  notRejectSennichite,
bool  notRootMove,
Move  lastMove,
Move  actualMove 
) const

Pがあるmoveをする前の2n手前からmove後への差分からrejectするかどうか決める. playerに取って有利な持ち駒渡しがある -> false playerに取って不利な持ち駒渡しがある 差分がない場合 -> 一手パス+駒損 -> true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能ならtrue 持ち駒渡しがない 差分がない場合 -> 一手パス notRootMoveの時は true (root以外ではそこでPASSできる) そうでないときは false 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能で notRejectSennichiteの時は false (千日手の方がましな可能性がある) そうでないときは true (有利だったら相手に千日手のチャンスを耐えない)

Referenced by osl::search::MoveStackRejections::probe().

void osl::search::StateElements::clear ( ) [inline]

Definition at line 89 of file moveStackRejections.h.

bool osl::search::StateElements::isLoop ( ) const [inline]

盤面が増減なし

Definition at line 119 of file moveStackRejections.h.

References myOnboardMinus, myOnboardPlus, opOnboardMinus, and opOnboardPlus.

Referenced by osl::search::MoveStackRejections::probe().

void osl::search::StateElements::subMyBoard ( osl::Square  pos,
osl::PtypeO  ptypeO 
)
void osl::search::StateElements::subOpBoard ( osl::Square  pos,
osl::PtypeO  ptypeO 
)
void osl::search::StateElements::subStand ( osl::Ptype  ptype)

相手がtypeの持駒を使った 自分が駒を取りptypeの持駒が増えた.

Definition at line 85 of file moveStackRejections.cc.

template<Player P>
bool osl::search::StateElements::validCaptureMove ( NumEffectState const &  state,
OnBoardElement const &  fromElement,
OnBoardElement const &  toElement,
OnBoardElement const &  captureElement,
Move  lastMove 
) const

stateにlastMoveを施した後の盤面で  PによるCaptureMoveが可能

template<osl::Player P>
bool osl::search::StateElements::validCaptureMove ( osl::state::NumEffectState const &  state,
osl::search::OnBoardElement const &  fromElement,
osl::search::OnBoardElement const &  toElement,
osl::search::OnBoardElement const &  captureElement,
osl::Move  lastMove 
) const
template<Player P>
bool osl::search::StateElements::validCaptureMove ( NumEffectState const &  state,
OnBoardElement const &  fromElement,
OnBoardElement const &  toElement,
OnBoardElement const &  captureElement 
) const

PによるcaptureMoveが可能

template<Player P>
bool osl::search::StateElements::validSimpleMove ( NumEffectState const &  state,
OnBoardElement const &  fromElement,
OnBoardElement const &  toElement,
Move  lastMove 
) const

stateにlastMoveを施した後の盤面で  PによるSimpleMoveが可能

template<Player P>
bool osl::search::StateElements::validSimpleMove ( NumEffectState const &  state,
OnBoardElement const &  fromElement,
OnBoardElement const &  toElement 
) const

PによるSimpleMoveが可能

template<osl::Player P>
bool osl::search::StateElements::validSimpleMove ( osl::state::NumEffectState const &  state,
osl::search::OnBoardElement const &  fromElement,
osl::search::OnBoardElement const &  toElement,
Move  lastMove 
) const

Member Data Documentation

Definition at line 83 of file moveStackRejections.h.

Referenced by addMyBoard(), isLoop(), and osl::search::operator<<().

Definition at line 81 of file moveStackRejections.h.

Referenced by addMyBoard(), isLoop(), and osl::search::operator<<().

Definition at line 84 of file moveStackRejections.h.

Referenced by isLoop(), and osl::search::operator<<().

Definition at line 82 of file moveStackRejections.h.

Referenced by isLoop(), and osl::search::operator<<().


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