forked from rggibson/open-pure-cfr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parameters.hpp
61 lines (50 loc) · 1.32 KB
/
parameters.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef __PURE_CFR_PARAMETERS_HPP__
#define __PURE_CFR_PARAMETERS_HPP__
/* parameters.hpp
* Richard Gibson, Jun 28, 2013
* Email: richard.g.gibson@gmail.com
*
* The Parameters class parses command line arguments and stores the parameter
* options selected.
*
* Copyright (C) 2013 by Richard Gibson
*/
/* C / C++ / STL includes */
#include <stdio.h>
#include <inttypes.h>
/* C project-acpc-server includes */
extern "C" {
#include "acpc_server_code/game.h"
}
/* Pure CFR includes */
#include "constants.hpp"
const int NUM_RNG_SEEDS = 4;
typedef struct {
int seconds_start;
int seconds_mult;
int seconds_add;
} output_timer_t;
class Parameters {
public:
Parameters();
virtual ~Parameters();
virtual void print_usage( const char *prog_name ) const;
virtual int parse( const int argc, const char *argv[] );
virtual void print_params( FILE *file ) const;
virtual int read_params( FILE *file );
/* Required parameters */
char game_file[ PATH_LENGTH ];
char output_prefix[ PATH_LENGTH ];
/* Optional parameters */
uint32_t rng_seeds[ NUM_RNG_SEEDS ];
card_abs_type_t card_abs_type;
action_abs_type_t action_abs_type;
bool load_dump;
char load_dump_prefix[ PATH_LENGTH ];
int num_threads;
int status_freq_seconds;
output_timer_t dump_timer;
int max_walltime_seconds;
bool do_average;
};
#endif