#include "osl/rating/featureSet.h"
#include "osl/rating/ratingEnv.h"
#include "osl/rating/bradleyTerry.h"
#include "osl/eval/progressEval.h"
#include "osl/effect_util/effectUtil.h"
#include "osl/record/csaRecord.h"
#include "osl/record/csaIOError.h"
#include "osl/record/kisen.h"
#include "osl/misc/perfmon.h"
#include "osl/stat/histogram.h"
#include "osl/stat/variance.h"
#include "osl/stl/vector.h"
#include <boost/format.hpp>
#include <string>
#include <iostream>
#include <iomanip>
#include <cmath>
Go to the source code of this file.
Classes | |
struct | KeepMin |
struct | KeepMax |
struct | Histogram8 |
struct | osl::TopProb |
カテゴリ内でトップの手が指された確率 More... | |
struct | osl::RatingDiffRange |
rating とその局面のratingの最大値との差に基づく 2次元の実現確率 More... | |
struct | osl::RatingDiff |
Namespaces | |
osl | |
attackDefense.h | |
Constant Groups | |
osl | |
attackDefense.h | |
Enumerations | |
enum | osl::Property { osl::All, osl::TakeBack, osl::TakeBack2, osl::NoTakeBack, osl::SeePlus, osl::SeePlus2, osl::SeePlusX, osl::NoSeePlus } |
Functions | |
void | usage (const char *prog) |
void | osl::showLogProb (const stat::Histogram &numerator, const stat::Histogram &denominator) |
void | osl::showLogProb (const stat::Histogram &numerator, const stat::Histogram &denom1, const stat::Histogram &denom2) |
void | osl::showLogProb (const Histogram8 &numerator, const Histogram8 &denom1, const Histogram8 &denom2) |
size_t | osl::find (Property property, const NumEffectState &state, const RatingEnv &e, const RatedMoveVector &moves, Move selected) |
TopProb | takeback_topprob (TakeBack) |
TopProb | takeback2_topprob (TakeBack2) |
void | test_file (const FeatureSet &, const char *filename) |
void | test_record (const FeatureSet &f, const SimpleState &initial, const osl::stl::vector< osl::Move > &moves) |
int | main (int argc, char **argv) |
void | test_position (const FeatureSet &f, Move next_move, Move last_move, const RatingEnv &env, const NumEffectState &state, const eval::ProgressEval &eval) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 425 of file ratingstat.cc.
References all_moves_histogram, all_score_histogram, osl::BLACK, first_skip, osl::stat::Average::getAverage(), king_escape_histogram, kingescape_order, kingescape_order_all, kingescape_order_selected, kisen_filename, kisen_start, min_rating, moves_histogram, no_takeback_topprob, num_kisen, rall_score_histogram, rscore_histogram, rselected_score_histogram, score_histogram, seeplus2_topprob, seeplus_histogram, seeplus_order, seeplus_order_all, seeplus_order_selected, seeplus_topprob, seeplusx_topprob, selected_histogram, selected_king_escape, selected_score_histogram, selected_seeplus, selected_takeback, osl::eval::ProgressEvalGeneral< progress_eval_opening_t >::setUp(), osl::TopProb::show(), osl::RatingDiff::show(), osl::showLogProb(), takeback2_topprob(), takeback_histogram, takeback_order, takeback_order_all, takeback_order_selected, takeback_topprob(), test_file(), test_record(), top_prob, top_rating_progress, usage(), KeepMin::value(), KeepMax::value(), verbose, and osl::WHITE.
Referenced by main(), and test_position().
Referenced by main(), and test_position().
void test_file | ( | const FeatureSet & | f, |
const char * | filename | ||
) |
void test_position | ( | const FeatureSet & | f, |
Move | next_move, | ||
Move | last_move, | ||
const RatingEnv & | env, | ||
const NumEffectState & | state, | ||
const eval::ProgressEval & | eval | ||
) |
Definition at line 535 of file ratingstat.cc.
References osl::stat::Average::add(), osl::stat::Histogram::add(), KeepMin::add(), KeepMax::add(), Histogram8::add(), osl::TopProb::add(), osl::RatingDiff::add(), all_moves_histogram, all_score_histogram, count, osl::rating::RatedMoveVector::find(), osl::find(), osl::rating::FeatureSet::generateRating(), king_escape_histogram, kingescape_order, kingescape_order_all, kingescape_order_selected, moves, moves_histogram, no_takeback_topprob, osl::NoSeePlus, num_positions, order, osl::rating::RatingEnv::progress, osl::eval::ProgressEvalGeneral< OpeningEval >::progress16(), osl::PTYPE_EMPTY, rall_score_histogram, osl::rating::RatedMove::rating(), rscore_histogram, rselected_score_histogram, score_histogram, seeplus2_topprob, seeplus_histogram, seeplus_order, seeplus_order_all, seeplus_order_selected, seeplus_topprob, seeplusx_topprob, selected_histogram, selected_king_escape, selected_score_histogram, selected_seeplus, selected_takeback, takeback2_topprob(), takeback_histogram, takeback_order, takeback_order_all, takeback_order_selected, takeback_topprob(), osl::Move::to(), top_prob, and top_rating_progress.
void test_record | ( | const FeatureSet & | f, |
const SimpleState & | initial, | ||
const osl::stl::vector< osl::Move > & | moves | ||
) |
Definition at line 676 of file ratingstat.cc.
References osl::alt(), first_skip, osl::rating::RatingEnv::make(), osl::Move::PASS(), test_position(), osl::rating::RatingEnv::update(), and osl::eval::ProgressEvalGeneral< OpeningEval >::update().
Referenced by main().
void usage | ( | const char * | prog) |
Definition at line 22 of file ratingstat.cc.
Histogram8 all_moves_histogram(width, length) |
Referenced by main(), and test_position().
Histogram8 all_score_histogram(sc_width, sc_length+4, sc_start) |
Referenced by main(), and test_position().
size_t first_skip = 3 |
Definition at line 30 of file ratingstat.cc.
stat::Histogram king_escape_histogram(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Histogram kingescape_order(1, 10) |
Referenced by main(), and test_position().
stat::Histogram kingescape_order_all(1, 10) |
Referenced by main(), and test_position().
stat::Histogram kingescape_order_selected(1, 10) |
Referenced by main(), and test_position().
const char* kisen_filename =0 |
Definition at line 32 of file ratingstat.cc.
size_t kisen_start = 200000 |
Definition at line 34 of file ratingstat.cc.
Referenced by osl::rating::BradleyTerry::accumulate(), and main().
const int length = 20 |
Definition at line 81 of file ratingstat.cc.
Referenced by osl::IntArrayReader::hasNext(), osl::showLogProb(), trim_last(), and osl::record::KisenIpxWriter::writeString().
KeepMax max_nocapture |
Definition at line 96 of file ratingstat.cc.
KeepMax max_notakeback |
Definition at line 96 of file ratingstat.cc.
size_t min_rating = 1500 |
Definition at line 35 of file ratingstat.cc.
Referenced by osl::rating::BradleyTerry::accumulate(), and main().
KeepMin min_selected |
Definition at line 95 of file ratingstat.cc.
KeepMin min_top |
Definition at line 95 of file ratingstat.cc.
stat::Average moves |
Definition at line 80 of file ratingstat.cc.
Histogram8 moves_histogram(width, length) |
Referenced by main(), and test_position().
TopProb no_takeback_topprob(NoTakeBack) |
Referenced by main(), and test_position().
size_t num_kisen = 4000 |
Definition at line 33 of file ratingstat.cc.
size_t num_positions = 0 |
Definition at line 534 of file ratingstat.cc.
stat::Average order |
Definition at line 80 of file ratingstat.cc.
stat::Average probs |
Definition at line 80 of file ratingstat.cc.
Histogram8 rall_score_histogram(sc_width, sc_length) |
Referenced by main(), and test_position().
RatingDiff rating_diff |
Definition at line 415 of file ratingstat.cc.
Histogram8 rscore_histogram(sc_width, sc_length) |
Referenced by main(), and test_position().
Histogram8 rselected_score_histogram(sc_width, sc_length) |
Referenced by main(), and test_position().
const int sc_length = 16 |
Definition at line 84 of file ratingstat.cc.
const int sc_length_2d = sc_length+2 |
Definition at line 97 of file ratingstat.cc.
Referenced by osl::RatingDiffRange::index(), and osl::RatingDiffRange::show().
const int sc_start = -400 |
Definition at line 84 of file ratingstat.cc.
const int sc_start_2d = -100 |
Definition at line 98 of file ratingstat.cc.
Referenced by osl::RatingDiffRange::index().
const int sc_width = 100 |
Definition at line 84 of file ratingstat.cc.
Histogram8 score_histogram(sc_width, sc_length+4, sc_start) |
Referenced by main(), and test_position().
TopProb seeplus2_topprob(SeePlus2) |
Referenced by main(), and test_position().
stat::Histogram seeplus_histogram(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Histogram seeplus_order(1, 10) |
Referenced by main(), and test_position().
stat::Histogram seeplus_order_all(1, 10) |
Referenced by main(), and test_position().
stat::Histogram seeplus_order_selected(1, 10) |
Referenced by main(), and test_position().
TopProb seeplus_topprob(SeePlus) |
Referenced by main(), and test_position().
TopProb seeplusx_topprob(SeePlusX) |
Referenced by main(), and test_position().
Histogram8 selected_histogram(width, length) |
Referenced by main(), and test_position().
stat::Histogram selected_king_escape(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Average selected_score |
Definition at line 80 of file ratingstat.cc.
Histogram8 selected_score_histogram(sc_width, sc_length+4, sc_start) |
Referenced by main(), and test_position().
stat::Histogram selected_seeplus(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Histogram selected_takeback(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Histogram takeback_histogram(sc_width, sc_length, sc_start) |
Referenced by main(), and test_position().
stat::Histogram takeback_order(1, 10) |
Referenced by main(), and test_position().
stat::Histogram takeback_order_all(1, 10) |
Referenced by main(), and test_position().
stat::Histogram takeback_order_selected(1, 10) |
Referenced by main(), and test_position().
TopProb top_prob(All) |
Referenced by main(), and test_position().
CArray<stat::Variance, 8> top_rating_progress |
Definition at line 418 of file ratingstat.cc.
Referenced by main(), and test_position().
stat::Average top_score |
Definition at line 80 of file ratingstat.cc.
int verbose = 0 |
Definition at line 31 of file ratingstat.cc.
const int width = 4 |
Definition at line 81 of file ratingstat.cc.
Referenced by Searcher::count(), osl::game_playing::SearchPlayer::enableMultiPV(), osl::search::AlphaBeta2< EvalT >::enableMultiPV(), osl::search::AlphaBeta2Tree< EvalT >::examineMovesRoot(), Searcher::report(), osl::search::AlphaBeta2Tree< EvalT >::rootAlpha(), osl::showLogProb(), and osl::search::AlphaBeta2Tree< EvalT >::stableThreshold().