1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! BipedalWalker — 2D bipedal locomotion environment.
//!
//! Implements the BipedalWalker-v3 Gymnasium environment using Rapier2D physics.
//! The agent controls hip and knee motor velocity targets for a two-legged robot
//! walking forward over procedurally generated terrain.
//!
//! ## Spaces
//!
//! | | Type | Dim | Range |
//! |---|---|---|---|
//! | Action | Continuous | 4 | `[-1, 1]` per component |
//! | Observation | Continuous | 24 | hull kinematics + joint angles/speeds + lidar |
//!
//! ## Terrain variants
//!
//! | [`BipedalTerrain`] | Description |
//! |---|---|
//! | `Flat` | Flat horizontal surface — good for initial training |
//! | `Rough` | Randomly varying height — intermediate difficulty |
//! | `Hardcore` | Stumps, pits, and stair-like obstacles — hardest |
//!
//! ## Termination conditions
//!
//! - Hull contacts the ground → `Terminated` (−100 penalty applied).
//! - Cumulative reward < −100 → `Terminated`.
//! - Step count reaches `config.max_steps` (default 1600) → `Truncated`.
//!
//! ## Quick start
//!
//! ```rust
//! # use rlevo_environments::box2d::bipedal_walker::{
//! # BipedalWalker, BipedalWalkerAction, BipedalWalkerConfig, BipedalTerrain,
//! # };
//! # use rlevo_core::environment::{Environment, Snapshot};
//! let cfg = BipedalWalkerConfig::builder()
//! .terrain(BipedalTerrain::Rough)
//! .seed(42)
//! .build();
//! let mut env = BipedalWalker::with_config(cfg);
//! let _snap = env.reset().unwrap();
//! let snap = env.step(BipedalWalkerAction([0.1, -0.1, 0.1, -0.1])).unwrap();
//! println!("reward: {:?}", snap.reward());
//! ```
pub use BipedalWalkerAction;
pub use ;
pub use BipedalWalker;
pub use BipedalWalkerObservation;
pub use BipedalWalkerState;
pub use ;