#include "osl/checkmate/dfpn.h"
#include "osl/checkmate/dfpnParallel.h"
#include "osl/record/csaString.h"
#include "osl/record/csaRecord.h"
#include "osl/record/csaIOError.h"
#include "osl/state/numEffectState.h"
#include "osl/misc/perfmon.h"
#include "osl/misc/milliSeconds.h"
#include "osl/move_generator/legalMoves.h"
#include "osl/checkmate/dfpnRecord.h"
#include "osl/hash/hashRandomPair.h"
#include "osl/oslConfig.h"
#include <boost/scoped_ptr.hpp>
#include <boost/foreach.hpp>
#include <string>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <unistd.h>
#include <bitset>
Go to the source code of this file.
Functions | |
template<class DfpnSearch > | |
void | search (DfpnSearch &, const char *filename) |
void | usage (const char *program_name) |
int | main (int argc, char **argv) |
template<class DfpnSearch > | |
void | analyzeCheckmate (DfpnSearch &searcher, const NumEffectState &state, Move checkmate_move) |
template<class DfpnSearch > | |
void | testWinOrLose (const char *filename, DfpnSearch &searcher, const SimpleState &sstate, int limit, ProofDisproof &result, Move &best_move, const vector< Move > &moves) |
Variables | |
unsigned int | dovetailing_seed = 0 |
unsigned int | dovetailing_prob = 0 |
bool | verbose =false |
unsigned long long | total_cycles =0 |
bool | show_escape_filename = false |
bool | force_attack = false |
int | num_checkmate =0 |
int | num_nocheckmate =0 |
int | num_escape =0 |
int | num_unkown =0 |
double | total_nodes =0 |
double | total_tables =0 |
int | limit = 100000 |
bool | blocking_verify = true |
size_t | table_growth_limit = 8000000 |
bool | debug = false |
int | forward_moves = 0 |
double | real_seconds = 0.0 |
void analyzeCheckmate | ( | DfpnSearch & | searcher, |
const NumEffectState & | state, | ||
Move | checkmate_move | ||
) |
Definition at line 135 of file dfpnstat.cc.
References osl::checkmate::DfpnRecordBase::best_move, osl::BLACK, osl::move_generator::capture::generate(), moves, osl::checkmate::DfpnTable::probe(), osl::checkmate::DfpnRecordBase::proof_disproof, osl::checkmate::DfpnRecordBase::solved, and osl::WHITE.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 51 of file dfpnstat.cc.
References blocking_verify, debug, dovetailing_prob, dovetailing_seed, force_attack, forward_moves, limit, num_checkmate, num_escape, num_nocheckmate, num_unkown, search(), osl::OslConfig::setDfpnMaxDepth(), table_growth_limit, total_cycles, total_nodes, total_tables, usage(), and verbose.
void search | ( | DfpnSearch & | searcher, |
const char * | filename | ||
) |
Definition at line 249 of file dfpnstat.cc.
References osl::alt(), force_attack, forward_moves, osl::Move::isNormal(), limit, osl::eval::min(), moves, real_seconds, result, osl::checkmate::DfpnTable::setGrowthLimit(), osl::record::csa::show(), table_growth_limit, testWinOrLose(), total_cycles, total_nodes, total_tables, and verbose.
void testWinOrLose | ( | const char * | filename, |
DfpnSearch & | searcher, | ||
const SimpleState & | sstate, | ||
int | limit, | ||
ProofDisproof & | result, | ||
Move & | best_move, | ||
const vector< Move > & | moves | ||
) |
Definition at line 171 of file dfpnstat.cc.
References osl::alt(), debug, osl::misc::MilliSeconds::elapsedSeconds(), force_attack, num_checkmate, num_escape, num_nocheckmate, num_unkown, osl::Move::PASS(), real_seconds, osl::record::csa::show(), osl::misc::PerfMon::stop(), timer, total_cycles, and verbose.
Referenced by search().
void usage | ( | const char * | program_name) |
Definition at line 47 of file dfpnstat.cc.
Referenced by main().
bool blocking_verify = true |
Definition at line 40 of file dfpnstat.cc.
Referenced by osl::checkmate::Dfpn::defense(), and main().
bool debug = false |
Definition at line 42 of file dfpnstat.cc.
Referenced by main(), and testWinOrLose().
unsigned int dovetailing_prob = 0 |
Definition at line 31 of file dfpnstat.cc.
Referenced by main().
unsigned int dovetailing_seed = 0 |
Definition at line 30 of file dfpnstat.cc.
Referenced by main().
bool force_attack = false |
Definition at line 36 of file dfpnstat.cc.
Referenced by main(), search(), and testWinOrLose().
int forward_moves = 0 |
Definition at line 43 of file dfpnstat.cc.
int limit = 100000 |
Definition at line 39 of file dfpnstat.cc.
Referenced by osl::search::SearchState2::addLimit(), addWithSaturation(), osl::search::AlphaBeta2Tree< EvalT >::alphaBetaSearchAfterMove(), osl::search::AlphaBeta2< EvalT >::alphaBetaSearchRoot(), osl::search::AlphaBeta3::computeBestMoveIteratively(), osl::search::BreakThreatmate::generate(), osl::search::MoveGenerator::generateAll(), osl::move_generator::piece_on_board::generateLance(), osl::move_generator::piece_on_board::generateLong(), osl::game_playing::UsiResponse::genmoveProbability(), osl::checkmate::Dfpn::hasCheckmateMove(), osl::checkmate::Dfpn::hasEscapeMove(), osl::game_playing::UsiResponse::hasImmediateResponse(), osl::search::AlphaBetaWindowUtil< P, EvalBase >::isOutOfWindow(), osl::search::NullWindowUtil< P, EvalBase, best_move_extension >::isOutOfWindow(), main(), osl::search::SearchBase< EvalT, SimpleHashTable, CountRecorder, RealizationProbability >::recordCheckmateResult(), search(), osl::search::AlphaBeta3::searchRoot(), osl::game_playing::SpeculativeSearchPlayer::selectBestMove(), osl::search::SimpleHashRecord::setAbsoluteValue(), osl::search::SimpleHashRecord::setLowerBound(), osl::OslConfig::setMemoryUseLimit(), osl::OslConfig::setMemoryUsePercent(), osl::search::SearchState2::setRoot(), osl::search::SimpleHashRecord::setUpperBound(), osl::search::AlphaBeta2SharedRoot::showLastPv(), osl::search::SearchRecorder::startSearch(), and osl::search::SearchState2::subLimit().
int num_checkmate =0 |
Definition at line 37 of file dfpnstat.cc.
Referenced by main(), search(), and testWinOrLose().
int num_escape =0 |
Definition at line 37 of file dfpnstat.cc.
Referenced by main(), search(), and testWinOrLose().
int num_nocheckmate =0 |
Definition at line 37 of file dfpnstat.cc.
Referenced by main(), and testWinOrLose().
int num_unkown =0 |
Definition at line 37 of file dfpnstat.cc.
Referenced by main(), search(), and testWinOrLose().
double real_seconds = 0.0 |
Definition at line 132 of file dfpnstat.cc.
Referenced by search(), and testWinOrLose().
bool show_escape_filename = false |
Definition at line 35 of file dfpnstat.cc.
size_t table_growth_limit = 8000000 |
Definition at line 41 of file dfpnstat.cc.
unsigned long long total_cycles =0 |
Definition at line 34 of file dfpnstat.cc.
Referenced by main(), qsearch(), run(), search(), and testWinOrLose().
double total_nodes =0 |
Definition at line 38 of file dfpnstat.cc.
double total_tables =0 |
Definition at line 38 of file dfpnstat.cc.
bool verbose =false |
Definition at line 33 of file dfpnstat.cc.
Referenced by adjust(), osl::game_playing::UsiResponse::generateGoodMoves(), osl::OslConfig::healthCheck(), osl::ntesuki::NtesukiTable::isVerbose(), osl::eval::ppair::PiecePairRawTable::loadFromBinaryFile(), main(), osl::OslConfig::makeHome(), osl::game_playing::WeightTracer::popMove(), process(), qsearch(), search(), osl::ntesuki::NtesukiSearcher::search(), Analyzer::search(), osl::game_playing::WinCountTracer::selectMove(), osl::game_playing::DeterminateWeightTracer::selectMove(), osl::game_playing::WeightTracer::selectMoveAtRandom(), osl::eval::ProgressEvalGeneral< OpeningEval >::setUpInternal(), osl::search::SimpleHashTable::setVerbose(), show(), osl::record::KanjiMove::strToMove(), testWinOrLose(), osl::OslConfig::trySetDir(), osl::game_playing::RecordTracer::update(), osl::game_playing::WinCountTracer::update(), osl::game_playing::WeightTracer::update(), osl::search::SimpleHashTable::verboseLevel(), osl::ntesuki::NtesukiSearcher::~NtesukiSearcher(), osl::ntesuki::NtesukiSimulationSearcher::~NtesukiSimulationSearcher(), osl::ntesuki::NtesukiTable::~NtesukiTable(), and osl::search::SimpleHashTable::~SimpleHashTable().