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/// LSTM (recurrent) actor-critic policy — Phase 1 of the recurrent-policy
22/// epic (#262). Carries memory across timesteps via a Burn 0.21 `Lstm`
23/// trunk, with `forward_step` for rollout collection and
24/// `evaluate_sequences` for the rank-3 training forward.
25#[cfg(feature = "training")]
26pub mod lstm;
27
28/// Seeded, host-side weight-initialization helpers that make policy
29/// construction bit-exact under `PsroConfig::seed` / `NfspConfig::seed`
30/// (issue #135). Burn 0.21's `Initializer` has no seed parameter, so we
31/// pre-compute the trunk + head weights from an `StdRng` instead.
32#[cfg(feature = "training")]
33pub mod seeded_init;
34
35/// SAC stochastic Gaussian actor (tanh-squashed) for continuous control.
36#[cfg(feature = "training")]
37pub mod sac_actor;
38
39/// DQN Q-network with the same MLP backbone as `MlpPolicy` but with a
40/// single Q-head.
41#[cfg(feature = "training")]
42pub mod q_network;
43
44/// Continuous-action `Q(s, a)` critic for SAC (twin critics + targets),
45/// with hard and Polyak (soft) target-sync helpers.
46#[cfg(feature = "training")]
47pub mod continuous_q;
48
49/// 3-conv + 2-fc CNN used by the Snake trainer.
50#[cfg(feature = "training")]
51pub mod snake_cnn;
52
53/// Nature-DQN-scale CNN policies (actor-critic + Q-network) for the Atari
54/// (ALE) workload.
55#[cfg(feature = "training")]
56pub mod atari_cnn;