{ "HandleDraws", "check","0","0", "false" , NULL,0,NNB, PG|XBOARD|XBSEL},
{ "ContemptScore", "spin","0","10000", "30" , NULL,0,NNB, PG|XBOARD|XBSEL},
- { "MateScore", "spin","0","100000", "10000" , NULL,0,NNB, PG|XBOARD},
+ { "MateScore", "spin","0","100000", "0" , NULL,0,NNB, PG|XBOARD},
{ "Book", "check","0","0", "false" , NULL,0,NNB, PG|XBOARD|XBSEL|UCI},
{ "BookFile", "file","0","0", "book.bin" , NULL,0,NNB, PG|XBOARD|XBSEL|UCI},
If true PolyGlot will not understand xboard commands.
-=item B<MateScore> (default: 10000)
+=item B<MateScore> (default: 0)
Mate score reported to GUI when in xboard mode.
+When set to 0 it uses the new CECP convention of reporting 100000 + N
+for mate in N moves, and -(100000 + N) for mated in N.
=item B<Book> (default: false)
static int mate_score(int dist) {
+ int ms = option_get_int(Option,"MateScore");
+
ASSERT(dist!=0);
if (FALSE) {
+ } else if (ms == 0) {
+ return (dist > 0 ? 100000 + dist : -100000 + dist);
} else if (dist > 0) {
- return +option_get_int(Option,"MateScore") - (+dist) * 2 + 1;
+ return +ms - (+dist) * 2 + 1;
} else if (dist < 0) {
- return -option_get_int(Option,"MateScore") + (-dist) * 2;
+ return -ms + (-dist) * 2;
}
return 0;