commit cc4da688a79b401548023606d73b94325adcb1b8
parent 024e51a2fe358911a81173e763866a442b2fb123
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sat, 17 Jun 2023 18:36:15 -0700
give more time for better accuracy
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go
@@ -995,16 +995,13 @@ func AnalyzeGame(pgn string, t int64) (out AnalyzeResult, err error) {
scores := make([]Score, 0)
cps := make([]int, 0)
- t = utils.Clamp(t, 1, 60)
- moveTime := time.Duration((float64(t)/float64(len(positions)-1))*1000) * time.Millisecond
-
for idx, position := range positions {
// First position is the board without any move played
if idx == 0 {
continue
}
cmdPos := uci.CmdPosition{Position: position}
- cmdGo := uci.CmdGo{MoveTime: moveTime}
+ cmdGo := uci.CmdGo{MoveTime: time.Second}
if err := eng.Run(cmdPos, cmdGo); err != nil {
//if err.Error() == `chess: failed to decode long algebraic notation text "(none)" for position <nil>` {
// cp := 0