bool has_feature_smp;
bool has_feature_egt_nalimov;
bool has_feature_egt_gaviota;
+ bool has_feature_egt_syzygy;
bool analyse;
bool computer;
const char * name;
// This is a quick hack.
XB->has_feature_egt_nalimov = (option_find(Uci->option,"NalimovPath")!=NULL);
XB->has_feature_egt_gaviota = (option_find(Uci->option,"GaviotaTbPath")!=NULL);
+ XB->has_feature_egt_syzygy = (option_find(Uci->option,"SyzygyPath")!=NULL);
XB->analyse = FALSE;
XB->computer = FALSE;
XB->name = NULL;
start_protected_command();
uci_send_option(Uci,"GaviotaTbPath","%s",path);
end_protected_command();
+ }else if(my_string_case_equal(type,"syzygy") && XB->has_feature_egt_syzygy){
+ // updating SyzygyPath
+ my_log("POLYGLOT setting the Syzygy path to %s\n",path);
+ start_protected_command();
+ uci_send_option(Uci,"SyzygyPath","%s",path);
+ end_protected_command();
}else{
// refuse
gui_send(GUI,"Error (unsupported table base format): %s",string);
if(memory>=1){
// updating the available memory
option_t *opt;
+ int h;
my_log("POLYGLOT setting the amount of memory to %dMb\n",memory);
+ egt_cache=0;
if(XB->has_feature_egt_nalimov && (opt=option_find(Uci->option,"NalimovCache"))){
- egt_cache=atoi(opt->value);
- }else if(XB->has_feature_egt_gaviota &&
+ h=atoi(opt->value);
+ if(h>egt_cache)egt_cache=h;
+ }
+ if(XB->has_feature_egt_gaviota &&
(opt=option_find(Uci->option,"GaviotaTbCache"))){
- egt_cache=atoi(opt->value);
- }else{
- egt_cache=0;
+ h=atoi(opt->value);
+ if(h>egt_cache)egt_cache=h;
}
my_log("POLYGLOT EGTB Cache is %dMb\n",egt_cache);
real_memory=memory-egt_cache;
if(tbs>0){
strncat(egtfeature,",",StringSize-strlen(egtfeature));
}
+ tbs++;
strncat(egtfeature,"gaviota",StringSize-strlen(egtfeature));
}
+ if (XB->has_feature_egt_syzygy){
+ if(tbs>0){
+ strncat(egtfeature,",",StringSize-strlen(egtfeature));
+ }
+ strncat(egtfeature,"syzygy",StringSize-strlen(egtfeature));
+ }
strncat(egtfeature,"\"",StringSize-strlen(egtfeature));
egtfeature[StringSize-1]='\0';
gui_send(GUI,egtfeature);
if(my_string_case_equal(opt->name,"Hash")) continue;
if(my_string_case_equal(opt->name,"NalimovPath")) continue;
if(my_string_case_equal(opt->name,"GaviotaTbPath")) continue;
+ if(my_string_case_equal(opt->name,"SyzygyPath")) continue;
if((name=uci_thread_option(Uci))!=NULL &&
my_string_case_equal(opt->name,name)) continue;
format_xboard_option_line(option_line,opt);
}else{
min_depth=1;
}
+ if(!strncmp(Uci->info, "xboard ", 7)) gui_send(GUI,"%s",Uci->info+7); else // kludge to allow UCI engines to use WB protocol
gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s",Uci->best_depth>min_depth?Uci->best_depth:min_depth,
0,0.0,U64(0),Uci->info);
}
// send_pv()
+//define EXT_INFO_FORMAT "{%d,%.0f,"S64_FORMAT"} "
+#define EXT_INFO_FORMAT " %2d %4.0f "S64_FORMAT"\t"
+
static void send_pv() {
char pv_string[StringSize];
if(Uci->depth==-1) //hack to clear the engine output window
gui_send(GUI,"%d %+d %.0f "S64_FORMAT" ",0,report_best_score(),Uci->time*100.0,Uci->node_nb);
-
- gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s",Uci->best_depth,report_best_score(),Uci->time*100.0,Uci->node_nb,pv_string);
+ if(option_get_bool(Option,"ShowTbHits"))
+ gui_send(GUI,"%d %+d %.0f "S64_FORMAT EXT_INFO_FORMAT"%s%c",Uci->best_depth,report_best_score(),
+ Uci->time*100.0,Uci->node_nb,Uci->sel_depth,Uci->speed/1e3,Uci->tbhit_nb,pv_string,Uci->bound_type);
+ else
+ gui_send(GUI,"%d %+d %.0f "S64_FORMAT" %s%c",Uci->best_depth,report_best_score(),Uci->time*100.0,Uci->node_nb,pv_string,Uci->bound_type);
} else if (State->state == PONDER &&
option_get_bool(Option,"ShowPonder")) {
if (move != MoveNone && move_is_legal(move,board)) {
move_to_san(move,board,move_string,256);
line_to_san(Uci->best_pv,Uci->board,pv_string,StringSize);
- gui_send(GUI,"%d %+d %.0f "S64_FORMAT" (%s) %s",Uci->best_depth,report_best_score(),Uci->time*100.0,Uci->node_nb,move_string,pv_string);
+ if(option_get_bool(Option,"ShowTbHits"))
+ gui_send(GUI,"%d %+d %.0f "S64_FORMAT EXT_INFO_FORMAT"(%s) %s%c",Uci->best_depth,report_best_score(),
+ Uci->time*100.0,Uci->node_nb,Uci->sel_depth,Uci->speed/1e3,Uci->tbhit_nb,move_string,pv_string,Uci->bound_type);
+ else
+ gui_send(GUI,"%d %+d %.0f "S64_FORMAT" (%s) %s%c",Uci->best_depth,report_best_score(),
+ Uci->time*100.0,Uci->node_nb,move_string,pv_string,Uci->bound_type);
}
}
}