Print lowerbound and upperbound mates correctly (bench 5247438)

This commit is contained in:
nocturn9x committed 2026-09-11 01:18:41 +02:00
1 parent 5f2b6dca57
commit 7c418f2f9b
3 files changed
+14 -6

No files matched your search

+3 -2
View File
@@ -24,10 +24,11 @@ EXE_EXT := $(if $(OS),.exe,)
EXE := $(EXE_BASE)$(EXE_EXT)
SINGLE_LAYER ?= 0
ifeq ($(SINGLE_LAYER),1)
EVALFILE := $(CURDIR)/threans.bin
EVALFILE := $(CURDIR)/threans.bin
else
EVALFILE := ../networks/files/tyrfing.bin
ifeq ($(strip $(EVALFILE)),)
$(error Set EVALFILE to a multilayer TI network when SINGLE_LAYER=0)
$(error Set EVALFILE to a multilayer TI network when SINGLE_LAYER=0)
endif
endif
NET_NAME := $(notdir $(EVALFILE))
Submodule networks updated: 77efb7273d...c29a305980.
+10 -3
View File
@@ -205,7 +205,14 @@ proc logPretty(self: SearchLogger, depth, selDepth, variation: int, nodeCount, n
let
extra = if bestRootScore > 0: ":D" else: ":("
mateScore = if bestRootScore > 0: (mateScore() - bestRootScore + 1) div 2 else: (mateScore() + bestRootScore) div 2
mateString = &"#{mateScore}"
prefix = block:
if scoreType == Default:
""
elif scoreType == Lower:
">= "
else:
"<= "
mateString = &"{prefix}#{mateScore}"
padding = " ".repeat(PrettyScoreWidth - mateString.len - extra.len - 1)
stdout.styledWrite self.color, styleBright,
padding, color, mateString, " ", resetStyle, color, styleDim, extra, " "
@@ -262,8 +269,8 @@ proc logUCI(self: SearchLogger, depth, selDepth, variation: int, nodeCount, nps:
if self.state.normalizeScore.load(moRelaxed):
printedScore = normalizeScore(bestRootScore, material)
logMsg &= &" score cp {printedScore}"
if scoreType != Default:
logMsg &= &" {scoreType}"
if scoreType != Default:
logMsg &= &" {scoreType}"
if self.state.showWDL.load(moRelaxed):
let wdl = getExpectedWDL(bestRootScore, material)