feat : add move classification

This commit is contained in:
GuillaumeSD
2024-03-04 01:56:17 +01:00
parent 9d11b0006e
commit 4975ecfdd1
22 changed files with 13872 additions and 89 deletions

View File

@@ -6,3 +6,13 @@ export enum GameOrigin {
export enum EngineName {
Stockfish16 = "stockfish_16",
}
export enum MoveClassification {
Blunder = "blunder",
Mistake = "mistake",
Inaccuracy = "inaccuracy",
Good = "good",
Excellent = "excellent",
Best = "best",
Book = "book",
}

View File

@@ -1,8 +1,10 @@
import { Move } from "chess.js";
import { EngineName } from "./enums";
import { EngineName, MoveClassification } from "./enums";
export interface MoveEval {
bestMove: string;
bestMove?: string;
moveClassification?: MoveClassification;
opening?: string;
lines: LineEval[];
}
@@ -43,3 +45,10 @@ export type CurrentMove = Partial<Move> & {
eval?: MoveEval;
lastEval?: MoveEval;
};
export interface EvaluateGameParams {
fens: string[];
uciMoves: string[];
depth?: number;
multiPv?: number;
}