X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard2uci.c;h=4ddb72e048d9b53dba026c6d7352fa4c442bf14c;hb=learn;hp=f4c894dd3275f8b6d246b82da167b0a44d8720b6;hpb=3cb3b145bf05113cda5040c341b3be181bad5156;p=polyglot.git diff --git a/xboard2uci.c b/xboard2uci.c index f4c894d..4ddb72e 100644 --- a/xboard2uci.c +++ b/xboard2uci.c @@ -391,6 +391,9 @@ void xboard2uci_gui_step(char string[]) { XB->depth_limit = FALSE; XB->node_rate=-1; + if (option_find(Uci->option,"UCI_PlayByNodes")) { + uci_send_option(Uci,"UCI_PlayByNodes","%d",0); + } XB->computer = FALSE; my_string_set(&XB->name,""); @@ -428,7 +431,12 @@ void xboard2uci_gui_step(char string[]) { gui_send(GUI,"pong %s",Star[0]); } } else if (match(string,"nps *")) { - + + if (Star[0] > 0 && option_find(Uci->option,"UCI_PlayByNodes")) { + + uci_send_option(Uci,"UCI_PlayByNodes","%d",Star[0]); + + } else // fake WB play-by-nodes mode XB->node_rate = atoi(Star[0]); } else if (match(string,"playother")) { @@ -1022,6 +1030,7 @@ void xboard2uci_send_options(){ if(my_string_case_equal(opt->name,"UCI_ShredderbasesPath")) continue; if(my_string_case_equal(opt->name,"UCI_SetPositionValue")) continue; if(my_string_case_equal(opt->name,"UCI_DrawOffers")) continue; + if(my_string_case_equal(opt->name,"UCI_PlayByNodes")) continue; if(my_string_case_equal(opt->name,"Ponder")) continue; if(my_string_case_equal(opt->name,"Hash")) continue; if(my_string_case_equal(opt->name,"NalimovPath")) continue; @@ -1716,6 +1725,9 @@ static void send_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]; @@ -1738,7 +1750,7 @@ static void send_pv() { 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); if(option_get_bool(Option,"ShowTbHits")) - gui_send(GUI,"%d %+d %.0f "S64_FORMAT" {%d,%.0f,"S64_FORMAT"} %s%c",Uci->best_depth,report_best_score(), + 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); @@ -1753,7 +1765,7 @@ static void send_pv() { move_to_san(move,board,move_string,256); line_to_san(Uci->best_pv,Uci->board,pv_string,StringSize); if(option_get_bool(Option,"ShowTbHits")) - gui_send(GUI,"%d %+d %.0f "S64_FORMAT" {%d,%.0f,"S64_FORMAT"} (%s) %s%c",Uci->best_depth,report_best_score(), + 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(),