Skip to content

Commit

Permalink
search: fix nodes per second calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ff committed Dec 4, 2023
1 parent 92f0dd1 commit 15fc8da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/search/negamax.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down

0 comments on commit 15fc8da

Please sign in to comment.