2020
2121#define ENGINE "Tucano"
2222#define AUTHOR "Alcides Schulz"
23- #define VERSION "12.06 "
23+ #define VERSION "12.07 "
2424
2525void develop_workbench (void );
2626double bench (int depth , int print );
@@ -46,18 +46,18 @@ int main(int argc, char *argv[])
4646 THREAD_ID ponder_thread = 0 ;
4747
4848 // Options
49- int threads = 1 ; // Number of Threads
50- int hash_size = 64 ; // Hash Table Size in MB
49+ gThreads = 1 ;
50+ gHashSize = 64 ;
5151
5252 printf ("%s chess engine by %s - %s (type 'help' for information)\n" , ENGINE , AUTHOR , VERSION );
5353
5454 // Command line options
5555 for (int i = 0 ; i < argc ; i ++ ) {
5656 if (!strcmp ("-hash" , argv [i ])) {
57- if (++ i < argc ) hash_size = valid_hash_size (atoi (argv [i ]));
57+ if (++ i < argc ) gHashSize = valid_hash_size (atoi (argv [i ]));
5858 }
5959 if (!strcmp ("-threads" , argv [i ])) {
60- if (++ i < argc ) threads = valid_threads (atoi (argv [i ]));
60+ if (++ i < argc ) gThreads = valid_threads (atoi (argv [i ]));
6161 }
6262 if (!strcmp ("-ponder" , argv [i ])) {
6363 ponder_on = TRUE;
@@ -92,16 +92,16 @@ int main(int argc, char *argv[])
9292 }
9393 }
9494
95- printf (" hash table: %d MB, threads: %d, architecture: %s\n" , hash_size , threads , NNUE_ARCH );
95+ printf (" hash table: %d MB, threads: %d, architecture: %s\n" , gHashSize , gThreads , NNUE_ARCH );
9696
9797 // Initializations
9898 srand ((UINT )19810505 );
9999 bb_init ();
100100 bb_data_init ();
101101 magic_init ();
102102 book_init ();
103- tt_init (hash_size );
104- threads_init (threads );
103+ tt_init ();
104+ threads_init ();
105105#ifdef EGTB_SYZYGY
106106 if (strlen (syzygy_path ) != 0 ) {
107107 if (tb_init (syzygy_path )) {
@@ -240,14 +240,14 @@ int main(int argc, char *argv[])
240240 }
241241 if (!strcmp (command , "option" )) {
242242 if (strstr (line , "Hash" )) {
243- sscanf (line , "option Hash=%d" , & hash_size );
244- hash_size = valid_hash_size (hash_size );
245- tt_init (hash_size );
243+ sscanf (line , "option Hash=%d" , & gHashSize );
244+ gHashSize = valid_hash_size (gHashSize );
245+ tt_init ();
246246 }
247247 if (strstr (line , "Threads" )) {
248- sscanf (line , "option Threads=%d" , & threads );
249- threads = valid_threads (threads );
250- threads_init (threads );
248+ sscanf (line , "option Threads=%d" , & gThreads );
249+ gThreads = valid_threads (gThreads );
250+ threads_init ();
251251 }
252252#ifdef EGTB_SYZYGY
253253 if (strstr (line , "SyzygyPath" )) {
@@ -375,21 +375,21 @@ int main(int argc, char *argv[])
375375 }
376376 if (!strcmp (command , "bench" )) {
377377 // Benchmark
378- if (hash_size != 64 ) {
379- printf ("'bench' command requires hash size of 64. Current hash size is %d. Use 'option Hash=64'.\n" , hash_size );
378+ if (gHashSize != 64 ) {
379+ printf ("'bench' command requires hash size of 64. Current hash size is %d. Use 'option Hash=64'.\n" , gHashSize );
380380 continue ;
381381 }
382- if (threads != 1 ) {
383- printf ("'bench' command requires 1 thread only. Current threads is %d. Use 'option Threads=1'.\n" , threads );
382+ if (gThreads != 1 ) {
383+ printf ("'bench' command requires 1 thread only. Current threads is %d. Use 'option Threads=1'.\n" , gThreads );
384384 continue ;
385385 }
386386 bench (16 , TRUE);
387387 continue ;
388388 }
389389 if (!strcmp (command , "speed" )) {
390390 // Measure engine speed
391- if (hash_size != 64 ) {
392- printf ("'speed' command requires hash size of 64. Current hash size is %d. Use 'option Hash=64'.\n" , hash_size );
391+ if (gHashSize != 64 ) {
392+ printf ("'speed' command requires hash size of 64. Current hash size is %d. Use 'option Hash=64'.\n" , gHashSize );
393393 continue ;
394394 }
395395 speed_test ();
0 commit comments