詰探索局面表 -- 並列でも共有する部分 [詳細]
#include <dfpn.h>
構成 | |
struct | List |
struct | Table |
Public メソッド | |
DfpnTable (Player attack) | |
DfpnTable () | |
~DfpnTable () | |
template<Player Attack> | |
const DfpnRecord | probe (const HashKey &key, PieceStand white) const |
const DfpnRecord | probe (const HashKey &key, PieceStand white) const |
size_t | estimateNodeCount (const HashKey &key, bool dominance_max=false) const |
template<Player Attack> | |
const DfpnRecord | findProofOracle (const HashKey &key, PieceStand white, Move last_move=Move()) const |
const DfpnRecord | findProofOracle (const HashKey &key, PieceStand white, Move last_move=Move()) const |
template<Player Attack> | |
void | showProofOracles (const HashKey &key, PieceStand white, Move last_move=Move()) const |
size_t | size () const |
void | showStats () const |
void | setAttack (Player) |
void | setWorking (const HashKey &key, const DfpnRecord &value, int thread_id) |
void | leaveWorking (const HashKey &key, int thread_id) |
void | store (const HashKey &key, DfpnRecord &value, int leaving_thread_id=-1) |
void | addDag (const HashKey &key, DfpnRecord &value) |
void | clear () |
size_t | totalSize () |
Player | attack () const |
void | setMaxDepth (int) |
int | maxDepth () const |
void | testTable () |
size_t | smallTreeGC (size_t threshold=10) |
void | setGrowthLimit (size_t new_limit) |
set the maximum size of table (otherwise infinity). | |
size_t | growthLimit () const |
bool | runGC () |
Private メソッド | |
template<Player Attack> | |
List * | find (const HashKey &key, int subindex) |
template<Player Attack> | |
const List * | find (const HashKey &key, int subindex) const |
const List * | find (const HashKey &key, int subindex) const |
Static Private メソッド | |
static int | keyToIndex (const HashKey &key) |
Private 変数 | |
boost::scoped_array< Table > | table |
size_t | total_size |
int | dfpn_max_depth |
size_t | growth_limit |
size_t | gc_threshold |
Static Private 変数 | |
static const int | DIVSIZE = 1 |
詰探索局面表 -- 並列でも共有する部分
osl::checkmate::DfpnTable::DfpnTable | ( | Player | attack | ) |
参照先 setAttack().
void osl::checkmate::DfpnTable::addDag | ( | const HashKey & | key, | |
DfpnRecord & | value | |||
) |
osl::Player osl::checkmate::DfpnTable::attack | ( | ) | const |
void osl::checkmate::DfpnTable::clear | ( | ) |
参照先 DIVSIZE, SCOPED_LOCK, table, と total_size.
size_t osl::checkmate::DfpnTable::estimateNodeCount | ( | const HashKey & | key, | |
bool | dominance_max = false | |||
) | const |
const List* osl::checkmate::DfpnTable::find | ( | const HashKey & | key, | |
int | subindex | |||
) | const [private] |
osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find | ( | const HashKey & | key, | |
int | subindex | |||
) | [private] |
const osl::checkmate::DfpnTable::List * osl::checkmate::DfpnTable::find | ( | const HashKey & | key, | |
int | subindex | |||
) | const [private] |
const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::findProofOracle | ( | const HashKey & | key, | |
PieceStand | white, | |||
Move | last_move = Move() | |||
) | const |
const DfpnRecord osl::checkmate::DfpnTable::findProofOracle | ( | const HashKey & | key, | |
PieceStand | white, | |||
Move | last_move = Move() | |||
) | const |
size_t osl::checkmate::DfpnTable::growthLimit | ( | ) | const [inline] |
static int osl::checkmate::DfpnTable::keyToIndex | ( | const HashKey & | key | ) | [inline, static, private] |
void osl::checkmate::DfpnTable::leaveWorking | ( | const HashKey & | key, | |
int | thread_id | |||
) |
int osl::checkmate::DfpnTable::maxDepth | ( | ) | const |
参照先 dfpn_max_depth.
const DfpnRecord osl::checkmate::DfpnTable::probe | ( | const HashKey & | key, | |
PieceStand | white | |||
) | const |
const osl::checkmate::DfpnRecord osl::checkmate::DfpnTable::probe | ( | const HashKey & | key, | |
PieceStand | white | |||
) | const |
参照先 keyToIndex(), osl::checkmate::DfpnTable::List::probe(), と SCOPED_LOCK.
参照元 osl::checkmate::Dfpn::analyze(), osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::Dfpn::findDagSource(), osl::checkmate::Dfpn::proofOracleAttack(), osl::checkmate::Dfpn::proofOracleDefense(), と osl::checkmate::Dfpn::tryProofMain().
bool osl::checkmate::DfpnTable::runGC | ( | ) |
void osl::checkmate::DfpnTable::setAttack | ( | Player | a | ) |
void osl::checkmate::DfpnTable::setGrowthLimit | ( | size_t | new_limit | ) |
set the maximum size of table (otherwise infinity).
this is one of preconditions to enable GC inside dfpn.
参照先 DIVSIZE, growth_limit, と table.
void osl::checkmate::DfpnTable::setMaxDepth | ( | int | new_depth | ) |
void osl::checkmate::DfpnTable::setWorking | ( | const HashKey & | key, | |
const DfpnRecord & | value, | |||
int | thread_id | |||
) |
void osl::checkmate::DfpnTable::showProofOracles | ( | const HashKey & | key, | |
PieceStand | white, | |||
Move | last_move = Move() | |||
) | const |
void osl::checkmate::DfpnTable::showStats | ( | ) | const |
size_t osl::checkmate::DfpnTable::size | ( | ) | const |
size_t osl::checkmate::DfpnTable::smallTreeGC | ( | size_t | threshold = 10 |
) |
void osl::checkmate::DfpnTable::store | ( | const HashKey & | key, | |
DfpnRecord & | value, | |||
int | leaving_thread_id = -1 | |||
) |
参照先 osl::checkmate::ProofDisproof::isLoopDetection(), keyToIndex(), osl::checkmate::DfpnRecordBase::proof_disproof, SCOPED_LOCK, osl::checkmate::DfpnRecord::stands, osl::checkmate::DfpnTable::List::store(), table, と total_size.
参照元 osl::checkmate::Dfpn::attack(), osl::checkmate::Dfpn::defense(), osl::checkmate::Dfpn::proofOracleAttack(), osl::checkmate::Dfpn::proofOracleDefense(), osl::checkmate::Dfpn::setIllegal(), と osl::checkmate::Dfpn::tryProofMain().
void osl::checkmate::DfpnTable::testTable | ( | ) |
参照先 DIVSIZE, SCOPED_LOCK, と table.
size_t osl::checkmate::DfpnTable::totalSize | ( | ) | [inline] |
参照先 total_size.
int osl::checkmate::DfpnTable::dfpn_max_depth [private] |
参照元 maxDepth(), と setMaxDepth().
const int osl::checkmate::DfpnTable::DIVSIZE = 1 [static, private] |
size_t osl::checkmate::DfpnTable::gc_threshold [private] |
size_t osl::checkmate::DfpnTable::growth_limit [private] |
参照元 growthLimit(), runGC(), と setGrowthLimit().
boost::scoped_array<Table> osl::checkmate::DfpnTable::table [private] |
size_t osl::checkmate::DfpnTable::total_size [private] |
参照元 clear(), runGC(), setWorking(), showStats(), size(), smallTreeGC(), store(), と totalSize().