diff --git a/highway_env/vehicle/behavior.py b/highway_env/vehicle/behavior.py index 1ac8babea..7378f63b8 100644 --- a/highway_env/vehicle/behavior.py +++ b/highway_env/vehicle/behavior.py @@ -451,7 +451,10 @@ def acceleration_features( ) -> np.ndarray: vt, dv, dp = 0, 0, 0 if ego_vehicle: - vt = getattr(ego_vehicle, "target_speed", ego_vehicle.speed) - ego_vehicle.speed + vt = ( + getattr(ego_vehicle, "target_speed", ego_vehicle.speed) + - ego_vehicle.speed + ) d_safe = ( self.DISTANCE_WANTED + np.maximum(ego_vehicle.speed, 0) * self.TIME_WANTED