When designing your Reinforcement Learning agent, you will interact with the environment using standard continuous spaces. Below are the specifications for the State Space, Action Space, and the Reward signal your agent will receive.
The observation is provided to your agent as a 1D numpy.ndarray of shape (5,) with type float32. It contains the ego-centric telemetry of the drone and its spatial relationship to the goal.
| Index | Observation | Min | Max | Description |
|---|---|---|---|---|
| 0 | x_position |
-Inf |
Inf |
The absolute X coordinate of the drone. |
| 1 | y_position |
-Inf |
Inf |
The absolute Y coordinate of the drone. |
| 2 | heading |
-Inf |
Inf |
The drone's current rotational angle (in radians). |
| 3 | distance_to_target |
0.0 |
Inf |
Euclidean distance from the drone to the thermal vent. |
| 4 | angle_to_target |
-π |
π |
The relative angle between the drone's current heading and the target. |
The environment expects a continuous action vector. Your policy must output a 1D numpy.ndarray of shape (2,) with type float32, restricted to the range [-1.0, 1.0].
Note: If your algorithm outputs values outside this range, the environment will automatically clip them.
| Index | Action | Min | Max | Effect |
|---|---|---|---|---|
| 0 | steering |
-1.0 |
1.0 |
Controls rotational velocity. -1.0 is hard right, 1.0 is hard left. |
| 1 | thrust |
-1.0 |
1.0 |
Controls the forward propulsion engine. |
The environment features a sparse, penalizing reward structure designed to simulate harsh underwater navigation constraints.
Your agent will receive a float reward at each step based on the following rules:
- Time Penalty:
-0.05given every step to simulate continuous battery drain. - Catastrophic Failure:
-100.0if the drone crashes into the canyon walls (defined as straying outside the[-25.0, 25.0]coordinate bounding box). (Terminates Episode) - Mission Success:
+1000.0if the drone successfully reaches the thermal vent (defined as closing the distance to the target to< 1.0). (Terminates Episode)
Info Dictionary Hint:
The step() function also returns an info dictionary containing the current distance to the target: info["distance_to_target"]. Depending on your chosen RL algorithm, you may find this metric highly useful for implementing standard gym.RewardWrapper classes.
This environment requires gymnasium, numpy, and pygame for rendering.
pip install gymnasium numpy pygame