複数のmoveによる差分を分解したもの 一回のmoveでOnBoarPlusは手番の駒のみ OnBoardMinusは手番と相手の駒がありうる OnBoardPlusは 最大深さ/2 OnBoardMinusは 最大深さ分用意する. More...
#include <moveStackRejections.h>
Public Member Functions | |
StateElements () | |
void | clear () |
void | addStand (Ptype ptype) |
相手が駒を取りptypeの持駒が増えた. 自分がptypeの持駒を使った More... | |
void | subStand (Ptype ptype) |
相手がtypeの持駒を使った 自分が駒を取りptypeの持駒が増えた. More... | |
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に従って更新 More... | |
void | addOpMove (Move move) |
相手のmoveに従って更新 More... | |
bool | isLoop () const |
盤面が増減なし More... | |
template<Player P> | |
bool | validSimpleMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement) const |
PによるSimpleMoveが可能 More... | |
template<Player P> | |
bool | validSimpleMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, Move lastMove) const |
stateにlastMoveを施した後の盤面で PによるSimpleMoveが可能 More... | |
template<Player P> | |
bool | validCaptureMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, OnBoardElement const &captureElement) const |
PによるcaptureMoveが可能 More... | |
template<Player P> | |
bool | validCaptureMove (NumEffectState const &state, OnBoardElement const &fromElement, OnBoardElement const &toElement, OnBoardElement const &captureElement, Move lastMove) const |
stateにlastMoveを施した後の盤面で PによるCaptureMoveが可能 More... | |
template<Player P> | |
bool | canReject (NumEffectState const &state, bool mayRejectSennichite, bool isRootMove, Move lastMove, Move actualMove) const |
Pがあるmoveをする前の2n手前からmove後への差分からrejectするかどうか決める. playerに取って有利な持ち駒渡しがある -> false playerに取って不利な持ち駒渡しがある 差分がない場合 -> 一手パス+駒損 -> true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能ならtrue 持ち駒渡しがない 差分がない場合 -> 一手パス isRootMoveの時は false(rootではPASSできない) root以外では true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能で mayRejectSennichiteの時は true (有利だったら相手に千日手のチャンスを耐えない) そうでないときは false (千日手の方がましな可能性がある) More... | |
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した後に可能かどうかのチェックをおこなう. More... | |
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 mayRejectSennichite, bool isRootMove, 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 More... | |
Public Attributes | |
FixedCapacityVector < OnBoardElement, 32 > | myOnboardPlus |
FixedCapacityVector < OnBoardElement, 32 > | opOnboardPlus |
FixedCapacityVector < OnBoardElement, 64 > | myOnboardMinus |
FixedCapacityVector < OnBoardElement, 64 > | opOnboardMinus |
StandElements | stand |
複数のmoveによる差分を分解したもの 一回のmoveでOnBoarPlusは手番の駒のみ OnBoardMinusは手番と相手の駒がありうる OnBoardPlusは 最大深さ/2 OnBoardMinusは 最大深さ分用意する.
Definition at line 76 of file moveStackRejections.h.
|
inline |
Definition at line 83 of file moveStackRejections.h.
void osl::search::StateElements::addMyBoard | ( | osl::Square | pos, |
osl::PtypeO | ptypeO | ||
) |
Definition at line 30 of file moveStackRejections.cc.
References osl::search::OnBoardElement::makePosPtypeO(), myOnboardMinus, and myOnboardPlus.
void osl::search::StateElements::addMyMove | ( | osl::Move | move) |
自分のmoveに従って更新
Definition at line 89 of file moveStackRejections.cc.
References osl::Move::capturePtypeO(), osl::Move::from(), osl::getPtype(), osl::Move::isCapture(), osl::Move::isDrop(), osl::Move::oldPtypeO(), osl::Move::ptype(), osl::Move::ptypeO(), osl::Move::to(), and osl::unpromote().
Referenced by osl::search::MoveStackRejections::probe().
void osl::search::StateElements::addOpBoard | ( | osl::Square | pos, |
osl::PtypeO | ptypeO | ||
) |
Definition at line 56 of file moveStackRejections.cc.
References osl::search::OnBoardElement::makePosPtypeO().
void osl::search::StateElements::addOpMove | ( | osl::Move | move) |
相手のmoveに従って更新
Definition at line 108 of file moveStackRejections.cc.
References osl::Move::capturePtypeO(), osl::Move::from(), osl::getPtype(), osl::Move::isCapture(), osl::Move::isDrop(), osl::Move::oldPtypeO(), osl::Move::ptype(), osl::Move::ptypeO(), osl::Move::to(), and osl::unpromote().
Referenced by osl::search::MoveStackRejections::probe().
void osl::search::StateElements::addStand | ( | osl::Ptype | ptype) |
相手が駒を取りptypeの持駒が増えた. 自分がptypeの持駒を使った
Definition at line 81 of file moveStackRejections.cc.
bool osl::search::StateElements::canReject | ( | NumEffectState const & | state, |
bool | mayRejectSennichite, | ||
bool | isRootMove, | ||
Move | lastMove, | ||
Move | actualMove | ||
) | const |
Pがあるmoveをする前の2n手前からmove後への差分からrejectするかどうか決める. playerに取って有利な持ち駒渡しがある -> false playerに取って不利な持ち駒渡しがある 差分がない場合 -> 一手パス+駒損 -> true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能ならtrue 持ち駒渡しがない 差分がない場合 -> 一手パス isRootMoveの時は false(rootではPASSできない) root以外では true 差分が自分一手分の時 -> その手が2n手前に可能ならtrue 差分が相手一手分の時 -> move後に相手が可能で mayRejectSennichiteの時は true (有利だったら相手に千日手のチャンスを耐えない) そうでないときは false (千日手の方がましな可能性がある)
Referenced by osl::search::MoveStackRejections::probe().
bool osl::search::StateElements::canReject | ( | osl::state::NumEffectState const & | state, |
bool | mayRejectSennichite, | ||
bool | isRootMove, | ||
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().
|
inline |
Definition at line 85 of file moveStackRejections.h.
|
inline |
盤面が増減なし
Definition at line 115 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 | ||
) |
Definition at line 43 of file moveStackRejections.cc.
References osl::search::OnBoardElement::makePosPtypeO().
void osl::search::StateElements::subOpBoard | ( | osl::Square | pos, |
osl::PtypeO | ptypeO | ||
) |
Definition at line 69 of file moveStackRejections.cc.
References osl::search::OnBoardElement::makePosPtypeO().
void osl::search::StateElements::subStand | ( | osl::Ptype | ptype) |
相手がtypeの持駒を使った 自分が駒を取りptypeの持駒が増えた.
Definition at line 85 of file moveStackRejections.cc.
bool osl::search::StateElements::validCaptureMove | ( | NumEffectState const & | state, |
OnBoardElement const & | fromElement, | ||
OnBoardElement const & | toElement, | ||
OnBoardElement const & | captureElement | ||
) | const |
PによるcaptureMoveが可能
bool osl::search::StateElements::validCaptureMove | ( | NumEffectState const & | state, |
OnBoardElement const & | fromElement, | ||
OnBoardElement const & | toElement, | ||
OnBoardElement const & | captureElement, | ||
Move | lastMove | ||
) | const |
stateにlastMoveを施した後の盤面で PによるCaptureMoveが可能
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 |
Definition at line 171 of file moveStackRejections.cc.
References osl::Square::canPromote(), osl::Move::from(), osl::PtypeTable::getEffect(), osl::EffectContent::hasEffect(), osl::EffectContent::hasUnblockableEffect(), osl::Piece::isEmpty(), osl::EffectContent::offset(), osl::state::SimpleState::pieceAt(), osl::search::OnBoardElement::pos(), osl::Ptype_Table, osl::search::OnBoardElement::ptypeO(), osl::Move::to(), and osl::unpromote().
bool osl::search::StateElements::validSimpleMove | ( | NumEffectState const & | state, |
OnBoardElement const & | fromElement, | ||
OnBoardElement const & | toElement | ||
) | const |
PによるSimpleMoveが可能
bool osl::search::StateElements::validSimpleMove | ( | NumEffectState const & | state, |
OnBoardElement const & | fromElement, | ||
OnBoardElement const & | toElement, | ||
Move | lastMove | ||
) | const |
stateにlastMoveを施した後の盤面で PによるSimpleMoveが可能
bool osl::search::StateElements::validSimpleMove | ( | osl::state::NumEffectState const & | state, |
osl::search::OnBoardElement const & | fromElement, | ||
osl::search::OnBoardElement const & | toElement, | ||
Move | lastMove | ||
) | const |
こちらはstateにlastMoveをapplyした後に可能かどうかのチェックをおこなう.
Definition at line 133 of file moveStackRejections.cc.
References osl::Square::canPromote(), osl::Move::from(), osl::PtypeTable::getEffect(), osl::EffectContent::hasEffect(), osl::EffectContent::hasUnblockableEffect(), osl::Piece::isEmpty(), osl::EffectContent::offset(), osl::state::SimpleState::pieceAt(), osl::search::OnBoardElement::pos(), osl::Ptype_Table, osl::search::OnBoardElement::ptypeO(), osl::Move::to(), and osl::unpromote().
FixedCapacityVector<OnBoardElement,64> osl::search::StateElements::myOnboardMinus |
Definition at line 79 of file moveStackRejections.h.
Referenced by addMyBoard(), isLoop(), and osl::search::operator<<().
FixedCapacityVector<OnBoardElement,32> osl::search::StateElements::myOnboardPlus |
Definition at line 77 of file moveStackRejections.h.
Referenced by addMyBoard(), isLoop(), and osl::search::operator<<().
FixedCapacityVector<OnBoardElement,64> osl::search::StateElements::opOnboardMinus |
Definition at line 80 of file moveStackRejections.h.
Referenced by isLoop(), and osl::search::operator<<().
FixedCapacityVector<OnBoardElement,32> osl::search::StateElements::opOnboardPlus |
Definition at line 78 of file moveStackRejections.h.
Referenced by isLoop(), and osl::search::operator<<().
StandElements osl::search::StateElements::stand |
Definition at line 81 of file moveStackRejections.h.
Referenced by osl::search::operator<<(), and osl::search::MoveStackRejections::probe().