pub struct TacticalPuzzleParser;Expand description
Tactical puzzle parser for Lichess puzzle database
Implementations§
Source§impl TacticalPuzzleParser
impl TacticalPuzzleParser
Sourcepub fn parse_csv<P: AsRef<Path>>(
file_path: P,
max_puzzles: Option<usize>,
min_rating: Option<u32>,
max_rating: Option<u32>,
) -> Result<Vec<TacticalTrainingData>, Box<dyn Error>>
pub fn parse_csv<P: AsRef<Path>>( file_path: P, max_puzzles: Option<usize>, min_rating: Option<u32>, max_rating: Option<u32>, ) -> Result<Vec<TacticalTrainingData>, Box<dyn Error>>
Parse Lichess puzzle CSV file with parallel processing
Sourcepub fn load_into_engine(
tactical_data: &[TacticalTrainingData],
engine: &mut ChessVectorEngine,
)
pub fn load_into_engine( tactical_data: &[TacticalTrainingData], engine: &mut ChessVectorEngine, )
Load tactical training data into chess engine
Sourcepub fn load_into_engine_incremental(
tactical_data: &[TacticalTrainingData],
engine: &mut ChessVectorEngine,
)
pub fn load_into_engine_incremental( tactical_data: &[TacticalTrainingData], engine: &mut ChessVectorEngine, )
Load tactical training data into chess engine incrementally (preserves existing data)
Sourcepub fn save_tactical_puzzles<P: AsRef<Path>>(
tactical_data: &[TacticalTrainingData],
path: P,
) -> Result<(), Box<dyn Error>>
pub fn save_tactical_puzzles<P: AsRef<Path>>( tactical_data: &[TacticalTrainingData], path: P, ) -> Result<(), Box<dyn Error>>
Save tactical puzzles to file for incremental loading later
Sourcepub fn load_tactical_puzzles<P: AsRef<Path>>(
path: P,
) -> Result<Vec<TacticalTrainingData>, Box<dyn Error>>
pub fn load_tactical_puzzles<P: AsRef<Path>>( path: P, ) -> Result<Vec<TacticalTrainingData>, Box<dyn Error>>
Load tactical puzzles from file
Sourcepub fn save_tactical_puzzles_incremental<P: AsRef<Path>>(
tactical_data: &[TacticalTrainingData],
path: P,
) -> Result<(), Box<dyn Error>>
pub fn save_tactical_puzzles_incremental<P: AsRef<Path>>( tactical_data: &[TacticalTrainingData], path: P, ) -> Result<(), Box<dyn Error>>
Save tactical puzzles incrementally (appends to existing file)
Auto Trait Implementations§
impl Freeze for TacticalPuzzleParser
impl RefUnwindSafe for TacticalPuzzleParser
impl Send for TacticalPuzzleParser
impl Sync for TacticalPuzzleParser
impl Unpin for TacticalPuzzleParser
impl UnwindSafe for TacticalPuzzleParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more