1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// jja: swiss army knife for chess file formats
// src/lieval.rs: Lichess evaluations export file constants and utilities
//
// Copyright (c) 2023 Ali Polatel <alip@chesswob.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
use serde::{Deserialize, Serialize};
/// Lichess Evaluations
#[derive(Serialize, Deserialize, Debug)]
pub struct LichessEval {
/// FEN
pub fen: String,
/// List of evaluations
pub evals: Vec<Eval>,
}
/// Lichess Evaluation
#[derive(Serialize, Deserialize, Debug)]
pub struct Eval {
/// List of principled variations
pub pvs: Vec<Pv>,
/// Depth in kilo nodes
pub knodes: u64,
/// Depth in ply
pub depth: i32,
}
/// Lichess Principled Variation
#[derive(Serialize, Deserialize, Debug)]
pub struct Pv {
/// Score in centipawns
pub cp: Option<i32>,
/// Mate in number of plies
pub mate: Option<i32>,
/// Moves as space separated UCI
pub line: String,
}