thrust_rl/train/bc/mod.rs
1//! Behavioral Cloning (BC) — supervised imitation learning.
2//!
3//! Behavioral cloning trains a policy to reproduce expert actions from a
4//! fixed dataset of `(observation, action)` pairs via supervised
5//! cross-entropy. It lands as a sibling module to [`crate::train::a2c`],
6//! reusing the same policy/optimizer infrastructure with a plain supervised
7//! epoch loop in place of an environment-interaction loop.
8//!
9//! This module is built incrementally by the BC decomposition (#161):
10//! - [`BcConfig`] — supervised hyperparameters (builder + `validate()`),
11//! mirroring [`crate::train::a2c::A2cConfig`] (#164).
12//! - [`Demonstrations`] — the fixed expert dataset serving seeded minibatches
13//! (#164).
14//! - [`compute_bc_loss`] — the supervised cross-entropy loss, and [`BcTrainer`]
15//! — the supervised epoch loop over the dataset (#167).
16
17pub mod config;
18pub mod dataset;
19pub mod loss;
20pub mod trainer;
21
22pub use config::BcConfig;
23pub use dataset::Demonstrations;
24pub use loss::compute_bc_loss;
25pub use trainer::{BcEpochStats, BcTrainer};