rlx-rl 0.2.16

Flow-map generative policies with Flow Map Q-Guidance (FMQ) and QGBS for RLX.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RLX — versatile ML compiler + runtime.
// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
// SPDX-License-Identifier: MIT OR Apache-2.0
// RLX — environment interface (no simulator bindings).

use crate::buffer::Transition;

/// Host-side MDP interface. Implement this for your simulator / robot stack.
///
/// RLX only sees [`Transition`] records; physics lives outside the compiler.
pub trait RlEnv {
    /// Initial state after reset (length = `state_dim`).
    fn reset(&mut self) -> Vec<f32>;

    /// Apply `action` (length = `action_dim`), return the transition.
    fn step(&mut self, action: &[f32]) -> Transition;
}