Environment: BipedalWalker-v3. Maximize cumulative episode reward.
Resolved settings (override documentation examples): {"id": "BipedalWalker-v3", "kwargs": {"render_mode": null, "hardcore": false}, "max_episode_steps": 1600}
Observation space: Box([-3.1415927 -5.        -5.        -5.        -3.1415927 -5.
 -3.1415927 -5.        -0.        -3.1415927 -5.        -3.1415927
 -5.        -0.        -1.        -1.        -1.        -1.
 -1.        -1.        -1.        -1.        -1.        -1.       ], [3.1415927 5.        5.        5.        3.1415927 5.        3.1415927
 5.        5.        3.1415927 5.        3.1415927 5.        5.
 1.        1.        1.        1.        1.        1.        1.
 1.        1.        1.       ], (24,), float32)
Action space: Box(-1.0, 1.0, (4,), float32)
Episode limit: 1600 steps. You receive observations only, not info/action masks.
Installed Gymnasium environment documentation:
## Description
This is a simple 4-joint walker robot environment.
There are two versions:
- Normal, with slightly uneven terrain.
- Hardcore, with ladders, stumps, pitfalls.

To solve the normal version, you need to get 300 points in 1600 time steps.
To solve the hardcore version, you need 300 points in 2000 time steps.

A heuristic is provided for testing. It's also useful to get demonstrations
to learn from. To run the heuristic:
```
python gymnasium/envs/box2d/bipedal_walker.py
```

## Action Space
Actions are motor speed values in the [-1, 1] range for each of the
4 joints at both hips and knees.

## Observation Space
State consists of hull angle speed, angular velocity, horizontal speed,
vertical speed, position of joints and joints angular speed, legs contact
with ground, and 10 lidar rangefinder measurements. There are no coordinates
in the state vector.

## Rewards
Reward is given for moving forward, totaling 300+ points up to the far end.
If the robot falls, it gets -100. Applying motor torque costs a small
amount of points. A more optimal agent will get a better score.

## Starting State
The walker starts standing at the left end of the terrain with the hull
horizontal, and both legs in the same position with a slight knee angle.

## Episode Termination
The episode will terminate if the hull gets in contact with the ground or
if the walker exceeds the right end of the terrain length.

## Arguments

To use the _hardcore_ environment, you need to specify the `hardcore=True`:

```python
>>> import gymnasium as gym
>>> env = gym.make("BipedalWalker-v3", hardcore=True, render_mode="rgb_array")
>>> env
<TimeLimit<OrderEnforcing<PassiveEnvChecker<BipedalWalker<BipedalWalker-v3>>>>>

```

## Version History
- v3: Returns the closest lidar trace instead of furthest;
    faster video recording
- v2: Count energy spent
- v1: Legs now report contact with ground; motors have higher torque and
    speed; ground has higher friction; lidar rendered less nervously.
- v0: Initial version


<!-- ## References -->

## Credits
Created by Oleg Klimov

Implementation details for both BipedalWalker variants (override vague documentation):
The float32 observation has 24 entries, with angles in radians:
[0] hull angle; [1] hull angular velocity * 2 / 50;
[2] horizontal velocity * 0.12; [3] vertical velocity * 0.08;
[4] first hip angle; [5] first hip angular velocity / 4;
[6] first knee angle + 1; [7] first knee angular velocity / 6;
[8] first lower-leg ground contact (0 or 1);
[9] second hip angle; [10] second hip angular velocity / 4;
[11] second knee angle + 1; [12] second knee angular velocity / 6;
[13] second lower-leg ground contact (0 or 1);
[14:24] ten lidar hit fractions in [0, 1], with 1 meaning no hit within range.
Ray i=0..9 points from the hull along (sin(0.15*i), -cos(0.15*i)),
with range 160/30 world units. Absolute position is not observed.
Action is a float32 vector of shape (4,) in [-1, 1], ordered
[first hip, first knee, second hip, second knee]. Each sign sets motor direction;
absolute magnitude sets the torque limit to 80*abs(action), rather than scaling
motor speed continuously. Hip speed magnitude is 4, knee speed magnitude is 6.
Simulation timestep is 1/50 second. Reward is the change in
130*x/30 - 5*abs(hull angle), minus 0.028*sum(abs(action)).
Hull-ground contact or x<0 ends the episode with reward -100 for that step;
reaching the terrain's right end also terminates. The step cap truncates episodes.


Evaluation contract (takes precedence over documentation examples):
Maximize the arithmetic mean of undiscounted cumulative episode rewards across the fixed search seed panel. Higher is better, including when all rewards are negative.
Stop after a completed generation when the best elite has mean search reward >= 300.
Held-out episodes are for reporting only and never guide selection or stopping.
Wall-clock evaluation limit: 10 seconds per episode, per seed, for the worker to return its episode result. Policy initialization and environment steps must fit this limit. Docker startup, queueing and final process cleanup are outside this limit. This is not a total budget across all seeds.
Call limit: 10 seconds per policy call (act/reset/close), also subject to the episode limit. Keep all computation bounded.
A timeout is an evaluation failure, not a truncated successful episode or a zero reward. Search-time failures enter the repair loop, within the repair budget.
The policy receives observations, not rewards or info/action masks; episode state must be reset between episodes. Evaluation feedback reaches the LLM between proposals.
