All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Typedefs | Functions | Variables
compare-book.cc File Reference
#include "osl/record/opening/openingBook.h"
#include "osl/record/compactBoard.h"
#include "osl/record/csa.h"
#include "osl/record/kanjiPrint.h"
#include "osl/search/quiescenceSearch2.h"
#include "osl/search/quiescenceSearch2.tcc"
#include "osl/search/simpleHashTable.h"
#include "osl/eval/pieceEval.h"
#include "osl/stl/vector.h"
#include "osl/stl/hash_map.h"
#include "osl/misc/math.h"
#include "osl/search/fixedEval.h"
#include <boost/shared_ptr.hpp>
#include <boost/program_options.hpp>
#include <boost/progress.hpp>
#include <boost/format.hpp>
#include <iostream>
#include <deque>
#include "osl/move.h"
#include "osl/record/csaRecord.h"
#include "osl/record/record.h"
#include "osl/state/numEffectState.h"
Include dependency graph for compare-book.cc:

Go to the source code of this file.

Typedefs

typedef std::vector
< osl::record::opening::WMove
WMoveContainer
 
typedef osl::hash_map
< osl::HashKey, int > 
table_t
 

Functions

void printUsage (std::ostream &out, char **argv, const boost::program_options::options_description &command_line_options)
 
void store (osl::record::opening::WeightedBook &book, table_t &table, osl::vector< int > &parents)
 
void show_moves (const char *name, osl::record::opening::WeightedBook &book, int node)
 
void show_history (const osl::MoveVector &history)
 
osl::MoveVector make_history (osl::record::opening::WeightedBook &book, const osl::vector< int > &parents, int node)
 
void dump (osl::record::opening::WeightedBook &book_a, const osl::vector< int > &parents_a, int node_a, osl::record::opening::WeightedBook &book_b, const osl::vector< int > &parents_b, int node_b)
 
void dump (const char *name, osl::record::opening::WeightedBook &book, const osl::vector< int > &parents, int node)
 
bool is_same_node (osl::record::opening::WeightedBook &book_a, int node_a, osl::record::opening::WeightedBook &book_b, int node_b)
 
void compare (osl::record::opening::WeightedBook &book_a, const table_t &table_a, const osl::vector< int > &parents_a, osl::record::opening::WeightedBook &book_b, const table_t &table_b, const osl::vector< int > &parents_b)
 
int main (int argc, char **argv)
 

Variables

osl::Player the_player = osl::BLACK
 
std::string dump_mode = "none"
 
int is_determinate = 0
 
int max_depth
 
int non_determinate_depth
 
double ratio
 
size_t state_count = 0
 

Typedef Documentation

typedef osl::hash_map<osl::HashKey,int> table_t

Definition at line 46 of file compare-book.cc.

Definition at line 27 of file compare-book.cc.

Function Documentation

void compare ( osl::record::opening::WeightedBook book_a,
const table_t table_a,
const osl::vector< int > &  parents_a,
osl::record::opening::WeightedBook book_b,
const table_t table_b,
const osl::vector< int > &  parents_b 
)

Definition at line 249 of file compare-book.cc.

References dump(), dump_mode, and is_same_node().

void dump ( osl::record::opening::WeightedBook book_a,
const osl::vector< int > &  parents_a,
int  node_a,
osl::record::opening::WeightedBook book_b,
const osl::vector< int > &  parents_b,
int  node_b 
)
void dump ( const char *  name,
osl::record::opening::WeightedBook book,
const osl::vector< int > &  parents,
int  node 
)
bool is_same_node ( osl::record::opening::WeightedBook book_a,
int  node_a,
osl::record::opening::WeightedBook book_b,
int  node_b 
)

Definition at line 226 of file compare-book.cc.

References osl::record::opening::WeightedBook::getMoves(), and osl::eval::min().

Referenced by compare().

