gras 2.0.1

A Genetic Programming framework for Neural Architecture Search in Rust
Documentation
//! Training schemes for the step-race engine.

pub mod challenge;
pub mod core;
pub mod decision_lag;
pub mod env;
pub mod menu;
pub mod optimizer;
pub mod reinforce;
pub mod schedule;
pub mod stream;

/// The crate's reference tabular scheme — SHIPPED surface, not test scaffolding: the engine knows
/// only the `TabularStep` contract, and `TabularTrainer` is the ready-made implementation
pub mod supervised;
pub use supervised::TabularTrainer;

pub use challenge::{
    ChallengeDecay, ChallengePolicy, ForcedAction, challenge_fires, effective_challenge_prob,
    forced_action, least_action,
};
pub use core::{
    AnyTrainer, RlContext, RlStep, RlStepMeta, RlStepReport, RunData, StepCtx, StepEnv, StepReport,
    StreamShape, TabularContext, TabularStep, TabularStepReport,
};
pub use decision_lag::DecisionLagTrainer;
pub use env::Env;
pub use flodl::Variable;
pub use menu::{
    FITNESS_NAMES, Loss, METRIC_NAMES, TargetKind, fitness_for, metric_for, metrics_for,
};
/// Named optimizers — what `make_optimizer` / `restore_optimizer` build.
pub use optimizer::OptimizerKind;
/// The crate's reference RL scheme — SHIPPED surface, like [`TabularTrainer`]:
/// `Reinforce::new(world, device)` trains any [`Env`], and `Signal` chooses what the returns
pub use reinforce::{ObsMemory, Reinforce, Signal, episode_start_seed};
/// Named LR schedules — the spellable half of `TabularStep::scheduled_lr`.
pub use schedule::LrSchedule;

/// The loss-function signature, aliased for readability in the trait
/// context.
pub type LossFn<'a> = &'a (
        dyn Fn(&flodl::Variable, &flodl::Variable) -> flodl::tensor::Result<flodl::Variable>
            + Send
            + Sync
    );

/// Owned (boxed) form of the loss-function signature.
pub type BoxedLossFn = Box<
    dyn Fn(&flodl::Variable, &flodl::Variable) -> flodl::tensor::Result<flodl::Variable>
        + Send
        + Sync
        + 'static,
>;