use std::collections::HashMap; /// A step in the environment, containing the new state, reward, and termination info #[derive(Debug, Clone)] pub struct Step { pub state: State, pub reward: Reward, pub done: bool, pub info: HashMap, } /// Environment trait for reinforcement learning pub trait Environment { type State: Clone; type Action: Clone; type Reward: Clone; /// Reset the environment to initial state fn reset(&mut self) -> Self::State; /// Take one step in the environment fn step(&mut self, action: &Self::Action) -> Step; /// Get the action space bounds (low, high) fn action_space(&self) -> (Self::Action, Self::Action); /// Get the observation space bounds (low, high) fn observation_space(&self) -> (Self::State, Self::State); }