options.h
Go to the documentation of this file.
1 
11 #ifndef EDAX_OPTIONS_H
12 #define EDAX_OPTIONS_H
13 
14 #include <stdio.h>
15 #include <stdbool.h>
16 
17 typedef enum {
21 } PlayType;
22 
24 typedef struct {
27  int inc_sort_depth[3];
29  int n_task;
30  bool cpu_affinity;
32  int verbosity;
33  int noise;
34  int width;
35  bool echo;
36  bool info;
37  bool debug_cassio;
40  int level;
41  long long time;
43  bool can_ponder;
44  int depth;
47  int mode;
49  double speed;
50  double nps;
52  int alpha;
53  int beta;
55  bool all_best;
57  char *eval_file;
59  char *book_file;
60  bool book_allowed;
63  char *ggs_host;
64  char *ggs_login;
65  char *ggs_password;
66  char *ggs_port;
67  bool ggs_open;
69  double probcut_d;
70 
71  bool pv_debug;
72  bool pv_check;
73  bool pv_guess;
75  char *game_file;
78  char *ui_log_file;
79  char *ggs_log_file;
81  char *name;
83  bool auto_start;
84  bool auto_store;
85  bool auto_swap;
86  bool auto_quit;
87  int repeat;
89  // TODO: add more options?
90 } Options;
91 
92 extern Options options;
93 
94 void options_usage(void);
95 int options_read(const char*, const char*);
96 void options_parse(const char*);
97 void options_bound(void);
98 void options_free(void);
99 void options_dump(FILE *f);
100 
101 void version(void);
102 void usage(void);
103 
104 #endif
105 
bool auto_swap
Definition: options.h:85
int selectivity
Definition: options.h:45
bool auto_quit
Definition: options.h:86
int mode
Definition: options.h:47
Definition: options.h:20
char * ggs_login
Definition: options.h:64
int beta
Definition: options.h:53
bool transgress_cassio
Definition: options.h:38
char * ggs_port
Definition: options.h:66
bool info
Definition: options.h:36
char * ggs_password
Definition: options.h:65
int noise
Definition: options.h:33
char * ui_log_file
Definition: options.h:78
long long time
Definition: options.h:41
PlayType
Definition: options.h:17
bool pv_check
Definition: options.h:72
bool auto_store
Definition: options.h:84
bool all_best
Definition: options.h:55
int depth
Definition: options.h:44
char * eval_file
Definition: options.h:57
void options_bound(void)
Keep options between realistic values.
Definition: options.c:287
bool cpu_affinity
Definition: options.h:30
bool book_allowed
Definition: options.h:60
char * game_file
Definition: options.h:75
bool can_ponder
Definition: options.h:43
PlayType play_type
Definition: options.h:42
void options_usage(void)
Print options usage.
Definition: options.c:90
bool auto_start
Definition: options.h:83
double speed
Definition: options.h:49
void options_parse(const char *)
parse options from a file
Definition: options.c:265
Definition: options.h:18
int n_task
Definition: options.h:29
void usage(void)
Programme usage.
Definition: main.c:48
char * search_log_file
Definition: options.h:77
Options options
Definition: options.c:22
double nps
Definition: options.h:50
double probcut_d
Definition: options.h:69
bool pv_guess
Definition: options.h:73
int alpha
Definition: options.h:52
int verbosity
Definition: options.h:32
char * ggs_log_file
Definition: options.h:79
char * name
Definition: options.h:81
int level
Definition: options.h:40
bool pv_debug
Definition: options.h:71
bool echo
Definition: options.h:35
bool debug_cassio
Definition: options.h:37
void options_dump(FILE *f)
Print all global options.
Definition: options.c:329
int options_read(const char *, const char *)
Read an option.
Definition: options.c:136
int book_randomness
Definition: options.h:61
void options_free(void)
free allocated resources.
Definition: options.c:398
char * ggs_host
Definition: options.h:63
int repeat
Definition: options.h:87
void version(void)
Print version & copyright.
Definition: main.c:27
char * book_file
Definition: options.h:59
Definition: options.h:24
int hash_table_size
Definition: options.h:25
bool ggs_open
Definition: options.h:67
int width
Definition: options.h:34
Definition: options.h:19