00001 /* proofTreeDepthDfpn.h 00002 */ 00003 #ifndef OSL_PROOFTREEDEPTHDFPN_H 00004 #define OSL_PROOFTREEDEPTHDFPN_H 00005 00006 #include "osl/hash/hashKey.h" 00007 #include "osl/stl/vector.h" 00008 #include <boost/scoped_ptr.hpp> 00009 namespace osl 00010 { 00011 namespace state 00012 { 00013 class NumEffectState; 00014 } 00015 namespace checkmate 00016 { 00017 class CheckHashRecord; 00018 class DfpnTable; 00024 class ProofTreeDepthDfpn 00025 { 00026 struct Table; 00027 boost::scoped_ptr<Table> table; 00028 public: 00029 explicit ProofTreeDepthDfpn(const DfpnTable& table); 00030 ~ProofTreeDepthDfpn(); 00031 int depth(const HashKey& key, const state::NumEffectState& state, bool is_or_node) const; 00032 00033 void retrievePV(const state::NumEffectState& state, bool is_or_node, 00034 vector<Move>& pv) const; 00035 private: 00036 int orNode(const HashKey& key, Move& best_move, int height=0) const; 00037 int andNode(const HashKey& key, Move& best_move, int height=0) const; 00038 }; 00039 } // namespace checkmate 00040 } 00041 00042 00043 #endif /* OSL_PROOFTREEDEPTHDFPN_H */ 00044 // ;;; Local Variables: 00045 // ;;; mode:c++ 00046 // ;;; c-basic-offset:2 00047 // ;;; End: