using JoshHeaps.Net.Models;
namespace JoshHeaps.Net.Services.Interfaces;
///
/// Thin managed facade over the native learned-weights model. The weights, all feature
/// computation, per-game accumulation, the update rule, and persistence live in the native
/// engine; this just points it at the weights file, hands out per-game trainers, and reads
/// the table back for visualization.
///
public interface ILearnedWeightsStore
{
/// Absolute path to the weights file the native engine loads and saves.
string WeightsFilePath { get; }
/// A copy of the current weights (midgame/endgame tables + feature weights).
LearnedWeightsSnapshot Snapshot();
/// Creates a per-game training accumulator. The caller owns it (see ).
nint CreateTrainer();
/// Records one played position (post-move FEN) into a trainer.
void Record(nint trainer, string fen);
///
/// Applies a finished game's outcome to the global weights (and saves): rewards the
/// winner's squares/features, punishes the loser's, scaled by .
///
void ApplyResult(nint trainer, PieceColor winner, double weight);
/// Frees a trainer. Safe to call with .
void DestroyTrainer(nint trainer);
}