10#include <boost/scoped_array.hpp>
33 boost::scoped_array<Table>
table;
41 template <Player Attack>
45 template <Player Attack>
48 template <Player Attack>
95 template <Player Attack>
97 template <Player Attack>
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();
161 template <Player P>
struct CallAttack;
162 template <Player P>
struct CallDefense;
174 template <
bool UseTable>
200 template <Player Turn>
221 assert(P == move.
player());
227 assert(P == move.
player());
static const Move INVALID()
const PieceStand nextStand(Player pl, Move move) const
unsigned int get(Ptype type) const
size_t growthLimit() const
void store(const HashKey &key, DfpnRecord &value, int leaving_thread_id=-1)
static int keyToIndex(const HashKey &key)
List * find(const HashKey &key, int subindex)
const DfpnRecord findProofOracle(const HashKey &key, PieceStand white, Move last_move=Move()) const
const List * find(const HashKey &key, int subindex) const
void showProofOracles(const HashKey &key, PieceStand white, Move last_move=Move()) const
size_t estimateNodeCount(const HashKey &key, bool dominance_max=false) const
void setWorking(const HashKey &key, const DfpnRecord &value, int thread_id)
void addDag(const HashKey &key, DfpnRecord &value)
void setGrowthLimit(size_t new_limit)
set the maximum size of table (otherwise infinity).
void leaveWorking(const HashKey &key, int thread_id)
const DfpnRecord probe(const HashKey &key, PieceStand white) const
boost::scoped_array< Table > table
size_t smallTreeGC(size_t threshold=10)
static void generateCheck(const NumEffectState &, DfpnMoveVector &, bool &)
Pは攻撃側
int distance(const HashKey &) const
static void generateEscape(const NumEffectState &, bool need_full_width, Square grand_parent_delay_last_to, DfpnMoveVector &)
Pは攻撃側
CheckMoveVector DfpnMoveVector
Dfpn & operator=(const Dfpn &)=delete
void proofOracleAttack(const ProofOracle &oracle, int proof_limit)
std::unique_ptr< Tree > tree
const ProofDisproof hasEscapeMove(const NumEffectState &state, const HashKey &key, const PathEncoding &path, size_t limit, Move last_move)
static void sort(const NumEffectState &, DfpnMoveVector &)
void analyze(const PathEncoding &path, const NumEffectState &state, const std::vector< Move > &moves) const
DfpnShared * parallel_shared
void grandParentSimulation(int cur_move, const Node &gparent, int gp_move)
std::unique_ptr< DfpnPathTable > path_table
const ProofDisproof tryProofLight(const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move=Move::INVALID())
bool grandParentSimulationSuitable() const
test suitability of simulation of grand-parent relation
void setIllegal(const HashKey &key, PieceStand white)
void blockingSimulation(int seed, const ProofOracle &)
合駒が詰と判った直後に、同じような合駒を詰める
const DfpnTable & currentTable() const
void proofOracleDefense(const ProofOracle &oracle, int proof_limit)
Dfpn(const Dfpn &)=delete
void setParallel(int id, DfpnShared *s)
const ProofDisproof tryProof(const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move=Move::INVALID())
const ProofDisproof hasCheckmateMove(const NumEffectState &state, const HashKey &key, const PathEncoding &path, size_t limit, Move &best_move, Move last_move=Move::INVALID(), std::vector< Move > *pv=0)
const ProofDisproof tryProofMain(const NumEffectState &state, const HashKey &key, const PathEncoding &path, const ProofOracle &, size_t oracle_id, Move &best_move, Move last_move)
void setTable(DfpnTable *new_table)
void setBlockingVerify(bool enable=true)
証明数(proof number)と反証数(disproof number).
uint64_t signature() const
const PieceStand blackStand() const
const HashKey newHashWithMove(Move move) const
static const osl::CArray2d< int, 8, 16 > threshold
const PtypeO PTYPEO_EDGE __attribute__((unused))
@ CheckOrEscapeMaxUniqMoves
ProofOracle(const HashKey &k, PieceStand w)
const ProofOracle newOracle(Player P, Move move) const
bool traceable(Player P, Move move) const