10 #include <boost/scoped_array.hpp> 33 boost::scoped_array<Table>
table;
41 template <Player Attack>
45 template <Player Attack>
48 template <Player Attack>
81 static const int DIVSIZE=256;
88 static const int DIVSIZE=1;
95 template <Player Attack>
97 template <Player Attack>
109 Dfpn& operator=(
const Dfpn&) =
delete;
119 std::unique_ptr<Tree>
tree;
150 size_t limit,
Move last_move);
155 const NumEffectState& state,
const std::vector<Move>& moves)
const;
159 template <Player P>
void attack();
160 template <Player P>
void defense();
166 template <Player P,
bool UseTable>
void proofOracleAttack(
const ProofOracle& oracle,
int proof_limit);
167 template <Player P,
bool UseTable>
void proofOracleDefense(
const ProofOracle& oracle,
int proof_limit);
171 template <Player P>
void blockingSimulation(
int seed,
const ProofOracle&);
172 template <Player P>
void grandParentSimulation(
int cur_move,
const Node& gparent,
int gp_move);
174 template <
bool UseTable>
190 int distance(
const HashKey&)
const;
193 static void generateCheck(
const NumEffectState&, DfpnMoveVector&,
bool&);
196 static void generateEscape(
const NumEffectState&,
bool need_full_width,
197 Square grand_parent_delay_last_to, DfpnMoveVector&);
199 bool grandParentSimulationSuitable()
const;
200 template <Player Turn>
203 void findDagSource();
204 void findDagSource(
const HashKey& terminal_key,
221 assert(P == move.
player());
227 assert(P == move.
player());
235 if (white_stand.
get(move.
ptype()) == 0)
const DfpnRecord findProofOracle(const HashKey &key, PieceStand white, Move last_move=Move()) const
const PtypeO PTYPEO_EDGE __attribute__((unused))
const ProofOracle newOracle(Player P, Move move) const
void setParallel(int id, DfpnShared *s)
bool traceable(Player P, Move move) const
size_t growthLimit() const
List * find(const HashKey &key, int subindex)
unsigned int get(Ptype type) const
const PieceStand nextStand(Player pl, Move move) const
const PieceStand blackStand() const
size_t estimateNodeCount(const HashKey &key, bool dominance_max=false) const
boost::scoped_array< Table > table
DfpnShared * parallel_shared
static const Move INVALID()
static const osl::CArray2d< int, 8, 16 > threshold
void showProofOracles(const HashKey &key, PieceStand white, Move last_move=Move()) const
size_t smallTreeGC(size_t threshold=10)
void setBlockingVerify(bool enable=true)
void store(const HashKey &key, DfpnRecord &value, int leaving_thread_id=-1)
const HashKey newHashWithMove(Move move) const
void leaveWorking(const HashKey &key, int thread_id)
証明数(proof number)と反証数(disproof number).
CheckMoveVector DfpnMoveVector
const DfpnRecord probe(const HashKey &key, PieceStand white) const
static int keyToIndex(const HashKey &key)
uint64_t signature() const
const DfpnTable & currentTable() const
std::unique_ptr< DfpnPathTable > path_table
void addDag(const HashKey &key, DfpnRecord &value)
void setWorking(const HashKey &key, const DfpnRecord &value, int thread_id)
std::unique_ptr< Tree > tree
ProofOracle(const HashKey &k, PieceStand w)
void setGrowthLimit(size_t new_limit)
set the maximum size of table (otherwise infinity).