A collection of environments for autonomous driving and tactical decision-making tasks
This report presents the forensic synthetic code analysis of Farama-Foundation/HighwayEnv, a Python project with 3,291 GitHub stars. SynthScan v2.0 examined 19,424 lines of code across 123 source files, recording 200 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 16.1 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 200 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 17 | def test_rotated_rectangles_intersect(): | CODE |
| LOW | tests/test_utils.py | 36 | def test_confidence_ellipsoid(linear_regression_data): | CODE |
| LOW⚡ | tests/test_utils.py | 56 | def test_is_valid_observation(linear_regression_data): | CODE |
| LOW⚡ | tests/test_utils.py | 65 | def test_is_consistent_dataset_single_point(): | CODE |
| LOW⚡ | tests/test_utils.py | 70 | def test_is_consistent_dataset_multiple_points(linear_regression_data): | CODE |
| LOW⚡ | tests/test_utils.py | 80 | def test_near_split_size_bins(): | CODE |
| LOW⚡ | tests/test_utils.py | 85 | def test_distance_to_circle_hit(): | CODE |
| LOW⚡ | tests/test_utils.py | 92 | def test_distance_to_circle_inside(): | CODE |
| LOW⚡ | tests/test_utils.py | 98 | def test_distance_to_circle_miss(): | CODE |
| LOW⚡ | tests/test_utils.py | 104 | def test_distance_to_rect_intersection(): | CODE |
| LOW | tests/test_utils.py | 115 | def test_distance_to_rect_no_intersection(): | CODE |
| LOW | tests/vehicle/test_behavior.py | 12 | def test_stop_before_obstacle(vehicle_type): | CODE |
| LOW | tests/road/test_road.py | 43 | def test_network_to_from_config(net): | CODE |
| LOW⚡ | tests/road/test_neighbour_vehicles.py | 31 | def _enable_connected_lane_search(road: Road) -> None: | CODE |
| LOW⚡ | tests/road/test_neighbour_vehicles.py | 162 | def test_front_and_rear_on_same_segment(self, straight_connected_road): | CODE |
| LOW⚡ | tests/road/test_neighbour_vehicles.py | 198 | def test_connected_segments_ignored_by_default(self, straight_connected_road): | CODE |
| LOW⚡ | tests/road/test_neighbour_vehicles.py | 216 | def test_front_on_next_segment(self, straight_connected_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 228 | def test_rear_on_previous_segment(self, straight_connected_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 240 | def test_front_on_curve_segment(self, straight_curve_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 252 | def test_closer_same_segment_preferred_over_next_segment( | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 270 | def test_both_connected_front_and_rear(self, three_segment_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 282 | def test_multi_lane_same_lane_id(self, multi_lane_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 348 | def test_vehicle_far_on_next_segment_detected(self, straight_connected_road): | CODE |
| LOW | tests/road/test_neighbour_vehicles.py | 358 | def test_lane_index_none_returns_none(self, straight_connected_road): | CODE |
| LOW | tests/road/test_spline.py | 59 | def test_single_element_array(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 89 | def test_epsilon_outside_left(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 96 | def test_epsilon_inside_right(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 103 | def test_epsilon_outside_right(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 114 | def test_large_extrapolation_left(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 121 | def test_large_extrapolation_right(self, simple_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 128 | def test_two_point_interpolation(self, two_point_data): | CODE |
| LOW⚡ | tests/road/test_spline.py | 135 | def test_two_point_extrapolation(self, two_point_data): | CODE |
| LOW | tests/road/test_spline.py | 159 | def test_mixed_extrapolation_array(self, simple_data): | CODE |
| LOW | tests/road/test_spline.py | 184 | def test_roundtrip_cartesian_frenet(self, spline): | CODE |
| LOW⚡ | tests/graphics/test_gym_render_mode.py | 22 | def test_none_derives_offscreen(self): | CODE |
| LOW⚡ | tests/graphics/test_gym_render_mode.py | 28 | def test_rgb_array_derives_offscreen(self): | CODE |
| LOW⚡ | tests/graphics/test_gym_render_mode.py | 35 | def test_human_derives_onscreen(self): | CODE |
| LOW⚡ | tests/graphics/test_gym_render_mode.py | 41 | def test_explicit_override_respected(self): | CODE |
| LOW | tests/graphics/test_gym_render_mode.py | 57 | def test_rgb_array_returns_ndarray(self): | CODE |
| LOW | tests/graphics/test_gym_render_mode.py | 78 | def test_rgb_array_with_window_still_returns_ndarray(self): | CODE |
| LOW | tests/graphics/test_gym_render_mode.py | 88 | def test_human_with_offscreen_returns_none(self): | CODE |
| LOW | tests/graphics/test_gym_render_mode.py | 99 | def test_offscreen_env_var_emits_warning(self): | CODE |
| LOW | tests/envs/test_gym.py | 120 | def test_connected_lane_neighbour_versions(old_env_spec, new_env_spec): | CODE |
| LOW | tests/envs/test_gym.py | 151 | def test_env_vectorization__info_dtype_is_float(env_spec): | CODE |
| LOW | tests/envs/test_finite_mdp.py | 13 | def test_clip_position_clips_to_grid_bounds(): | CODE |
| LOW | tests/envs/test_finite_mdp.py | 20 | def test_transition_model_via_fromfunction(): | CODE |
| LOW | tests/envs/test_finite_mdp.py | 34 | def test_compute_ttc_grid_on_highway_env(): | CODE |
| LOW | tests/envs/test_finite_mdp.py | 49 | def test_compute_ttc_grid_predicts_collision(): | CODE |
| LOW⚡ | scripts/sb3_highway_ppo_transformer.py | 303 | def display_vehicles_attention( | CODE |
| LOW | scripts/sb3_highway_ppo_transformer.py | 338 | def compute_vehicles_attention(env, model): | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 326 | def original_neighbour_vehicles( | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 364 | def patch_original_neighbour_vehicles(road: Road) -> None: | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 469 | def _has_same_segment_vehicle(road, ego, direction: str) -> bool: | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 499 | def _find_connected_lane_vehicle(road, ego, direction: str = "front"): | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 556 | def _missed_connected_neighbour(road, ego, detected, reference, direction: str) -> bool: | CODE |
| LOW | scripts/validate/compare_neighbour_detection.py | 567 | def _draw_missed_neighbour_cue( | CODE |
| LOW | highway_env/interval.py | 107 | def interval_absolute_to_local( | CODE |
| LOW | highway_env/interval.py | 131 | def interval_local_to_absolute( | CODE |
| LOW | highway_env/utils.py | 75 | def point_in_rotated_rectangle( | CODE |
| LOW | highway_env/utils.py | 113 | def rotated_rectangles_intersect( | CODE |
| 16 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 35 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 37 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 154 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 156 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 208 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/road/test_neighbour_vehicles.py | 210 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/road/test_neighbour_vehicles.py | 298 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/road/test_neighbour_vehicles.py | 300 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo.py | 9 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo.py | 11 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 21 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 23 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 270 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 272 | # ================================== | COMMENT |
| MEDIUM⚡ | scripts/sb3_highway_ppo_transformer.py | 298 | # ================================== | COMMENT |
| MEDIUM⚡ | scripts/sb3_highway_ppo_transformer.py | 300 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 368 | # ================================== | COMMENT |
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 370 | # ================================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | highway_env/vehicle/kinematics.py | 0 | create a new vehicle from an existing one. the vehicle dynamics and target dynamics are copied, other properties are def | STRING |
| HIGH | highway_env/vehicle/controller.py | 0 | create a new vehicle from an existing one. the vehicle dynamics and target dynamics are copied, other properties are def | STRING |
| HIGH | highway_env/vehicle/behavior.py | 0 | create a new vehicle from an existing one. the vehicle dynamics and target dynamics are copied, other properties are def | STRING |
| HIGH | highway_env/envs/racetrack_env.py | 0 | populate a road with several vehicles on the highway and on the merging lane, as well as an ego-vehicle. :return: the eg | STRING |
| HIGH | highway_env/envs/merge_env.py | 0 | populate a road with several vehicles on the highway and on the merging lane, as well as an ego-vehicle. :return: the eg | STRING |
| HIGH | highway_env/envs/roundabout_env.py | 0 | populate a road with several vehicles on the highway and on the merging lane, as well as an ego-vehicle. :return: the eg | STRING |
| HIGH | highway_env/envs/intersection_env.py | 0 | the episode is truncated if the time limit is reached. | STRING |
| HIGH | highway_env/envs/highway_env.py | 0 | the episode is truncated if the time limit is reached. | STRING |
| HIGH | highway_env/envs/exit_env.py | 0 | the episode is truncated if the time limit is reached. | STRING |
| HIGH | highway_env/envs/highway_env.py | 0 | create some new random vehicles of a given type, and add them on the road. | STRING |
| HIGH | highway_env/envs/parking_env.py | 0 | create some new random vehicles of a given type, and add them on the road. | STRING |
| HIGH | highway_env/envs/exit_env.py | 0 | create some new random vehicles of a given type, and add them on the road. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 21 | CODE | |
| LOW | docs/scripts/move_404.py | 1 | CODE | |
| LOW | scripts/sb3_highway_dqn_cnn.py | 5 | CODE | |
| LOW | scripts/sb3_highway_ppo.py | 6 | CODE | |
| LOW | scripts/sb3_highway_dqn.py | 5 | CODE | |
| LOW | scripts/sb3_highway_ppo_transformer.py | 17 | CODE | |
| LOW | scripts/sb3_racetrack_oval_ppo.py | 9 | CODE | |
| LOW | scripts/sb3_racetracks_ppo.py | 7 | CODE | |
| LOW | highway_env/interval.py | 1 | CODE | |
| LOW | highway_env/utils.py | 1 | CODE | |
| LOW | highway_env/vehicle/graphics.py | 1 | CODE | |
| LOW | highway_env/vehicle/kinematics.py | 1 | CODE | |
| LOW | highway_env/vehicle/behavior.py | 1 | CODE | |
| LOW | highway_env/vehicle/objects.py | 1 | CODE | |
| LOW | highway_env/vehicle/dynamics.py | 1 | CODE | |
| LOW | highway_env/vehicle/uncertainty/estimation.py | 1 | CODE | |
| LOW | highway_env/vehicle/uncertainty/prediction.py | 1 | CODE | |
| LOW | highway_env/road/graphics.py | 1 | CODE | |
| LOW | highway_env/road/spline.py | 1 | CODE | |
| LOW | highway_env/road/regulation.py | 1 | CODE | |
| LOW | highway_env/road/road.py | 1 | CODE | |
| LOW | highway_env/road/lane.py | 1 | CODE | |
| LOW | highway_env/envs/u_turn_env.py | 1 | CODE | |
| LOW | highway_env/envs/racetrack_env.py | 1 | CODE | |
| LOW | highway_env/envs/merge_env.py | 1 | CODE | |
| LOW | highway_env/envs/lane_keeping_env.py | 1 | CODE | |
| LOW | highway_env/envs/intersection_env.py | 1 | CODE | |
| LOW | highway_env/envs/__init__.py | 1 | CODE | |
| LOW | highway_env/envs/__init__.py | 2 | CODE | |
| LOW | highway_env/envs/__init__.py | 2 | CODE | |
| LOW | highway_env/envs/__init__.py | 3 | CODE | |
| LOW | highway_env/envs/__init__.py | 3 | CODE | |
| LOW | highway_env/envs/__init__.py | 3 | CODE | |
| LOW | highway_env/envs/__init__.py | 8 | CODE | |
| LOW | highway_env/envs/__init__.py | 9 | CODE | |
| LOW | highway_env/envs/__init__.py | 10 | CODE | |
| LOW | highway_env/envs/__init__.py | 10 | CODE | |
| LOW | highway_env/envs/__init__.py | 10 | CODE | |
| LOW | highway_env/envs/__init__.py | 15 | CODE | |
| LOW | highway_env/envs/__init__.py | 16 | CODE | |
| LOW | highway_env/envs/__init__.py | 17 | CODE | |
| LOW | highway_env/envs/__init__.py | 18 | CODE | |
| LOW | highway_env/envs/highway_env.py | 1 | CODE | |
| LOW | highway_env/envs/two_way_env.py | 1 | CODE | |
| LOW | highway_env/envs/roundabout_env.py | 1 | CODE | |
| LOW | highway_env/envs/parking_env.py | 1 | CODE | |
| LOW | highway_env/envs/exit_env.py | 1 | CODE | |
| LOW | highway_env/envs/common/abstract.py | 1 | CODE | |
| LOW | highway_env/envs/common/graphics.py | 1 | CODE | |
| LOW | highway_env/envs/common/observation.py | 1 | CODE | |
| LOW | highway_env/envs/common/action.py | 1 | CODE | |
| LOW | highway_env/envs/common/finite_mdp.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/validate/compare_neighbour_detection.py | 161 | CODE | |
| LOW | scripts/validate/compare_neighbour_detection.py | 427 | CODE | |
| LOW | scripts/validate/compare_neighbour_detection.py | 499 | CODE | |
| LOW | highway_env/interval.py | 271 | CODE | |
| LOW | highway_env/vehicle/graphics.py | 232 | CODE | |
| LOW | highway_env/vehicle/controller.py | 89 | CODE | |
| LOW | highway_env/vehicle/behavior.py | 219 | CODE | |
| LOW | highway_env/vehicle/objects.py | 91 | CODE | |
| LOW | highway_env/vehicle/uncertainty/estimation.py | 79 | CODE | |
| LOW | highway_env/vehicle/uncertainty/prediction.py | 364 | CODE | |
| LOW | highway_env/road/graphics.py | 127 | CODE | |
| LOW | highway_env/road/regulation.py | 42 | CODE | |
| LOW | highway_env/road/road.py | 159 | CODE | |
| LOW | highway_env/road/road.py | 483 | CODE | |
| LOW | highway_env/envs/racetrack_env.py | 371 | CODE | |
| LOW | highway_env/envs/racetrack_env.py | 1336 | CODE | |
| LOW | highway_env/envs/roundabout_env.py | 419 | CODE | |
| LOW | highway_env/envs/roundabout_env.py | 662 | CODE | |
| LOW | highway_env/envs/common/observation.py | 772 | CODE | |
| LOW | highway_env/envs/common/observation.py | 354 | CODE | |
| LOW | highway_env/envs/common/observation.py | 454 | CODE | |
| LOW | highway_env/envs/common/observation.py | 486 | CODE | |
| LOW | highway_env/envs/common/finite_mdp.py | 104 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | highway_env/interval.py | 237 | def update_coordinates_frame(self, a0: np.ndarray) -> None: | CODE |
| LOW | highway_env/interval.py | 264 | def set_control(self, control: np.ndarray, state: np.ndarray = None) -> None: | CODE |
| LOW | highway_env/vehicle/controller.py | 221 | def set_route_at_intersection(self, _to: int) -> None: | CODE |
| LOW | highway_env/vehicle/uncertainty/estimation.py | 79 | def update_possible_routes(self) -> None: | CODE |
| LOW | highway_env/road/road.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | highway_env/envs/__init__.py | 21 | __all__ = [ | CODE |
| LOW | highway_env/envs/common/graphics.py | 66 | def set_agent_display(self, agent_display: Callable) -> None: | CODE |
| LOW | highway_env/envs/common/graphics.py | 92 | def set_agent_action_sequence(self, actions: list[Action]) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/sb3_highway_dqn.py | 11 | # Create the environment | COMMENT |
| MEDIUM | scripts/sb3_highway_dqn.py | 15 | # Create the model | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | highway_env/vehicle/behavior.py | 374 | CODE | |
| LOW | highway_env/vehicle/uncertainty/estimation.py | 41 | CODE | |
| LOW | highway_env/vehicle/uncertainty/prediction.py | 42 | CODE | |
| LOW | highway_env/envs/common/observation.py | 160 | CODE | |
| LOW | highway_env/envs/common/observation.py | 286 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/envs/test_multiprocessing.py | 30 | except Exception as exc: | CODE |
| LOW | highway_env/__init__.py | 15 | except Exception: # nosec | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/sb3_highway_ppo_transformer.py | 347 | if hasattr(obs_type, "agents_observation_types"): # Handle multi-agent observation | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 1 | # Configuration file for the Sphinx documentation builder. | COMMENT |