feat : improve evaluation progress calc

This commit is contained in:
GuillaumeSD
2024-07-21 22:52:14 +02:00
parent 5aba715fa8
commit 9d5b088ae9

View File

@@ -159,7 +159,7 @@ export abstract class UciEngine {
const result = await this.evaluatePosition(fen, depth); const result = await this.evaluatePosition(fen, depth);
positions.push(result); positions.push(result);
setEvaluationProgress?.( setEvaluationProgress?.(
Math.max(((fens.indexOf(fen) + 1) / fens.length) * 100 - 2, 2) 99 - Math.exp(-4 * (fens.indexOf(fen) / fens.length)) * 99
); );
} }
@@ -171,7 +171,6 @@ export abstract class UciEngine {
const accuracy = computeAccuracy(positions); const accuracy = computeAccuracy(positions);
this.ready = true; this.ready = true;
setEvaluationProgress?.(99);
return { return {
positions: positionsWithClassification, positions: positionsWithClassification,
accuracy, accuracy,