Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Classes | Functions
game_statistics.h File Reference
#include "ccfwd.h"
#include "game_statistic_type.h"
#include "chess_color.h"
#include "side.h"
#include <map>
Include dependency graph for game_statistics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  game_statistics
 The statistics of a point in time of the game. More...
 

Functions

game_statistics create_test_game_statistics ()
 Create a game statistics to be used in testing.
 
std::vector< double > flatten_to_row (const game_statistics &s)
 Put the values in a row, to be saved to a file.
 
std::vector< std::string > get_column_headers () noexcept
 Put the values in a row, to be saved to a file.
 
double get_f_active (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of pieces that is doing an action.
 
double get_f_protected (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of pieces that is protected by another.
 
double get_f_value (const std::vector< piece > &pieces, const chess_color c)
 Get the fraction of the current pieces' value from the maximum.
 
void test_game_statistics ()
 

Function Documentation

◆ create_test_game_statistics()

game_statistics create_test_game_statistics ( )

Create a game statistics to be used in testing.

◆ flatten_to_row()

std::vector< double > flatten_to_row ( const game_statistics s)

Put the values in a row, to be saved to a file.

time, value_lhs, value_rhs, activity_lhs, activity_rhs, protectedness_lhs, protectedness_rhs

@seealso get_column_headers} gets the column headers

◆ get_column_headers()

std::vector< std::string > get_column_headers ( )
noexcept

Put the values in a row, to be saved to a file.

time, value_lhs, value_rhs, activity_lhs, activity_rhs, protectedness_lhs, protectedness_rhs

@seealso flatten_to_row} gets the values in a row

◆ get_f_active()

double get_f_active ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of pieces that is doing an action.

◆ get_f_protected()

double get_f_protected ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of pieces that is protected by another.

◆ get_f_value()

double get_f_value ( const std::vector< piece > &  pieces,
const chess_color  c 
)

Get the fraction of the current pieces' value from the maximum.

◆ test_game_statistics()

void test_game_statistics ( )