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