int main ( int  argc,
char **  argv 
)
osl::MoveVector make_history ( osl::record::opening::WeightedBook book,
const osl::vector< int > &  parents,
int  node 
)
void printUsage ( std::ostream &  out,
char **  argv,
const boost::program_options::options_description &  command_line_options 
)

Definition at line 37 of file compare-book.cc.

Referenced by main().

void show_history ( const osl::MoveVector &  history)

Definition at line 164 of file compare-book.cc.

References osl::record::csa::show().

Referenced by dump().

void show_moves ( const char *  name,
osl::record::opening::WeightedBook book,
int  node 
)
void store ( osl::record::opening::WeightedBook book,
table_t table,
osl::vector< int > &  parents 
)

Definition at line 47 of file compare-book.cc.

References osl::BLACK, depth, osl::record::opening::WeightedBook::getBoard(), osl::record::opening::WeightedBook::getMoves(), osl::record::opening::WeightedBook::getStartState(), osl::record::opening::WeightedBook::getTotalState(), is_determinate, osl::eval::max(), max_depth, osl::eval::min(), moves, non_determinate_depth, ratio, the_player, weight, and osl::WHITE.

Referenced by osl::checkmate::FixedDepthSearcher::attack(), osl::checkmate::FixedDepthSearcher2::defense(), osl::checkmate::FixedDepthSearcher::defense(), osl::search::BreakThreatmate::findBlockLong(), osl::effect_util::EffectUtil::findEffect(), osl::move_generator::AttackToPinned< P >::generate(), osl::move_generator::Promote< P, NoCapture >::generate(), osl::move_generator::GenerateAddEffectWithEffect::generate(), osl::GenerateAllMoves::generate(), osl::move_generator::GenerateCapture::generate(), osl::move_generator::AddEffect8< P >::generate(), osl::move_generator::AddEffect< P, isAttackToKing >::generate(), osl::move_generator::GenerateAddEffect< isAttackToKing >::generate(), osl::move_generator::GenerateEscape< P >::generate(), osl::move_generator::GeneratePieceOnBoard::generate(), osl::GenerateEscapeKing::generate(), osl::move_generator::GenerateCapture::generate1(), osl::search::MoveScore::generateAll(), osl::checkmate::FixedDepthSearcher::generateBlockingWhenLiberty0(), osl::checkmate::FixedDepthSearcher2::generateBlockingWhenLiberty0(), osl::search::MoveScore::generateCapture(), osl::search::AlphaBeta3::generateCapture(), osl::search::AlphaBeta3::generateCaptureAll(), osl::move_generator::GenerateEscape< P >::generateCheap(), osl::move_generator::GenerateEscape< P >::generateCheapKingEscape(), osl::checkmate::Dfpn::generateCheck(), osl::search::MoveScore::generateCheckNoCapture(), osl::search::MoveScore::generateKingEscape(), osl::move_generator::GenerateEscape< P >::generateKingEscape(), osl::move_generator::SafeDropMajorPiece< P >::generateMoves(), osl::search::MoveScore::generateNoCapture(), osl::GenerateAllMoves::generateOnBoard(), osl::move_generator::Promote< P, NoCapture >::generatePtype(), osl::ntesuki::NtesukiMoveGenerator::generateWithRzone(), osl::ntesuki::getCheckMoves(), main(), osl::makeCapture(), nextMoves(), and osl::record::opening::BookInMemory::readRecursive().

Variable Documentation

std::string dump_mode = "none"

Definition at line 30 of file compare-book.cc.

Referenced by compare(), and main().

int is_determinate = 0

Definition at line 31 of file compare-book.cc.

Referenced by doMain(), main(), and store().

int max_depth
int non_determinate_depth

Definition at line 32 of file compare-book.cc.

Referenced by doMain(), main(), and store().

double ratio
size_t state_count = 0

Definition at line 35 of file compare-book.cc.

Referenced by doMain().

osl::Player the_player = osl::BLACK

Definition at line 29 of file compare-book.cc.

Referenced by doMain(), main(), and store().