Repository Analysis

Farama-Foundation/PettingZoo

A standard API for multi-agent reinforcement learning environments, with popular reference environments and related utilities

16.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Farama-Foundation/PettingZoo, a Python project with 3,486 GitHub stars. SynthScan v2.0 examined 34,886 lines of code across 325 source files, recording 473 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 16.2 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).

16.2
Adjusted Score
16.2
Raw Score
100%
Time Factor
2026-08-01
Last Push
3.5K
Stars
Python
Language
34.9K
Lines of Code
325
Files
473
Pattern Hits
2026-08-02
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 6MEDIUM 28LOW 439

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 473 distinct pattern matches across 15 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.

Unused Imports231 hits · 231 pts
SeverityFileLineSnippetContext
LOWtest/wrapper_record_video_test.py1CODE
LOWtest/unwrapped_test.py1CODE
LOWtest/pickle_test.py1CODE
LOWtest/wrapper_test.py1CODE
LOWtest/all_parameter_combs_test.py1CODE
LOWtest/doc_examples_test.py1CODE
LOWtest/variable_env_test.py1CODE
LOWtest/pygame_init_test.py1CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py5CODE
LOWpettingzoo/__init__.py14CODE
LOWpettingzoo/__init__.py14CODE
LOWpettingzoo/butterfly/knights_archers_zombies_v11.py3CODE
LOWpettingzoo/butterfly/knights_archers_zombies_v11.py3CODE
LOWpettingzoo/butterfly/knights_archers_zombies_v11.py3CODE
LOWpettingzoo/butterfly/knights_archers_zombies_v11.py8CODE
LOWpettingzoo/butterfly/pistonball_v6.py3CODE
LOWpettingzoo/butterfly/pistonball_v6.py3CODE
LOWpettingzoo/butterfly/pistonball_v6.py3CODE
LOWpettingzoo/butterfly/pistonball_v6.py3CODE
LOWpettingzoo/butterfly/cooperative_pong_v6.py3CODE
LOWpettingzoo/butterfly/cooperative_pong_v6.py3CODE
LOWpettingzoo/butterfly/cooperative_pong_v6.py3CODE
LOWpettingzoo/butterfly/cooperative_pong_v6.py8CODE
LOWpettingzoo/butterfly/pistonball/pistonball.py95CODE
LOW…tingzoo/butterfly/cooperative_pong/cooperative_pong.py92CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py186CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py3CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/players.py3CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/weapons.py13CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/weapons.py13CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/weapons.py13CODE
LOWpettingzoo/test/parallel_test.py1CODE
LOWpettingzoo/test/seed_test.py1CODE
LOWpettingzoo/test/__init__.py1CODE
LOWpettingzoo/test/__init__.py2CODE
LOWpettingzoo/test/__init__.py3CODE
LOWpettingzoo/test/__init__.py4CODE
LOWpettingzoo/test/__init__.py5CODE
LOWpettingzoo/test/__init__.py6CODE
LOWpettingzoo/test/__init__.py7CODE
LOWpettingzoo/test/__init__.py7CODE
LOWpettingzoo/test/__init__.py8CODE
LOWpettingzoo/test/__init__.py9CODE
LOWpettingzoo/test/__init__.py9CODE
LOWpettingzoo/test/__init__.py10CODE
LOWpettingzoo/test/state_test.py3CODE
LOWpettingzoo/test/save_obs_test.py1CODE
LOWpettingzoo/test/render_test.py1CODE
LOWpettingzoo/test/api_test.py1CODE
LOWpettingzoo/classic/chess_v6.py3CODE
LOWpettingzoo/classic/chess_v6.py3CODE
LOWpettingzoo/classic/connect_four_v3.py3CODE
LOWpettingzoo/classic/connect_four_v3.py3CODE
LOWpettingzoo/classic/go_v5.py3CODE
171 more matches not shown…
Hyper-Verbose Identifiers77 hits · 86 pts
SeverityFileLineSnippetContext
LOWconftest.py1def pytest_markdown_docs_globals():CODE
LOWtest/deprecated_module_test.py7def test_removed_env_raises_with_guidance():CODE
LOWtest/deprecated_module_test.py13def test_unknown_env_raises_attribute_error():CODE
LOWtest/deprecated_module_test.py19def test_getattr_default_still_works():CODE
LOWtest/deprecated_module_test.py24def test_outdated_version_still_deprecated():CODE
LOWtest/wrapper_record_video_test.py11def test_video_folder_and_filenames_base(CODE
LOWtest/wrapper_record_video_test.py47def test_video_folder_and_filenames_parallel(CODE
LOWtest/test_registry.py75 def test_pettingzoo_suffix_to_gymnasium_suffix(self):CODE
LOWtest/test_registry.py78 def test_internal_underscore_in_name_is_preserved(self):CODE
LOWtest/test_registry.py84 def test_non_version_suffix_is_preserved(self):CODE
LOWtest/test_registry.py110 def test_register_warns_on_override(self):CODE
LOWtest/test_registry.py116 def test_register_with_kwargs(self):CODE
LOWtest/test_registry.py121 def test_register_normalizes_pettingzoo_version_suffix(self):CODE
LOWtest/test_registry.py181 def test_builtin_canonical_id_uses_gymnasium_suffix(self):CODE
LOWtest/test_registry.py187 def test_builtin_pettingzoo_suffix_alias_resolves(self):CODE
LOWtest/test_registry.py193 def test_builtin_unversioned_resolves_latest(self):CODE
LOWtest/test_registry.py201 def test_unversioned_exact_match(self):CODE
LOWtest/test_registry.py208 def test_unversioned_namespace_not_found(self):CODE
LOWtest/test_registry.py212 def test_unversioned_name_not_found_no_namespace(self):CODE
LOWtest/test_registry.py222 def test_load_env_creator_none(self):CODE
LOWtest/test_registry.py228 def test_load_env_creator_string_success(self):CODE
LOWtest/test_registry.py234 def test_load_env_creator_non_callable(self):CODE
LOWtest/test_registry.py26 def test_simple_name_with_version(self):CODE
LOWtest/test_registry.py32 def test_namespaced_with_version(self):CODE
LOWtest/test_registry.py50 def test_pettingzoo_version_suffix_alias(self):CODE
LOWtest/test_registry.py56 def test_no_namespace_no_version(self):CODE
LOWtest/test_registry.py150 def test_explicit_pettingzoo_version_suffix_alias(self):CODE
LOWtest/test_registry.py267 def test_envspec_make_with_max_cycles(self):CODE
LOWtest/test_registry.py301 def test_make_with_envspec_directly(self):CODE
LOWtest/test_registry.py327 def test_make_max_cycles_override(self):CODE
LOWtest/test_registry.py354 def test_make_max_cycles_disable(self):CODE
LOWtest/test_registry.py387 def test_make_type_mismatch_warns(self):CODE
LOWtest/test_registry.py452 def test_make_kwargs_override(self):CODE
LOWtest/wrapper_test.py16def test_multi_episode_env_wrapper(num_episodes: int) -> None:CODE
LOWtest/wrapper_test.py50def test_multi_episode_parallel_env_wrapper(num_episodes) -> None:CODE
LOWtest/doc_examples_test.py12def test_rps_parallel_example():CODE
LOWtest/variable_env_test.py17def test_generated_agents_aec():CODE
LOWtest/variable_env_test.py26def test_generated_agents_parallel():CODE
LOWtest/variable_env_test.py35def test_generated_agents_parallel_to_aec():CODE
LOWtest/variable_env_test.py49def test_double_conversion_equals():CODE
LOWtest/pygame_init_test.py40def test_no_pygame_subsystem_init_without_rendering(env_module):CODE
LOWtest/pygame_init_test.py65def test_rgb_array_render_does_not_init_audio(env_module):CODE
LOWpettingzoo/butterfly/cooperative_pong/paddle.py125 def _process_collision_with_rect(CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py408 def _build_observation_spaces(self) -> dict[AgentID, gymnasium.spaces.Space[Any]]:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py75def test_kaz_image_observation() -> None:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py184def test_kaz_vector_masked_obs() -> None:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py195def test_kaz_vector_sequence_obs() -> None:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py223def test_kaz_agent_management() -> None:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py461def test_kaz_is_archer_is_knight() -> None:CODE
LOW…ttingzoo/butterfly/knights_archers_zombies/test_kaz.py471def test_kaz_player_directions() -> None:CODE
LOWpettingzoo/test/seed_test.py18def check_environment_deterministic(env1, env2, num_cycles):CODE
LOWpettingzoo/test/seed_test.py82def check_environment_deterministic_parallel(env1, env2, num_cycles):CODE
LOWpettingzoo/test/api_test.py217def test_observation_action_spaces(env, agent_0):CODE
LOWpettingzoo/test/api_test.py371def test_rewards_terminations_truncations(env, agent_0):CODE
LOWpettingzoo/test/api_test.py385def _test_observation_space_compatibility(CODE
LOWpettingzoo/classic/hanabi/hanabi.py359 def _raise_error_if_config_values_out_of_range(CODE
LOWpettingzoo/classic/go/go.py213 def _overwrite_go_global_variables(self, board_size: int):STRING
LOWpettingzoo/classic/tictactoe/test_board.py73def test_tictactoe_board_games(values: dict[str, Any]) -> None:CODE
LOWpettingzoo/classic/tictactoe/test_board.py90def test_tictactoe_winning_boards() -> None:CODE
LOWpettingzoo/utils/env_logger.py50 def error_possible_agents_attribute_missing(name: str) -> None:CODE
17 more matches not shown…
Deep Nesting48 hits · 48 pts
SeverityFileLineSnippetContext
LOWtest/action_mask_test.py18CODE
LOWtest/print_test.py4CODE
LOWpettingzoo/butterfly/pistonball/manual_policy.py21CODE
LOW…tingzoo/butterfly/cooperative_pong/cooperative_pong.py377CODE
LOWpettingzoo/butterfly/cooperative_pong/manual_policy.py50CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py491CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py640CODE
LOW…zoo/butterfly/knights_archers_zombies/manual_policy.py23CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/players.py69CODE
LOWpettingzoo/test/parallel_test.py26CODE
LOWpettingzoo/test/performance_benchmark.py7CODE
LOWpettingzoo/test/bombardment_test.py35CODE
LOWpettingzoo/test/render_test.py9CODE
LOWpettingzoo/test/api_test.py425CODE
LOWpettingzoo/test/api_test.py553CODE
LOW…mple_envs/generated_agents_parallel_cust_agentid_v0.py115CODE
LOWpettingzoo/test/example_envs/generated_agents_env_v0.py112CODE
LOW…gzoo/test/example_envs/generated_agents_parallel_v0.py115CODE
LOW…ample_envs/generated_agents_env_action_mask_info_v0.py118CODE
LOW…xample_envs/generated_agents_env_action_mask_obs_v0.py120CODE
LOW…t/example_envs/generated_agents_env_cust_agentid_v0.py112CODE
LOWpettingzoo/classic/hanabi/rendering.py58CODE
LOWpettingzoo/classic/go/go_base.py108CODE
LOWpettingzoo/classic/go/go.py337CODE
LOWpettingzoo/classic/rps/rps.py220CODE
LOWpettingzoo/classic/rps/rps.py452CODE
LOWpettingzoo/classic/rlcard_envs/texas_holdem.py138CODE
LOWpettingzoo/classic/rlcard_envs/leduc_holdem.py124CODE
LOWpettingzoo/classic/chess/chess_utils.py74CODE
LOWpettingzoo/utils/average_total_reward.py11CODE
LOWpettingzoo/utils/random_demo.py11CODE
LOWpettingzoo/utils/deprecated_module.py56CODE
LOWpettingzoo/sisl/pursuit/pursuit_base.py535CODE
LOWpettingzoo/sisl/pursuit/manual_policy.py22CODE
LOWpettingzoo/sisl/pursuit/utils/agent_utils.py65CODE
LOWpettingzoo/sisl/pursuit/utils/two_d_maps.py5CODE
LOWpettingzoo/sisl/multiwalker/multiwalker_base.py59CODE
LOWpettingzoo/sisl/multiwalker/multiwalker_base.py85CODE
LOWpettingzoo/sisl/multiwalker/multiwalker_base.py570CODE
LOWpettingzoo/sisl/multiwalker/multiwalker_base.py742CODE
LOWdocs/_scripts/generate_gif_image.py12CODE
LOWdocs/_scripts/graph_gen.py9CODE
LOWdocs/_scripts/gen_envs_docstrings.py12CODE
LOWtutorials/AgileRL/agilerl_dqn_curriculum.py41CODE
LOW…rials/SB3/connect_four/sb3_connect_four_action_mask.py107CODE
LOWtutorials/SB3/pistonball/sb3_pistonball_vector.py69CODE
LOW…rials/CustomEnvironment/tutorial2_adding_game_logic.py86CODE
LOWtutorials/CustomEnvironment/tutorial3_action_masking.py93CODE
Modern Structural Boilerplate48 hits · 48 pts
SeverityFileLineSnippetContext
LOWpettingzoo/__init__.py16__all__ = [CODE
LOWpettingzoo/butterfly/knights_archers_zombies_v11.py13__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/butterfly/pistonball_v6.py13__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/butterfly/cooperative_pong_v6.py13__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/butterfly/pistonball/pistonball.py101__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOW…tingzoo/butterfly/cooperative_pong/cooperative_pong.py113__all__ = ["env", "parallel_env", "raw_env"]CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py220__all__ = ["env", "parallel_env", "raw_env"]CODE
LOW…ngzoo/butterfly/knights_archers_zombies/src/players.py115 def _update_image(self) -> None:CODE
LOWpettingzoo/classic/chess_v6.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/connect_four_v3.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/go_v5.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/texas_holdem_v4.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/tictactoe_v3.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/leduc_holdem_v4.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/rps_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/classic/hanabi_v5.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/classic/texas_holdem_no_limit_v6.py8__all__ = ["env", "raw_env"]CODE
LOWpettingzoo/atari/ice_hockey_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/joust_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/warlords_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/double_dunk_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/basketball_pong_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/entombed_competitive_v3.py12__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/surround_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/space_war_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/video_checkers_v4.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/pong_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/combat_tank_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/space_invaders_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/volleyball_pong_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/foozpong_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/othello_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/mario_bros_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/maze_craze_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/quadrapong_v4.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/entombed_cooperative_v3.py12__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/combat_plane_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/flag_capture_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/tennis_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/wizard_of_wor_v3.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/atari/base_atari_env.py20__all__ = [CODE
LOWpettingzoo/atari/boxing_v2.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/utils/__init__.py21__all__ = [CODE
LOWpettingzoo/utils/wrappers/__init__.py13__all__ = [CODE
LOWpettingzoo/sisl/multiwalker_v9.py8__all__ = ["env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/sisl/pursuit_v5.py8__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOWpettingzoo/sisl/pursuit/pursuit.py97__all__ = ["ManualPolicy", "env", "parallel_env", "raw_env"]CODE
LOWtutorials/AgileRL/agilerl_dqn_curriculum.py358 def update_top(self) -> None:CODE
Self-Referential Comments14 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMtutorials/AgileRL/agilerl_dqn_curriculum.py542 # Define the network configurationCOMMENT
MEDIUMtutorials/AgileRL/agilerl_dqn_curriculum.py554 # Define the initial hyperparametersCOMMENT
MEDIUMtutorials/AgileRL/agilerl_dqn_curriculum.py578 # Define the connect four environmentCOMMENT
MEDIUMtutorials/AgileRL/agilerl_dqn_curriculum.py606 # Create a population ready for evolutionary hyper-parameter optimisationCOMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py24 # Define the network configurationCOMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py31 # Define the initial hyperparametersCOMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py53 # Define the simple speaker listener environment as a parallel environmentCOMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py80 # Create a population ready for evolutionary hyper-parameter optimisationCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py24 # Define the network configurationCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py34 # Define the initial hyperparametersCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py55 # Define the space invaders environment as a parallel environmentCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py89 # Create a population ready for evolutionary hyper-parameter optimisationCOMMENT
MEDIUMtutorials/Tianshou/2_training_agents.py65 """This function is needed to provide callables for DummyVectorEnv."""STRING
MEDIUMtutorials/CleanRL/cleanrl_advanced.py382 # Create a fresh non-vectorized Atari env with RGB rendering.COMMENT
Modern AI Meta-Vocabulary13 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMpettingzoo/sisl/pursuit/utils/agent_utils.py6# Implements utility functions for multi-agent DRLCOMMENT
MEDIUMpettingzoo/sisl/pursuit/utils/controllers.py6# Implements multi-agent controllersCOMMENT
MEDIUMdocs/environments/third_party_envs.md353[//]: # (Set of two environments with numerous multi-agent equilibria popular with researchers)CODE
MEDIUMdocs/api/parallel.md8In addition to the main API, we have a secondary parallel API for environments where all agents have simultaneous actionCODE
MEDIUMdocs/api/wrappers/supersuit_wrappers.md123[//]: # (Note that a multi-agent environment has a similar interface to a vector environment. Give each possible agent aCODE
MEDIUMdocs/api/wrappers/supersuit_wrappers.md226[//]: # (* `action_lambda_v1(env, change_action_fn, change_space_fn)` allows you to define arbitrary changes to CODE
MEDIUMdocs/api/wrappers/supersuit_wrappers.md229[//]: # (* `observation_lambda_v0(env, observation_fn, observation_space_fn)` allows you to define arbitrary chaCODE
MEDIUMdocs/api/wrappers/shimmy_wrappers.md9## Supported multi-agent environments:COMMENT
MEDIUMdocs/tutorials/rllib/index.md19 * [PettingZoo Env](https://docs.ray.io/en/latest/rllib/rllib-env.html#pettingzoo-multi-agent-environments)COMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py58 # Configure the multi-agent algo input argumentsCOMMENT
MEDIUMtutorials/AgileRL/agilerl_matd3.py93 # Configure the multi-agent replay bufferCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py68 # Configure the multi-agent algo input argumentsCOMMENT
MEDIUMtutorials/AgileRL/agilerl_maddpg.py102 # Configure the multi-agent replay bufferCOMMENT
Cross-Language Confusion5 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpettingzoo/classic/hanabi/rendering.py12 R1 || XX|RYGWB12345STRING
HIGHpettingzoo/classic/hanabi/rendering.py15 Y3 || XX|RYGWB12345STRING
HIGHpettingzoo/classic/chess/chess.py277 self.board.push(chosen_move)CODE
HIGHpettingzoo/classic/chess/chess_utils.py259 if (history_idx < 0 && fill_empty_history == FillEmptyHistory::NO) break;STRING
HIGHpettingzoo/classic/chess/chess_utils.py261 if (history_idx < 0 && fill_empty_history == FillEmptyHistory::FEN_ONLY &&STRING
Verbosity Indicators6 hits · 14 pts
SeverityFileLineSnippetContext
LOWtutorials/Tianshou/1_basic_api_usage.py19 # Step 1: Load the PettingZoo environmentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py22 # Step 2: Wrap the environment for Tianshou interfacingCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py25 # Step 3: Define policies for each agentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py28 # Step 4: Convert the env to vector formatCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py31 # Step 5: Construct the Collector, which interfaces the policies with the vectorised environmentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py34 # Step 6: Execute the environment with the agents playing for 1 episode, and render a frame every 0.1 secondsCOMMENT
Structural Annotation Overuse6 hits · 14 pts
SeverityFileLineSnippetContext
LOWtutorials/Tianshou/1_basic_api_usage.py19 # Step 1: Load the PettingZoo environmentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py22 # Step 2: Wrap the environment for Tianshou interfacingCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py25 # Step 3: Define policies for each agentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py28 # Step 4: Convert the env to vector formatCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py31 # Step 5: Construct the Collector, which interfaces the policies with the vectorised environmentCOMMENT
LOWtutorials/Tianshou/1_basic_api_usage.py34 # Step 6: Execute the environment with the agents playing for 1 episode, and render a frame every 0.1 secondsCOMMENT
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippetContext
LOWpettingzoo/butterfly/pistonball/pistonball.py598 # Check if the ball is touching/within the left-most wall.COMMENT
LOWpettingzoo/classic/hanabi/hanabi.py286 # Check if all possible dictionary values are within a certain ranges.COMMENT
LOWpettingzoo/env_registry/helpers.py22 # Check if the env name exists at allCOMMENT
LOWtutorials/AgileRL/agilerl_dqn_curriculum.py766 # Check if game is over (Player 0 win)COMMENT
LOWtutorials/AgileRL/agilerl_dqn_curriculum.py857 # Check if game is over (Player 1 win)COMMENT
LOWtutorials/SB3/kaz/sb3_kaz_vector.py128 # Set obs_method to "image" in order to use visual observations (significantly longer training time)COMMENT
AI Structural Patterns8 hits · 8 pts
SeverityFileLineSnippetContext
LOWpettingzoo/butterfly/pistonball/pistonball.py136CODE
LOW…tingzoo/butterfly/cooperative_pong/cooperative_pong.py168CODE
LOW…fly/knights_archers_zombies/knights_archers_zombies.py264CODE
LOWpettingzoo/classic/hanabi/hanabi.py212CODE
LOWpettingzoo/classic/go/go_base.py317CODE
LOWpettingzoo/atari/base_atari_env.py52CODE
LOWpettingzoo/sisl/pursuit/pursuit_base.py19CODE
LOWpettingzoo/sisl/multiwalker/multiwalker_base.py294CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…rials/SB3/connect_four/sb3_connect_four_action_mask.py73 # for the current env. In this example, we assume the env has aCOMMENT
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOWpyproject.toml81[tool.ruff]COMMENT
LOWpettingzoo/butterfly/cooperative_pong/test_ball.py81 if terminate:COMMENT
LOWpettingzoo/classic/go/coords.py1# Copyright 2018 Google LLCCOMMENT
LOWpettingzoo/classic/go/go_base.py1# Copyright 2018 Google LLCCOMMENT
LOWdocs/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/_scripts/generate_gifs.py21#COMMENT
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdocs/code_examples/parallel_rps.py150 # If a user passes in actions with no agents, then just return empty observations, etc.COMMENT
MEDIUM…rials/SB3/connect_four/sb3_connect_four_action_mask.py67 """Separate function used in order to access the action mask."""STRING
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpettingzoo/__init__.py45except Exception: # nosecCODE
LOWpettingzoo/test/manual_control_test.py28 except Exception as e:CODE