From 15fc8da31e8a529194cf4f12822af987f975c19b Mon Sep 17 00:00:00 2001 From: Jeremy Hertel Date: Sun, 3 Dec 2023 19:38:01 -0600 Subject: [PATCH] search: fix nodes per second calculation --- internal/search/negamax.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/search/negamax.go b/internal/search/negamax.go index 7b42a5e..07b09bb 100644 --- a/internal/search/negamax.go +++ b/internal/search/negamax.go @@ -67,7 +67,7 @@ func (s *NegamaxSearcher) Search(position *chess.Position, depth int, print bool bestMove = s.pvtable[0][0] if print { - nps := float64(s.nodes) / float64(elapsed.Milliseconds()) + nps := float64(s.nodes) / float64(elapsed.Seconds()) fmt.Printf("info depth %d score cp %d nodes %d nps %f pv %s time %d tbhits %d\n", d, score, s.nodes, nps, s.getPV(), elapsed.Milliseconds(), s.ttable.Hits()) }