Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

ProofUtil Namespace Reference

Deduce equivalent states, etc. More...

Functions

bitset_t MaximumProofSet (const HexBoard &brd, HexColor toPlay)
 Compute the maximum possible proof.
bitset_t InitialProofForOpponent (const HexBoard &brd, HexColor toPlay)
 The proof for a losing state is the union the proofs for each move.
bool ShrinkProof (bitset_t &proof, const StoneBoard &board, HexColor loser, const ICEngine &ice)
 Gives all cells outside of the proof to loser, computes fillin using ice, removes any cell in proof that is filled-in.
template<class HASH , class DB , class DATA >
int StoreTranspositions (SolverDB< HASH, DB, DATA > &db, const DATA &data, const HexState &state, const bitset_t &proof, HexColor winner)
 Computes and stores in db the transpostions of this proof on the given boardstate.
template<class HASH , class DB , class DATA >
int StoreFlippedStates (SolverDB< HASH, DB, DATA > &db, const DATA &data, const HexState &state, const bitset_t &proof, HexColor winner)
 Computes and stores in db the flipped transpostions of this proof on the given boardstate.

Detailed Description

Deduce equivalent states, etc.


Function Documentation

bitset_t ProofUtil::InitialProofForOpponent ( const HexBoard brd,
HexColor  toPlay 
)

The proof for a losing state is the union the proofs for each move.

This function returns the proof defined by all opponent semi-connctions as well as any ice deductions.

Note:
The proof is for the opponent of toPlay.
Todo:
Argh, document this better.

Definition at line 24 of file ProofUtil.cpp.

References HexBoard::Builder(), HexPointUtil::colorEdge1(), HexPointUtil::colorEdge2(), HexBoard::Cons(), InferiorCells::DeductionSet(), VCList::getGreedyUnion(), HexBoard::GetInferiorCells(), VCSet::GetList(), StoneBoard::GetPlayed(), HexBoard::GetPosition(), VCList::getUnion(), InferiorCells::Killers(), VCBuilder::Parameters(), InferiorCells::Reversers(), InferiorCells::Reversible(), VC::SEMI, benzene_bitset< _Nb >::set(), VCBuilderParam::use_greedy_union, and InferiorCells::Vulnerable().

Referenced by DfsSolver::OrderMoves(), and DfsSolver::SolveInteriorState().

bitset_t ProofUtil::MaximumProofSet ( const HexBoard brd,
HexColor  toPlay 
)
bool ProofUtil::ShrinkProof ( bitset_t proof,
const StoneBoard board,
HexColor  loser,
const ICEngine ice 
)

Gives all cells outside of the proof to loser, computes fillin using ice, removes any cell in proof that is filled-in.

Returns true if proof was shrunk.

Referenced by DfsSolver::HandleProof().

template<class HASH , class DB , class DATA >
int ProofUtil::StoreFlippedStates ( SolverDB< HASH, DB, DATA > &  db,
const DATA &  data,
const HexState state,
const bitset_t proof,
HexColor  winner 
) [inline]

Computes and stores in db the flipped transpostions of this proof on the given boardstate.

Returns number of db entries successfully added or updated.

Definition at line 122 of file ProofUtil.hpp.

References BLACK, HexAssert, BitsetUtil::IsSubsetOf(), BoardUtils::Mirror(), SolverDataFlags::MIRROR_TRANSPOSITION, benzene_bitset< _Nb >::none(), HexState::Position(), SolverDB< HASH, DB, DATA >::Put(), HexState::ToPlay(), SolverDataFlags::TRANSPOSITION, and WHITE.

Referenced by DfsSolver::StoreState().

template<class HASH , class DB , class DATA >
int ProofUtil::StoreTranspositions ( SolverDB< HASH, DB, DATA > &  db,
const DATA &  data,
const HexState state,
const bitset_t proof,
HexColor  winner 
) [inline]

Computes and stores in db the transpostions of this proof on the given boardstate.

Returns number of db entries successfully added or updated.

Definition at line 59 of file ProofUtil.hpp.

References BitsetUtil::BitsetToVector(), BLACK, StoneBoard::Hash(), HexAssert, StoneBoard::PlayMove(), HexState::Position(), SolverDB< HASH, DB, DATA >::Put(), StoneBoard::StartNewGame(), SolverDataFlags::TRANSPOSITION, and WHITE.

Referenced by DfsSolver::StoreState().


6 Jan 2011 Doxygen 1.6.3