thrust_rl/policy/mod.rs
1//! Policy and neural network wrappers.
2//!
3//! After phase 5 of the Burn migration (#82), all policy networks live on
4//! the Burn backend. The pure-Rust WASM inference path (`inference` and
5//! `universal_inference` modules) is independent of Burn and is
6//! available without the `training` feature.
7
8pub mod inference;
9pub mod universal_inference;
10
11/// MLP actor-critic policy used by the CartPole / Pong / SimpleBandit
12/// PPO trainers.
13#[cfg(feature = "training")]
14pub mod mlp;
15
16/// Multi-discrete MLP policy used by Bucket Brigade and similar
17/// multi-discrete action spaces.
18#[cfg(feature = "training")]
19pub mod multi_discrete_mlp;
20
21/// Seeded, host-side weight-initialization helpers that make policy
22/// construction bit-exact under `PsroConfig::seed` / `NfspConfig::seed`
23/// (issue #135). Burn 0.21's `Initializer` has no seed parameter, so we
24/// pre-compute the trunk + head weights from an `StdRng` instead.
25#[cfg(feature = "training")]
26pub mod seeded_init;
27
28/// SAC stochastic Gaussian actor (tanh-squashed) for continuous control.
29#[cfg(feature = "training")]
30pub mod sac_actor;
31
32/// DQN Q-network with the same MLP backbone as `MlpPolicy` but with a
33/// single Q-head.
34#[cfg(feature = "training")]
35pub mod q_network;
36
37/// Continuous-action `Q(s, a)` critic for SAC (twin critics + targets),
38/// with hard and Polyak (soft) target-sync helpers.
39#[cfg(feature = "training")]
40pub mod continuous_q;
41
42/// 3-conv + 2-fc CNN used by the Snake trainer.
43#[cfg(feature = "training")]
44pub mod snake_cnn;