77#define log2(x) (log(x)/log(2.0))
82 1, 1, 1, 1, 2, 2, 2, 2,
83 1, 1, 1, 1, 2, 2, 2, 2,
84 1, 1, 1, 1, 2, 2, 2, 2,
85 1, 1, 1, 1, 2, 2, 2, 2,
86 4, 4, 4, 4, 8, 8, 8, 8,
87 4, 4, 4, 4, 8, 8, 8, 8,
88 4, 4, 4, 4, 8, 8, 8, 8,
89 4, 4, 4, 4, 8, 8, 8, 8,
109 99, 99, 99, 99, 6, 8, 10, 12,
110 14, 16, 20, 22, 24, 26, 28, 30,
111 32, 34, 36, 38, 40, 42, 44, 46,
112 48, 48, 50, 50, 52, 52, 54, 54,
113 56, 56, 58, 58, 60, 60, 62, 62,
114 64, 64, 64, 64, 64, 64, 64, 64,
115 99, 99, 99, 99, 99, 99, 99, 99,
121 99, 99, 99, 99, -2, 0, 2, 4,
122 6, 8, 12, 14, 16, 18, 20, 22,
123 24, 26, 28, 30, 32, 34, 36, 38,
124 40, 40, 42, 42, 44, 44, 46, 46,
125 48, 48, 50, 50, 52, 52, 54, 54,
126 56, 56, 58, 58, 60, 60, 62, 62,
127 99, 99, 99, 99, 99, 99, 99, 99,
133 0, 1, 2, 3, 3, 2, 1, 0,
134 1, 4, 5, 6, 6, 5, 4, 1,
135 2, 5, 7, 8, 8, 7, 5, 2,
136 3, 6, 8, 9, 9, 8, 6, 3,
137 3, 6, 8, 9, 9, 8, 6, 3,
138 2, 5, 7, 8, 8, 7, 5, 2,
139 1, 4, 5, 6, 6, 5, 4, 1,
140 0, 1, 2, 3, 3, 2, 1, 0,
153 int level, n_empties;
155 for (level = 0; level <= 60; ++level)
156 for (n_empties = 0; n_empties <= 60; ++n_empties) {
160 }
else if (level <= 10) {
162 if (n_empties <= 2 * level) {
167 }
else if (level <= 12) {
168 if (n_empties <= 21) {
171 }
else if (n_empties <= 24) {
178 }
else if (level <= 18) {
179 if (n_empties <= 21) {
182 }
else if (n_empties <= 24) {
185 }
else if (n_empties <= 27) {
192 }
else if (level <= 21) {
193 if (n_empties <= 24) {
196 }
else if (n_empties <= 27) {
199 }
else if (n_empties <= 30) {
206 }
else if (level <= 24) {
207 if (n_empties <= 24) {
210 }
else if (n_empties <= 27) {
213 }
else if (n_empties <= 30) {
216 }
else if (n_empties <= 33) {
223 }
else if (level <= 27) {
224 if (n_empties <= 27) {
227 }
else if (n_empties <= 30) {
230 }
else if (n_empties <= 33) {
237 }
else if (level < 30) {
238 if (n_empties <= 27) {
241 }
else if (n_empties <= 30) {
244 }
else if (n_empties <= 33) {
247 }
else if (n_empties <= 36) {
254 }
else if (level <= 31) {
255 if (n_empties <= 30) {
258 }
else if (n_empties <= 33) {
261 }
else if (n_empties <= 36) {
268 }
else if (level <= 33) {
269 if (n_empties <= 30) {
272 }
else if (n_empties <= 33) {
275 }
else if (n_empties <= 36) {
278 }
else if (n_empties <= 39) {
285 }
else if (level <= 35) {
286 if (n_empties <= 30) {
289 }
else if (n_empties <= 33) {
292 }
else if (n_empties <= 36) {
295 }
else if (n_empties <= 39) {
302 }
else if (level < 60) {
303 if (n_empties <= level - 6) {
306 }
else if (n_empties <= level - 3) {
309 }
else if (n_empties <= level) {
312 }
else if (n_empties <= level + 3) {
315 }
else if (n_empties <= level + 6) {
318 }
else if (n_empties <= level + 9) {
381 if (search->
tasks == NULL) {
407 if (search->
result == NULL) {
410 spin_init(search->
result);
453 spin_free(search->
result);
470 const int presorted_x[] = {
484 unsigned long long E;
492 empty->
next = empty + 1;
496 if ((E &
x_to_bit(presorted_x[i]))) {
497 empty->
x = presorted_x[i];
501 empty->
next = empty + 1;
596 *search->
board = *board;
656 for (t = 0.0, d = 15; d <= 60 && t <= limit; ++d) {
705 info(
"<Time-alloted: mini = %.2f; maxi = %.2f; extra = %.2f>\n", 0.001 * search->
time.
mini, 0.001 * search->
time.
maxi, 0.001 * search->
time.
extra);
711 t =
MAX(t / d - 10, 100);
716 info(
"<Time-init: rt = %.2f; sd = %d; d = %d; t = %.2f>\n", 0.001 * search->
options.
time, sd, d, 0.001 * t);
717 info(
"<Time-alloted: mini = %.2f; maxi = %.2f; extra = %.2f>\n", 0.001 * search->
time.
mini, 0.001 * search->
time.
maxi, 0.001 * search->
time.
extra);
740 search->
time.
maxi = spent + t * 99 / 100;
741 search->
time.
mini = spent + t * 9 / 10;
743 info(
"<Time-alloted: mini = %.2f; maxi = %.2f; extra = %.2f>\n", 0.001 * search->
time.
mini, 0.001 * search->
time.
maxi, 0.001 * search->
time.
extra);
748 const int d =
MAX((n_empties - sd) / 2, 2);
749 t =
MAX(t / d - 10, 100);
751 search->
time.
maxi = spent + t * 3 / 4;
754 info(
"<Time-reset: spent = %.2f rt = %.2f; sd = %d; d = %d; t = %.2f>\n", 0.001 * spent, 0.001 * search->
options.
time, sd, d, 0.001 * t);
755 info(
"<Time-alloted: mini = %.2f; maxi = %.2f; extra = %.2f>\n", 0.001 * search->
time.
mini, 0.001 * search->
time.
maxi, 0.001 * search->
time.
extra);
780 info(
"\n<Time-adjusted: mini = %.2f; maxi = %.2f; extra = %.2f>\n", 0.001 * search->
time.
mini, 0.001 * search->
time.
maxi, 0.001 * search->
time.
extra);
805 assert(master->
master == master);
814 printf(
"*** MASTER ALREADY STOPPED FOR ANOTHER REASON (%d) ***\n", master->
stop);
835 printf(
"*** SEARCH STILL RUNNING ? (%d) ***\n", search->
stop);
886 previous = previous->
next = move;
889 previous->
next = NULL;
974 assert(search->
height > 0);
1002 assert(search->
height > 0);
1014 int depth_pv_extension;
1016 if (
depth >= n_empties ||
depth <= 9) depth_pv_extension = -1;
1017 else if (
depth <= 12) depth_pv_extension = 10;
1018 else if (
depth <= 18) depth_pv_extension = 12;
1019 else if (
depth <= 24) depth_pv_extension = 14;
1020 else depth_pv_extension = 16;
1022 return depth_pv_extension;
1034 return (
depth >= n_empties)
1110 const int PRINTED_WIDTH = 53;
1112 const int PRINTED_WIDTH = 52;
1123 else fprintf(f,
" %2d ", result->
depth);
1124 fprintf(f,
"%c%+03d ", bound, result->
score);
1127 fprintf(f,
" %13lld ", result->
n_nodes);
1128 if (result->
time > 0) fprintf(f,
"%10.0f ", 1000.0 * result->
n_nodes / result->
time);
1129 else fprintf(f,
" ");
1130 }
else fputs(
" ", f);
1134 spin_unlock(result);
1153 if (*score <= *alpha) {
1157 else if (*score < *beta) *beta = *score;
1177 if (*score <= alpha) {
1200 if (*alpha < data->lower) {
1201 *alpha = data->
lower;
1202 if (*alpha >= *beta) {
1208 if (*beta > data->
upper) {
1209 *beta = data->
upper;
1210 if (*beta <= *alpha) {
1234 if (alpha < data->lower) {
1236 *score = data->
lower;
1239 if (alpha >= data->
upper) {
1241 *score = data->
upper;
1271 unsigned long long etc_hash_code;
1273 const int etc_depth =
depth - 1;
1274 const int beta = alpha + 1;
1284 if (*score > alpha) {
1293 *score = -etc->
upper;
1294 if (*score > alpha) {
1340 search->
stop = stop;
1341 for (i = 0; i < search->
n_child; ++i) {
1344 spin_unlock(search);
1356 search->
stop = stop;
1357 spin_unlock(search);
#define x_to_bit(x)
Definition bit.h:43
#define foreach_bit(i, b)
Definition bit.h:39
unsigned long long board_get_hash_code(const Board *board)
Compute a hash code.
Definition board.c:1134
void board_restore(Board *board, const Move *move)
Restore a board.
Definition board.c:487
void board_update(Board *board, const Move *move)
Update a board.
Definition board.c:469
int board_count_empties(const Board *board)
Check if the game is over.
Definition board.c:1216
unsigned long long board_get_move(const Board *board, const int x, Move *move)
Compute a move.
Definition board.c:438
int get_stability(const unsigned long long P, const unsigned long long O)
Estimate the stability.
Definition board.c:1067
int get_mobility(const unsigned long long P, const unsigned long long O)
Count legal moves.
Definition board.c:833
DLL_API unsigned long long get_moves(const unsigned long long P, const unsigned long long O)
Get legal moves.
Definition board.c:621
void board_pass(Board *board)
Passing move.
Definition board.c:503
#define SCORE_MAX
Definition const.h:58
#define TIME_MAX
Definition const.h:61
#define BOARD_SIZE
Definition const.h:21
@ B3
Definition const.h:31
@ D7
Definition const.h:35
@ PASS
Definition const.h:37
@ B6
Definition const.h:34
@ F3
Definition const.h:31
@ D4
Definition const.h:32
@ NOMOVE
Definition const.h:37
@ E8
Definition const.h:36
@ E4
Definition const.h:32
@ E6
Definition const.h:34
@ C4
Definition const.h:32
@ A6
Definition const.h:34
@ F5
Definition const.h:33
@ C5
Definition const.h:33
@ D1
Definition const.h:29
@ H4
Definition const.h:32
@ G5
Definition const.h:33
@ B8
Definition const.h:36
@ E7
Definition const.h:35
@ E3
Definition const.h:31
@ A2
Definition const.h:30
@ A3
Definition const.h:31
@ C7
Definition const.h:35
@ H5
Definition const.h:33
@ B7
Definition const.h:35
@ F1
Definition const.h:29
@ C2
Definition const.h:30
@ C8
Definition const.h:36
@ G6
Definition const.h:34
@ E5
Definition const.h:33
@ B4
Definition const.h:32
@ F7
Definition const.h:35
@ A1
Definition const.h:29
@ A7
Definition const.h:35
@ H1
Definition const.h:29
@ D2
Definition const.h:30
@ F4
Definition const.h:32
@ G3
Definition const.h:31
@ B2
Definition const.h:30
@ D5
Definition const.h:33
@ G8
Definition const.h:36
@ F6
Definition const.h:34
@ F2
Definition const.h:30
@ H6
Definition const.h:34
@ A5
Definition const.h:33
@ G1
Definition const.h:29
@ E1
Definition const.h:29
@ H7
Definition const.h:35
@ H3
Definition const.h:31
@ D6
Definition const.h:34
@ H2
Definition const.h:30
@ F8
Definition const.h:36
@ E2
Definition const.h:30
@ B1
Definition const.h:29
@ A4
Definition const.h:32
@ C3
Definition const.h:31
@ H8
Definition const.h:36
@ D3
Definition const.h:31
@ C6
Definition const.h:34
@ G7
Definition const.h:35
@ C1
Definition const.h:29
@ D8
Definition const.h:36
@ G2
Definition const.h:30
@ G4
Definition const.h:32
@ B5
Definition const.h:33
@ A8
Definition const.h:36
@ EMPTY
Definition const.h:44
#define MAX_THREADS
Definition const.h:15
Stop
Definition const.h:70
@ RUNNING
Definition const.h:71
@ STOP_TIMEOUT
Definition const.h:74
@ STOP_END
Definition const.h:76
NodeType
Definition const.h:80
@ CUT_NODE
Definition const.h:82
@ ALL_NODE
Definition const.h:83
#define foreach_empty(empty, list)
Definition empty.h:46
static void empty_remove(SquareList *empty)
remove an empty square from the list.
Definition empty.h:28
static void empty_restore(SquareList *empty)
restore the list of empty squares
Definition empty.h:39
void eval_free(Eval *eval)
Free resources used by the evaluation function.
Definition eval.c:519
void eval_restore(Eval *eval, const Move *move)
Definition eval.c:810
void eval_pass(Eval *eval)
Update/Restore the features after a passing move.
Definition eval.c:824
void eval_update(Eval *eval, const Move *move)
Definition eval.c:681
void eval_init(Eval *eval)
Initialize a new evaluation function.
Definition eval.c:509
void eval_set(Eval *eval, const Board *board)
Set up evaluation features from a board.
Definition eval.c:530
bool hash_get(HashTable *hash_table, const unsigned long long hash_code, HashData *data)
Find an hash table entry according to the evaluated board hash codes.
Definition hash-lock-free.c:600
void hash_init(HashTable *hash_table, const int size)
Initialise the hashtable.
Definition hash-lock-free.c:123
void hash_cleanup(HashTable *hash_table)
Clear the hashtable.
Definition hash-lock-free.c:159
void hash_free(HashTable *hash_table)
Free the hashtable.
Definition hash-lock-free.c:195
void hash_store(HashTable *hash_table, const unsigned long long hash_code, const int depth, const int selectivity, const int cost, const int alpha, const int beta, const int score, const int move)
Store an hashtable item.
Definition hash-lock-free.c:543
void hash_copy(const HashTable *src, HashTable *dest)
Copy an hastable to another one.
Definition hash-lock-free.c:652
void line_print(const Line *line, int width, const char *separator, FILE *f)
Print a move sequence.
Definition move.c:610
#define foreach_move(iter, movelist)
Definition move.h:78
Options options
Definition options.c:22
void search_swap_parity(Search *search, const int x)
Change parity.
Definition search.c:860
void search_time_init(Search *search)
Initialize the alloted time.
Definition search.c:697
void search_set_level(Search *search, const int level, const int n_empties)
Set the search level.
Definition search.c:609
void search_init(Search *search)
Init the main search.
Definition search.c:351
const int NO_SELECTIVITY
Definition search.c:94
bool search_TC_NWS(HashData *data, const int depth, const int selectivity, const int alpha, int *score)
Transposition Cutoff (TC).
Definition search.c:1230
void search_time_reset(Search *search, const Board *initial_board)
Reset the alloted time.
Definition search.c:732
void search_check_timeout(Search *search)
Check if it can iterate more...
Definition search.c:800
bool search_SC_PVS(Search *search, volatile int *alpha, volatile int *beta, int *score)
Stability Cutoff (SC).
Definition search.c:1146
struct Level LEVEL[61][61]
Definition search.c:144
bool search_continue(Search *search)
Check if it can iterate more...
Definition search.c:790
void search_free(Search *search)
Free the search allocated ressource.
Definition search.c:441
const int PVS_STABILITY_THRESHOLD[]
Definition search.c:120
void search_pass_endgame(Search *search)
Update the search state after a passing move.
Definition search.c:928
const Selectivity selectivity_table[]
Definition search.c:97
void search_get_movelist(const Search *search, MoveList *movelist)
Get a list of legal moves.
Definition search.c:875
long long search_clock(Search *search)
Return the time spent by the search.
Definition search.c:1049
const int QUADRANT_ID[]
Definition search.c:81
void search_restore_pass_midgame(Search *search)
Update the search state after a passing move.
Definition search.c:998
void search_restore_endgame(Search *search, const Move *move)
Restore the search state as before a move.
Definition search.c:915
unsigned long long search_count_nodes(Search *search)
Return the number of nodes searched.
Definition search.c:1073
void result_print(Result *result, FILE *f)
Print the current search result.
Definition search.c:1106
void search_set_task_number(Search *search, const int n)
Change the number of task.
Definition search.c:847
Log search_log[1]
Definition search.c:74
int get_pv_extension(const int depth, const int n_empties)
Compute the pv_extension.
Definition search.c:1012
void search_clone(Search *search, Search *master)
Clone a search for parallel search.
Definition search.c:540
void search_cleanup(Search *search)
Clean-up some search data.
Definition search.c:578
void search_adjust_time(Search *search, const bool once)
Give more time.
Definition search.c:771
bool is_depth_solving(const int depth, const int n_empties)
Check if final score use pv_extension or is solved.
Definition search.c:1032
void search_restore_midgame(Search *search, const Move *move)
Restore the search state as before a move.
Definition search.c:964
void search_set_observer(Search *search, void(*observer)(Result *))
set observer.
Definition search.c:1095
void search_update_endgame(Search *search, const Move *move)
Update the search state after a move.
Definition search.c:900
const int SQUARE_TYPE[]
Definition search.c:132
void search_update_midgame(Search *search, const Move *move)
Update the search state after a move.
Definition search.c:942
void search_set_board(Search *search, const Board *board, const int player)
Set the board to analyze.
Definition search.c:593
void search_global_init(void)
Definition search.c:151
int search_guess(Search *search, const Board *board)
Guess the bestmove of a given board.
Definition search.c:1369
int solvable_depth(const long long limit, int n_tasks)
Compute the deepest level that can be solved given a limited time...
Definition search.c:650
int search_count_tasks(const Search *search)
Count the number of tasks used in parallel search.
Definition search.c:1324
bool search_ETC_NWS(Search *search, MoveList *movelist, unsigned long long hash_code, const int depth, const int selectivity, const int alpha, int *score)
Enhanced Transposition Cutoff (ETC).
Definition search.c:1264
void search_set_state(Search *search, const Stop stop)
Set the search running/waiting state.
Definition search.c:1353
void search_resize_hashtable(Search *search)
Definition search.c:333
void search_stop_all(Search *search, const Stop stop)
Stop the search.
Definition search.c:1335
void search_set_move_time(Search *search, const long long t)
set time to search.
Definition search.c:686
void search_setup(Search *search)
Set up various structure once the board has been set.
Definition search.c:466
const int NWS_STABILITY_THRESHOLD[]
Definition search.c:108
bool search_TC_PVS(HashData *data, const int depth, const int selectivity, volatile int *alpha, volatile int *beta, int *score)
Transposition Cutoff (TC).
Definition search.c:1196
void search_share(const Search *src, Search *dest)
Share search information.
Definition search.c:1312
void search_set_ponder_level(Search *search, const int level, const int n_empties)
Set the search level while pondering.
Definition search.c:629
void search_update_pass_midgame(Search *search)
Update the search state after a passing move.
Definition search.c:983
void search_observer(Result *result)
default observer.
Definition search.c:1083
bool search_SC_NWS(Search *search, const int alpha, int *score)
Stability Cutoff (TC).
Definition search.c:1170
long long search_time(Search *search)
Return the time spent by the search.
Definition search.c:1061
void search_set_game_time(Search *search, const long long t)
set time to search.
Definition search.c:671
NodeType next_node_type(const NodeType parent, const bool first_move)
#define USE_ETC
Definition settings.h:33
#define BRANCHING_FACTOR
Definition settings.h:110
#define SMP_C
Definition settings.h:116
#define SMP_W
Definition settings.h:113
#define MULTIPV_DEPTH
Definition settings.h:122
#define ETC_MIN_DEPTH
Definition settings.h:95
#define USE_SC
Definition settings.h:30
#define USE_TC
Definition settings.h:27
Statistics statistics
Definition stats.c:21
#define SEARCH_UPDATE_ALL_NODES()
Definition stats.h:54
#define CUTOFF_STATS(x)
Definition stats.h:31
unsigned long long player
Definition board.h:27
unsigned long long opponent
Definition board.h:27
int lower
Definition search.h:36
int upper
Definition search.h:37
unsigned char move[2]
Definition hash.h:31
signed char lower
Definition hash.h:29
signed char upper
Definition hash.h:30
unsigned char selectivity
Definition hash.h:26
unsigned char depth
Definition hash.h:25
Hash * hash
Definition hash.h:49
unsigned long long hash_mask
Definition hash.h:51
int depth
Definition search.h:89
int selectivity
Definition search.h:90
LogFile.
Definition util.h:423
FILE * f
Definition util.h:424
int n_moves
Definition move.h:31
Move move[MAX_MOVE+2]
Definition move.h:30
unsigned int cost
Definition move.h:24
struct Move * next
Definition move.h:25
unsigned long long flipped
Definition move.h:21
int x
Definition move.h:22
bool cpu_affinity
Definition options.h:30
double speed
Definition options.h:49
int n_task
Definition options.h:29
bool pv_guess
Definition options.h:73
int width
Definition options.h:34
char * search_log_file
Definition options.h:77
double nps
Definition options.h:50
int hash_table_size
Definition options.h:25
int verbosity
Definition options.h:32
int move
Definition search.h:44
unsigned long long n_nodes
Definition search.h:49
int score
Definition search.h:45
long long time
Definition search.h:48
int selectivity
Definition search.h:43
Line pv[1]
Definition search.h:47
int depth
Definition search.h:42
Bound bound[BOARD_SIZE+2]
Definition search.h:46
long long maxi
Definition search.h:130
unsigned int parity
Definition search.h:120
const char * separator
Definition search.h:145
struct Search * parent
Definition search.h:112
volatile long long spent
Definition search.h:126
struct TaskStack * tasks
Definition search.h:109
int n_empties
Definition search.h:99
bool keep_date
Definition search.h:143
void(* observer)(Result *)
Definition search.h:153
long long extra
Definition search.h:125
bool guess_pv
Definition search.h:146
volatile unsigned long long child_nodes
Definition search.h:156
MoveList movelist[1]
Definition search.h:132
bool allow_node_splitting
Definition search.h:123
struct Search * child[MAX_THREADS]
Definition search.h:113
int hash_size
Definition search.h:148
bool can_update
Definition search.h:128
Result * result
Definition search.h:151
const char * header
Definition search.h:144
int depth_pv_extension
Definition search.h:121
int height
Definition search.h:133
bool time_per_move
Definition search.h:141
int id
Definition search.h:101
int player
Definition search.h:100
struct Search::@25 options
Random random[1]
Definition search.h:107
int verbosity
Definition search.h:142
volatile int n_child
Definition search.h:115
SquareList empties[BOARD_SIZE+2]
Definition search.h:97
int depth
Definition search.h:117
int probcut_level
Definition search.h:119
Bound stability_bound
Definition search.h:135
long long mini
Definition search.h:129
HashTable pv_table[1]
Definition search.h:104
HashTable hash_table[1]
Definition search.h:103
volatile Stop stop
Definition search.h:122
volatile unsigned long long n_nodes
Definition search.h:155
HashTable shallow_table[1]
Definition search.h:105
int selectivity
Definition search.h:118
SquareList * x_to_empties[BOARD_SIZE+2]
Definition search.h:98
Eval eval[1]
Definition search.h:106
NodeType node_type[GAME_SIZE]
Definition search.h:134
struct Task * task
Definition search.h:110
Board board[1]
Definition search.h:96
int multipv_depth
Definition search.h:147
bool extended
Definition search.h:127
struct Search * master
Definition search.h:114
int percent
Definition search.h:28
struct SquareList * previous
Definition empty.h:19
int quadrant
Definition empty.h:18
unsigned long long b
Definition empty.h:16
struct SquareList * next
Definition empty.h:20
int x
Definition empty.h:17
unsigned long long n_esc_high_cutoff
Definition stats.h:108
unsigned long long n_stability_try
Definition stats.h:104
unsigned long long n_hash_try
Definition stats.h:103
unsigned long long n_etc_try
Definition stats.h:108
unsigned long long n_hash_low_cutoff
Definition stats.h:103
unsigned long long n_hash_high_cutoff
Definition stats.h:103
unsigned long long n_stability_low_cutoff
Definition stats.h:104
unsigned long long n_etc_high_cutoff
Definition stats.h:108
int n
Definition ybwc.h:97
Task * task
Definition ybwc.h:95
struct Node * node
Definition ybwc.h:34
struct Move * move
Definition ybwc.h:35
unsigned long long n_calls
Definition ybwc.h:37
unsigned long long n_nodes
Definition ybwc.h:38
struct Search * search
Definition ybwc.h:33
volatile bool loop
Definition ybwc.h:30
volatile bool run
Definition ybwc.h:31
void time_print(long long t, bool justified, FILE *f)
Print time as "D:HH:MM:SS.CC".
Definition util.c:131
long long(* time_clock)(void)
Time clock.
Definition util.c:122
void thread_set_cpu(Thread thread, int i)
Choose a single core or cpu to run on, under linux systems, to avoid context changes.
Definition util.c:967
void random_seed(Random *random, const unsigned long long seed)
Pseudo-random number seed.
Definition util.c:1062
Thread thread_self(void)
Current thread.
Definition util.c:954
Miscellaneous utilities header.
#define log_close(l)
Close an opened log file.
Definition util.h:435
long long real_clock(void)
#define MIN(a, b)
Definition util.h:101
#define fatal_error(...)
Display an error message as "FATAL_ERROR : file name : function name : line number : ....
Definition util.h:349
#define info(...)
Display a message.
Definition util.h:382
#define log_open(l, file)
open a log file if allowed.
Definition util.h:429
#define MAX(a, b)
Definition util.h:98
static int hash_size(int n)
Definition xboard.c:271
void task_stack_free(TaskStack *stack)
Free resources used by the stack of tasks.
Definition ybwc.c:607
void task_stack_resize(TaskStack *stack, const int n)
Resize the stack of tasks.
Definition ybwc.c:626
void task_stack_init(TaskStack *stack, const int n)
Initialize the stack of tasks.
Definition ybwc.c:560