| Definition | A simple 2D racing environment using gymnasium |
| No of environments | 3 |
RacingEnv is a 2D racing environment built on the gymnasium framework, designed for reinforcement learning (RL) agents to learn and interact within a simplified racing simulation. The environment simulates a car racing around a track, where the agent’s goal is to navigate through checkpoints while avoiding obstacles. It supports customizable physics settings, multiple observation types (features or pixels), and different rendering modes for human or machine interaction.
The environment offers three main versions: one based on feature space observations, one focused on pixel-based input, and a more general version that can switch between both. Observations in the feature space include details like the agent’s position, direction, velocity, and distances to the track’s boundaries, while the pixel space provides visual input in the form of 64×64 images.
Agents receive rewards for successfully passing checkpoints in the correct order, while penalties are applied for collisions or coming to a complete stop. The physics of the environment are fully customizable, allowing users to modify key parameters such as velocity, acceleration, drag, and steering strength, giving the agent a more realistic racing experience.
Rendering can be done in several modes, including human visualization or providing visual feedback in the form of RGB arrays, with the option to adjust the resolution. This flexibility allows users to tailor the environment for different research and training needs, from visual-based agents to those learning from direct numerical features.
| Example observations | position, direction, distance to the inner/outer bound, forward velocity, angular velocity etc. |
| Example actions | change direction, accelerate etc. |
| Example reward | passing a checkpoint, hitting a wall, terminating |

