All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Constant Groups | Enumerations | Functions | Variables
ratingstat.cc File Reference
#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>
Include dependency graph for ratingstat.cc:

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)
 

Variables

size_t first_skip = 3
 
int verbose = 0
 
const char * kisen_filename =0
 
size_t num_kisen = 4000
 
size_t kisen_start = 200000
 
size_t min_rating = 1500
 
stat::Average moves
 
stat::Average probs
 
stat::Average order
 
stat::Average top_score
 
stat::Average selected_score
 
const int width = 4
 
const int length = 20
 
Histogram8 moves_histogram (width, length)
 
Histogram8 selected_histogram (width, length)
 
Histogram8 all_moves_histogram (width, length)
 
const int sc_width = 100
 
const int sc_length = 16
 
const int sc_start = -400
 
stat::Histogram takeback_histogram (sc_width, sc_length, sc_start)
 
stat::Histogram selected_takeback (sc_width, sc_length, sc_start)
 
stat::Histogram takeback_order (1, 10)
 
stat::Histogram takeback_order_all (1, 10)
 
stat::Histogram takeback_order_selected (1, 10)
 
stat::Histogram seeplus_histogram (sc_width, sc_length, sc_start)
 
stat::Histogram selected_seeplus (sc_width, sc_length, sc_start)
 
stat::Histogram seeplus_order (1, 10)
 
stat::Histogram seeplus_order_all (1, 10)
 
stat::Histogram seeplus_order_selected (1, 10)
 
stat::Histogram king_escape_histogram (sc_width, sc_length, sc_start)
 
stat::Histogram selected_king_escape (sc_width, sc_length, sc_start)
 
stat::Histogram kingescape_order (1, 10)
 
stat::Histogram kingescape_order_all (1, 10)
 
stat::Histogram kingescape_order_selected (1, 10)
 
Histogram8 score_histogram (sc_width, sc_length+4, sc_start)
 
Histogram8 selected_score_histogram (sc_width, sc_length+4, sc_start)
 
Histogram8 all_score_histogram (sc_width, sc_length+4, sc_start)
 
Histogram8 rscore_histogram (sc_width, sc_length)
 
Histogram8 rselected_score_histogram (sc_width, sc_length)
 
Histogram8 rall_score_histogram (sc_width, sc_length)
 
KeepMin min_selected
 
KeepMin min_top
 
KeepMax max_notakeback
 
KeepMax max_nocapture
 
const int sc_length_2d = sc_length+2
 
const int sc_start_2d = -100
 
RatingDiff rating_diff
 
TopProb top_prob (All)
 
TopProb no_takeback_topprob (NoTakeBack)
 
TopProb seeplus_topprob (SeePlus)
 
TopProb seeplus2_topprob (SeePlus2)
 
TopProb seeplusx_topprob (SeePlusX)
 
CArray< stat::Variance, 8 > top_rating_progress
 
size_t num_positions = 0
 

Function Documentation

int main ( int  argc,
char **  argv 
)
TopProb takeback2_topprob ( TakeBack2  )

Referenced by main(), and test_position().

TopProb takeback_topprob ( TakeBack  )

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 
)
void test_record ( const FeatureSet f,
const SimpleState &  initial,
const osl::stl::vector< osl::Move > &  moves 
)
void usage ( const char *  prog)

Definition at line 22 of file ratingstat.cc.

Variable Documentation

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
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.

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.

Definition at line 80 of file ratingstat.cc.

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().

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().

Referenced by main(), and test_position().

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