Repository Analysis

Farama-Foundation/Gymnasium

A standard API for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)

18.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Farama-Foundation/Gymnasium, a Python project with 12,164 GitHub stars. SynthScan v2.0 examined 74,547 lines of code across 436 source files, recording 916 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 18.3 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).

18.3
Adjusted Score
18.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
12.2K
Stars
Python
Language
74.5K
Lines of Code
436
Files
916
Pattern Hits
2026-07-14
Scan Date
0.17
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 74MEDIUM 76LOW 766

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 916 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.

Hyper-Verbose Identifiers315 hits · 329 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/array_conversion.py89def _mapping_array_conversion(CODE
LOWgymnasium/wrappers/array_conversion.py97def _iterable_array_conversion(CODE
LOWgymnasium/wrappers/array_conversion.py114def _array_api_array_conversion(CODE
LOWgymnasium/wrappers/utils.py57def update_mean_var_count_from_moments(CODE
LOWgymnasium/wrappers/utils.py106def _create_discrete_zero_array(space: Discrete):CODE
LOWgymnasium/wrappers/utils.py111def _create_multidiscrete_zero_array(space: MultiDiscrete):CODE
LOWgymnasium/wrappers/utils.py131def _create_sequence_zero_array(space: Sequence):CODE
LOWgymnasium/wrappers/utils.py156def _create_one_of_zero_array(space: OneOf):CODE
LOWgymnasium/spaces/utils.py307def _unflatten_box_multibinary(CODE
LOWgymnasium/spaces/utils.py605def is_space_dtype_shape_equiv(space_1: Space, space_2: Space) -> bool:CODE
LOWgymnasium/spaces/utils.py629def _is_space_fundamental_dtype_shape_equiv(space_1, space_2):CODE
LOWgymnasium/spaces/utils.py639def _is_space_text_dtype_shape_equiv(space_1: Text, space_2):CODE
LOWgymnasium/spaces/utils.py648def _is_space_dict_dtype_shape_equiv(space_1: Dict, space_2):CODE
LOWgymnasium/spaces/utils.py660def _is_space_tuple_dtype_shape_equiv(space_1, space_2):CODE
LOWgymnasium/spaces/utils.py667def _is_space_graph_dtype_shape_equiv(space_1: Graph, space_2):CODE
LOWgymnasium/spaces/utils.py683def _is_space_oneof_dtype_shape_equiv(space_1: OneOf, space_2):CODE
LOWgymnasium/spaces/utils.py695def _is_space_sequence_dtype_shape_equiv(space_1: Sequence, space_2):CODE
LOWgymnasium/utils/save_video.py20def capped_cubic_video_schedule(episode_id: int) -> bool:CODE
LOWgymnasium/utils/env_checker.py77def check_reset_seed_determinism(env: gym.Env) -> None:CODE
LOWgymnasium/utils/env_checker.py261def check_reset_return_info_deprecation(env: gym.Env) -> None:CODE
LOWgymnasium/utils/step_api_compatibility.py27def convert_to_terminated_truncated_step_api(CODE
LOWgymnasium/utils/passive_env_checker.py25def _check_box_observation_space(observation_space: spaces.Box) -> None:CODE
LOWgymnasium/utils/passive_env_checker.py179def env_reset_passive_checker(CODE
LOWgymnasium/utils/passive_env_checker.py334def env_render_passive_checker(env: Env) -> RenderFrame | list[RenderFrame] | None:CODE
LOWgymnasium/envs/toy_text/cliffwalking.py160 def _calculate_transition_prob(CODE
LOWgymnasium/envs/toy_text/frozen_lake.py274 def update_probability_matrix(row, col, action):CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py118 def _legacy_add_marker_to_scene(self, marker: dict):CODE
LOWgymnasium/vector/utils/shared_memory.py98def _create_tuple_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py107def _create_dict_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py117def _create_text_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py124def _create_oneof_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py134def _create_dynamic_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py193def _read_tuple_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py203def _read_dict_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py213def _read_text_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py78def _create_base_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py179def _read_base_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py235def _read_one_of_from_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py284def _write_base_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py301def _write_tuple_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py314def _write_dict_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py322def _write_text_to_shared_memory(CODE
LOWgymnasium/vector/utils/shared_memory.py335def _write_oneof_to_shared_memory(CODE
LOWgymnasium/vector/utils/space_utils.py97def _batch_space_multidiscrete(space: MultiDiscrete, n: int = 1) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py184def _batch_differing_spaces_box(spaces: _PySequence[Box]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py207def _batch_differing_spaces_discrete(spaces: _PySequence[Discrete]) -> MultiDiscrete:CODE
LOWgymnasium/vector/utils/space_utils.py221def _batch_differing_spaces_multi_discrete(spaces: _PySequence[MultiDiscrete]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py244def _batch_differing_spaces_multi_binary(spaces: _PySequence[MultiBinary]) -> Box:CODE
LOWgymnasium/vector/utils/space_utils.py260def _batch_differing_spaces_tuple(spaces: _PySequence[Tuple]) -> Tuple:CODE
LOWgymnasium/vector/utils/space_utils.py271def _batch_differing_spaces_dict(spaces: _PySequence[Dict]) -> Dict:CODE
LOWgymnasium/vector/utils/space_utils.py502def _create_empty_array_multi(CODE
LOWgymnasium/vector/utils/space_utils.py509def _create_empty_array_tuple(CODE
LOWgymnasium/vector/utils/space_utils.py525def _create_empty_array_graph(CODE
LOWgymnasium/vector/utils/space_utils.py552def _create_empty_array_sequence(CODE
LOWgymnasium/vector/utils/space_utils.py564def _create_empty_array_oneof(CODE
LOWgymnasium/vector/utils/space_utils.py571def _create_empty_array_custom(CODE
LOWtests/test_core.py149def test_reward_observation_action_wrapper():CODE
LOWtests/test_core.py170def test_get_set_wrapper_attr():CODE
LOWtests/test_core.py232 def test_nonempty_seed_retrieved_when_not_set(example_env):CODE
LOWtests/test_core.py237 def test_seed_set_at_reset_and_retrieved(example_env):CODE
255 more matches not shown…
Cross-File Repetition53 hits · 265 pts
SeverityFileLineSnippetContext
HIGHgymnasium/wrappers/jax_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/numpy_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/vector/jax_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/vector/numpy_to_torch.py0wrapper class to change inputs and outputs of environment to pytorch tensors. args: env: the numpy-based vector environmSTRING
HIGHgymnasium/wrappers/array_conversion.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/wrappers/vector/array_conversion.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/utils/ezpickle.py0returns the object pickle state with args and kwargs.STRING
HIGHgymnasium/spaces/tuple.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/box.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/multi_discrete.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/oneof.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/sequence.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/graph.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/discrete.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/dict.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/multi_binary.py0checks whether this space can be flattened to a :class:`spaces.box`.STRING
HIGHgymnasium/spaces/tuple.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/box.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/multi_discrete.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/oneof.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/sequence.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/graph.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/text.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/dict.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/space.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/multi_binary.py0return boolean specifying if x is a valid member of this space.STRING
HIGHgymnasium/spaces/tuple.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/box.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/multi_discrete.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/oneof.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/sequence.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/graph.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/dict.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/space.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/multi_binary.py0convert a batch of samples from this space to a jsonable data type.STRING
HIGHgymnasium/spaces/tuple.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/box.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/multi_discrete.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/oneof.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/sequence.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/graph.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/dict.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/space.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/multi_binary.py0convert a jsonable data type to a batch of samples from this space.STRING
HIGHgymnasium/spaces/tuple.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/multi_discrete.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/oneof.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/sequence.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/discrete.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/text.py0check whether ``other`` is equivalent to this instance.STRING
HIGHgymnasium/spaces/graph.py0check whether `other` is equivalent to this instance.STRING
HIGHgymnasium/spaces/dict.py0check whether `other` is equivalent to this instance.STRING
HIGHgymnasium/spaces/multi_binary.py0check whether `other` is equivalent to this instance.STRING
Unused Imports227 hits · 210 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py5CODE
LOWgymnasium/__init__.py12CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py13CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py23CODE
LOWgymnasium/__init__.py31CODE
LOWgymnasium/core.py3CODE
LOWgymnasium/wrappers/transform_action.py9CODE
LOWgymnasium/wrappers/rendering.py10CODE
LOWgymnasium/wrappers/rendering.py316CODE
LOWgymnasium/wrappers/jax_to_torch.py11CODE
LOWgymnasium/wrappers/stateful_reward.py6CODE
LOWgymnasium/wrappers/transform_observation.py15CODE
LOWgymnasium/wrappers/__init__.py52CODE
LOWgymnasium/wrappers/__init__.py53CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py54CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py61CODE
LOWgymnasium/wrappers/__init__.py68CODE
LOWgymnasium/wrappers/__init__.py68CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py69CODE
LOWgymnasium/wrappers/__init__.py76CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py77CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
LOWgymnasium/wrappers/__init__.py83CODE
167 more matches not shown…
Decorative Section Separators58 hits · 180 pts
SeverityFileLineSnippetContext
MEDIUMgymnasium/envs/__init__.py16# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py63# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py92# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py132# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py176# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/__init__.py192# ----------------------------------------COMMENT
MEDIUMgymnasium/envs/mujoco/mujoco_env.py208 # ----------------------------COMMENT
MEDIUMgymnasium/envs/mujoco/mujoco_env.py225 # -----------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py40# ---------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py55# -----------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py83# --------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py90# ---------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py129# ----------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py167# -----------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py202# ----------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py230# -------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py280# -------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py22# -----------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py53# ------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py83# ------------------------------------------------COMMENT
MEDIUM…rials/gymnasium_basics/implementing_custom_wrappers.py107# ------------------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py406# ----------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py481# ------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py503# ------------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py535# --------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/handling_time_limits.py34# ---------------------------COMMENT
MEDIUMdocs/tutorials/gymnasium_basics/handling_time_limits.py72# ----------COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py142# ======================COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py203# ===================COMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py274# ================COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py38# --------------------COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py75# --------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py531# ----------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py19# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py25# ------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py52# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py73# ----------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py88# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py258# -----------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py276# --------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py311# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py340# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py415# ----------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py569# ----------------------------------------------------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py574# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py590# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py606# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py627# -----------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py657# ------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py708# ------------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py719# ----------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py42# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py81# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py108# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py165# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py300# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py338# ------------------------------COMMENT
MEDIUMdocs/tutorials/training_agents/blackjack_q_learning.py442# ------------------------------COMMENT
Docstring Block Structure21 hits · 105 pts
SeverityFileLineSnippetContext
HIGHgymnasium/wrappers/__init__.py166Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is used.STRING
HIGHgymnasium/wrappers/vector/__init__.py94Load a wrapper by name. This optimizes the loading of gymnasium wrappers by only loading the wrapper if it is uSTRING
HIGHgymnasium/spaces/box.py380Checks whether the box is bounded in some sense. Args: manner (str): One of ``"both"``, ``"below"``STRING
HIGHgymnasium/spaces/utils.py37Return the number of dimensions a flattened equivalent of this space would have. Args: space: The space to STRING
HIGHgymnasium/spaces/utils.py118Flatten a data point from a space. This is useful when e.g. points from spaces must be passed to a neural netwoSTRING
HIGHgymnasium/spaces/utils.py287Unflatten a data point from a space. This reverses the transformation applied by :func:`flatten`. You must ensure STRING
HIGHgymnasium/spaces/utils.py461Flatten a space into a space that is as flat as possible. This function will attempt to flatten ``space`` into a siSTRING
HIGHgymnasium/utils/seeding.py11Returns a NumPy random number generator (RNG) along with seed value from the inputted seed. If ``seed`` is ``None``STRING
HIGHgymnasium/envs/registration.py260Parse environment ID string format - ``[namespace/](env-name)[-v(version)]`` where the namespace and version are optionaSTRING
HIGHgymnasium/envs/registration.py647Creates an environment previously registered with :meth:`gymnasium.register` or a :class:`EnvSpec`. To find all avaSTRING
HIGHgymnasium/envs/registration.py841Create a vector environment according to the given ID. To find all available environments use :func:`gymnasium.ppriSTRING
HIGHgymnasium/envs/registration.py992Retrieve the :class:`EnvSpec` for the environment id from the :attr:`registry`. Args: env_id: The environmeSTRING
HIGHgymnasium/envs/box2d/lunar_lander.py792 The heuristic for 1. Testing 2. Demonstration rollout. Args: env: The environment s (lSTRING
HIGHgymnasium/vector/async_vector_env.py384Waits for the calls triggered by :meth:`reset_async` to finish and returns the results. Args: timeoSTRING
HIGHgymnasium/vector/async_vector_env.py466Wait for the calls to :obj:`step` in each sub-environment to finish. Args: timeout: Number of seconSTRING
HIGHgymnasium/vector/async_vector_env.py565Calls all parent pipes and waits for the results. Args: timeout: Number of seconds before the call STRING
HIGHgymnasium/vector/utils/shared_memory.py49Create a shared memory object, to be shared across processes. This eventually contains the observations from the veSTRING
HIGHgymnasium/vector/utils/shared_memory.py146Read the batch of observations from shared memory as a numpy array. ..notes:: The numpy array objects returSTRING
HIGHgymnasium/vector/utils/space_utils.py52Batch spaces of size `n` optimized for neural networks. Args: space: Space (e.g. the observation space for STRING
HIGHgymnasium/vector/utils/space_utils.py391Concatenate multiple samples from space into a single object. Args: space: Space of each item (e.g. `singleSTRING
HIGHgymnasium/vector/utils/space_utils.py464Create an empty (possibly nested and normally numpy-based) array, used in conjunction with ``concatenate(..., out=array)STRING
Deep Nesting62 hits · 62 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/transform_observation.py583CODE
LOWgymnasium/wrappers/atari_preprocessing.py177CODE
LOWgymnasium/wrappers/stateful_action.py47CODE
LOWgymnasium/wrappers/vector/dict_info_to_list.py105CODE
LOWgymnasium/wrappers/vector/rendering.py95CODE
LOWgymnasium/spaces/tuple.py56CODE
LOWgymnasium/spaces/box.py124CODE
LOWgymnasium/spaces/box.py235CODE
LOWgymnasium/spaces/box.py302CODE
LOWgymnasium/spaces/oneof.py67CODE
LOWgymnasium/spaces/sequence.py68CODE
LOWgymnasium/spaces/graph.py85CODE
LOWgymnasium/spaces/graph.py260CODE
LOWgymnasium/spaces/text.py89CODE
LOWgymnasium/spaces/dict.py69CODE
LOWgymnasium/spaces/dict.py132CODE
LOWgymnasium/utils/env_match.py9CODE
LOWgymnasium/utils/env_checker.py34CODE
LOWgymnasium/utils/env_checker.py77CODE
LOWgymnasium/utils/env_checker.py319CODE
LOWgymnasium/utils/step_api_compatibility.py27CODE
LOWgymnasium/utils/step_api_compatibility.py82CODE
LOWgymnasium/utils/passive_env_checker.py61CODE
LOWgymnasium/utils/passive_env_checker.py131CODE
LOWgymnasium/utils/passive_env_checker.py282CODE
LOWgymnasium/utils/passive_env_checker.py334CODE
LOWgymnasium/utils/play.py182CODE
LOWgymnasium/utils/play.py124CODE
LOWgymnasium/envs/registration.py833CODE
LOWgymnasium/envs/registration.py1015CODE
LOWgymnasium/envs/toy_text/cliffwalking.py319CODE
LOWgymnasium/envs/toy_text/taxi.py203CODE
LOWgymnasium/envs/toy_text/taxi.py309CODE
LOWgymnasium/envs/toy_text/taxi.py494CODE
LOWgymnasium/envs/toy_text/frozen_lake.py36CODE
LOWgymnasium/envs/toy_text/frozen_lake.py232CODE
LOWgymnasium/envs/toy_text/frozen_lake.py365CODE
LOWgymnasium/envs/toy_text/frozen_lake.py263CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py118CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py237CODE
LOWgymnasium/envs/mujoco/mujoco_rendering.py504CODE
LOWgymnasium/envs/box2d/car_racing.py307CODE
LOWgymnasium/envs/box2d/bipedal_walker.py283CODE
LOWgymnasium/envs/box2d/bipedal_walker.py615CODE
LOWgymnasium/envs/box2d/lunar_lander.py791CODE
LOWgymnasium/envs/box2d/car_dynamics.py182CODE
LOWgymnasium/vector/sync_vector_env.py266CODE
LOWgymnasium/vector/vector_env.py277CODE
LOWgymnasium/vector/async_vector_env.py773CODE
LOWtests/wrappers/test_array_conversion.py44CODE
LOWtests/wrappers/test_jax_to_torch.py22CODE
LOWtests/spaces/test_spaces.py119CODE
LOWtests/spaces/test_spaces.py358CODE
LOWtests/utils/test_passive_env_checker.py286CODE
LOWtests/utils/test_play.py147CODE
LOWtests/utils/test_step_api_compatibility.py115CODE
LOWtests/envs/test_env_implementation.py147CODE
LOWtests/envs/test_rendering.py40CODE
LOWtests/envs/test_rendering.py84CODE
LOWtests/envs/toy_text/test_taxi.py13CODE
2 more matches not shown…
Over-Commented Block64 hits · 59 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/array_conversion.py1# This wrapper will convert array inputs from an Array API compatible framework A for the actionsCOMMENT
LOWgymnasium/envs/box2d/bipedal_walker.py241 np.array([1, 1, 1, 1]).astype(np.float32),COMMENT
LOWtests/envs/registration/test_make.py21 TimeLimit,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py21# The reader is expected to be familiar with the `Gymnasium` API & library, the basics of robotics,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py41# In this tutorial we will load the Unitree Go1 robot from the excellent MuJoCo Menagerie robot model collection.COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py81# %%COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py121 exclude_current_positions_from_observation=False,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py161COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py221 max_episode_steps=1000,COMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py281# You can follow this guide to create most quadruped environments.COMMENT
LOW…rials/gymnasium_basics/implementing_custom_wrappers.py21# Inheriting from :class:`gymnasium.ObservationWrapper`COMMENT
LOW…rials/gymnasium_basics/implementing_custom_wrappers.py101 def reward(self, r: SupportsFloat) -> SupportsFloat:COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py101COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py121# The ``__init__`` method of our environment will accept the integerCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py221 }COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py241# worry much about seeding, *but you need to remember to callCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py401# or release other resources. You shouldn’t interact with the environmentCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py421# %%COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py441# | Name | Type | Default | Description COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py461# ``gymnasium_env/envs/__init__.py`` should have:COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py481# ------------------COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py501#COMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py521# You can also pass keyword arguments of your environment’s constructor toCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py541# Check out the `wrapper documentation </api/wrappers/>`__ for details onCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py561# GridWorld, you might only want to look at the relative position of theCOMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py41# More formally, a common example of bootstrapping in RL is updating the estimate of the Q-value function,COMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py61# A simple example of value functions is shown below. This is an illustrative example and not part of any specific algorCOMMENT
LOWdocs/tutorials/gymnasium_basics/handling_time_limits.py81# # This was needed in previous versions.COMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py141# Running the ExperimentCOMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py261savefig_folder.mkdir(parents=True, exist_ok=True)COMMENT
LOWdocs/tutorials/training_agents/action_masking_taxi.py281# invalid actions.COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py1"""COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py401#COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py421#COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py441COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py501COMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py521# different exploration algorithm could overcome this. The other parameterCOMMENT
LOWdocs/tutorials/training_agents/frozenlake_q_learning.py541# Wikipedia <https://en.wikipedia.org/wiki/Q-learning>`__COMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py121 1 + torch.exp(self.policy_stddev_net(shared_features))COMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py221# Following is the overview of the training procedureCOMMENT
LOWdocs/tutorials/training_agents/mujoco_reinforce.py301sns.lineplot(x="episodes", y="reward", data=df1).set(COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py1"""COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py21COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py41# the learning rates and the number of environments that run in parallel to collect experiences. The actor and critic neCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py261# we can play with `n_envs` in parallel and thus get up to a linear speedup (meaning that in theory, we collect samples COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py341#COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py561# %%COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py581#COMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py601# :alt: karp_flatt_metricCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py701 done = terminated or truncatedCOMMENT
LOWdocs/tutorials/training_agents/vector_a2c.py721# [1] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. P. Lillicrap, T. Harley, D. Silver, K. Kavukcuoglu. "Asynchronous MeCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py1"""COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py21# **Blackjack** is one of the most popular casino card games that is alsoCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py61# Note: We are going to follow the rules from Sutton & Barto.COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py81# ------------------------------COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py101# - Boolean whether the player holds a usable ace (An ace is usable if itCOMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py121# not the environment has terminated.COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py141action = env.action_space.sample()COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py161COMMENT
LOWdocs/tutorials/training_agents/blackjack_q_learning.py241COMMENT
4 more matches not shown…
Modern Structural Boilerplate48 hits · 48 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py34__all__ = [CODE
LOWgymnasium/wrappers/transform_action.py19__all__ = ["TransformAction", "ClipAction", "RescaleAction"]CODE
LOWgymnasium/wrappers/rendering.py25__all__ = [CODE
LOWgymnasium/wrappers/jax_to_torch.py41__all__ = ["JaxToTorch", "jax_to_torch", "torch_to_jax", "Device"]CODE
LOWgymnasium/wrappers/stateful_reward.py16__all__ = ["NormalizeReward"]CODE
LOWgymnasium/wrappers/transform_observation.py27__all__ = [CODE
LOWgymnasium/wrappers/__init__.py97__all__ = [CODE
LOWgymnasium/wrappers/transform_reward.py18__all__ = ["TransformReward", "ClipReward"]CODE
LOWgymnasium/wrappers/jax_to_numpy.py25__all__ = ["JaxToNumpy", "jax_to_numpy", "numpy_to_jax"]CODE
LOWgymnasium/wrappers/stateful_observation.py25__all__ = [CODE
LOWgymnasium/wrappers/array_conversion.py48__all__ = ["ArrayConversion", "array_conversion"]CODE
LOWgymnasium/wrappers/numpy_to_torch.py27__all__ = ["NumpyToTorch", "torch_to_numpy", "numpy_to_torch", "Device"]CODE
LOWgymnasium/wrappers/common.py33__all__ = [CODE
LOWgymnasium/wrappers/utils.py28__all__ = ["RunningMeanStd", "update_mean_var_count_from_moments", "create_zero_array"]CODE
LOWgymnasium/wrappers/atari_preprocessing.py13__all__ = ["AtariPreprocessing"]CODE
LOWgymnasium/wrappers/stateful_action.py13__all__ = ["StickyAction", "RepeatAction"]CODE
LOWgymnasium/wrappers/vector/dict_info_to_list.py12__all__ = ["DictInfoToList"]CODE
LOWgymnasium/wrappers/vector/jax_to_torch.py12__all__ = ["JaxToTorch"]CODE
LOWgymnasium/wrappers/vector/stateful_reward.py16__all__ = ["NormalizeReward"]CODE
LOWgymnasium/wrappers/vector/stateful_reward.py102 def update_running_mean(self, setting: bool) -> None:CODE
LOWgymnasium/wrappers/vector/__init__.py34__all__ = [CODE
LOWgymnasium/wrappers/vector/jax_to_numpy.py12__all__ = ["JaxToNumpy"]CODE
LOWgymnasium/wrappers/vector/stateful_observation.py23__all__ = ["NormalizeObservation"]CODE
LOWgymnasium/wrappers/vector/stateful_observation.py114 def update_running_mean(self, setting: bool) -> None:CODE
LOWgymnasium/wrappers/vector/array_conversion.py18__all__ = ["ArrayConversion"]CODE
LOWgymnasium/wrappers/vector/numpy_to_torch.py12__all__ = ["NumpyToTorch"]CODE
LOWgymnasium/wrappers/vector/common.py19__all__ = ["RecordEpisodeStatistics"]CODE
LOWgymnasium/spaces/__init__.py27__all__ = [CODE
LOWgymnasium/utils/passive_env_checker.py13__all__ = [CODE
LOWgymnasium/utils/__init__.py13__all__ = ["colorize", "EzPickle", "RecordConstructorArgs"]CODE
LOWgymnasium/envs/registration.py30__all__ = [CODE
LOWgymnasium/envs/__init__.py7__all__ = [CODE
LOWgymnasium/envs/toy_text/__init__.py6__all__ = [CODE
LOWgymnasium/envs/tabular/__init__.py6__all__ = [CODE
LOWgymnasium/envs/mujoco/__init__.py4__all__ = ["MujocoEnv", "MujocoRenderer"]CODE
LOWgymnasium/envs/classic_control/__init__.py9__all__ = [CODE
LOWgymnasium/envs/box2d/__init__.py5__all__ = [CODE
LOWgymnasium/envs/phys2d/__init__.py6__all__ = [CODE
LOWgymnasium/vector/sync_vector_env.py23__all__ = ["SyncVectorEnv"]CODE
LOWgymnasium/vector/sync_vector_env.py376 def set_attr(self, name: str, values: list[Any] | tuple[Any, ...] | Any) -> None:CODE
LOWgymnasium/vector/vector_env.py23__all__ = [CODE
LOWgymnasium/vector/__init__.py15__all__ = [CODE
LOWgymnasium/vector/async_vector_env.py43__all__ = ["AsyncVectorEnv", "AsyncState"]CODE
LOWgymnasium/vector/async_vector_env.py610 def set_attr(self, name: str, values: list[Any] | tuple[Any] | object) -> None:CODE
LOWgymnasium/vector/utils/misc.py21__all__ = ["CloudpickleWrapper", "clear_mpi_env_vars"]CODE
LOWgymnasium/vector/utils/shared_memory.py35__all__ = ["create_shared_memory", "read_from_shared_memory", "write_to_shared_memory"]CODE
LOWgymnasium/vector/utils/__init__.py17__all__ = [CODE
LOWgymnasium/vector/utils/space_utils.py39__all__ = [CODE
Self-Referential Comments14 hits · 31 pts
SeverityFileLineSnippetContext
MEDIUMgymnasium/spaces/__init__.py1"""This module implements various spaces.STRING
MEDIUMgymnasium/envs/tabular/cliffwalking.py1"""This module provides a CliffWalking functional environment and Gymnasium environment wrapper CliffWalkingJaxEnv."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py1"""This module provides a Blackjack functional environment and Gymnasium environment wrapper BlackJackJaxEnv."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py77 """This function is called if the player has decided to take a card."""STRING
MEDIUMgymnasium/envs/tabular/blackjack.py111 """This function is called if the player has decided to not take a card.STRING
MEDIUMgymnasium/vector/async_vector_env.py191 # Create a dummy environment to gather the metadata and observation / action space of the environmentCOMMENT
MEDIUMtests/spaces/test_graph.py148 # Define a probability distribution for nodesCOMMENT
MEDIUMtests/spaces/test_graph.py175 # Define a probability distribution for edgesCOMMENT
MEDIUMtests/envs/registration/test_env_spec.py19 # Create an environment to test withCOMMENT
MEDIUMtests/vector/utils/test_space_utils.py42 # Create an empty array and check that space is within the batch spaceCOMMENT
MEDIUMdocs/tutorials/gymnasium_basics/environment_creation.py480# Creating a PackageCOMMENT
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py48 seed: int # Define a seed so that we get reproducible resultsCODE
MEDIUMdocs/tutorials/training_agents/frozenlake_q_learning.py89# Creating the Q-tableCOMMENT
MEDIUMdocs/tutorials/training_agents/mujoco_reinforce.py68# The following function estimates a mean and standard deviation of a normal distribution from which an action is sampleCOMMENT
Redundant / Tautological Comments15 hits · 24 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/__init__.py181 # Check if the requested wrapper is in the _wrapper_to_class dictionaryCOMMENT
LOWgymnasium/wrappers/vector/__init__.py109 # Check if the requested wrapper is in the _wrapper_to_class dictionaryCOMMENT
LOWgymnasium/envs/registration.py329 # Check if the namespace exists in one of the registry's specsCOMMENT
LOWgymnasium/envs/registration.py781 # Check if pre-wrapped wrappersCOMMENT
LOWgymnasium/envs/toy_text/taxi.py268 # Check if the primary move is possible. When it is not (wall or gridCOMMENT
LOWgymnasium/envs/box2d/lunar_lander.py40INITIAL_RANDOM = 1000.0 # Set 1500 to make game harderCODE
LOWtests/spaces/test_sequence.py14 # Check if the sample is in 2d formatCOMMENT
LOWtests/spaces/test_sequence.py20 # Check if the sample is a `np.ndarray` as supposed to a tupleCOMMENT
LOWtests/spaces/test_multidiscrete.py164 # Check if space can be flattened and unflattened without an integer overflowCOMMENT
LOWtests/spaces/test_multidiscrete.py209 # Check if two spaces are equivalent.COMMENT
LOWtests/spaces/test_box.py321 # Check if only the expected precision warning is emittedCOMMENT
LOWtests/spaces/test_box.py357 # Check if two spaces are equivalent.COMMENT
LOWtests/spaces/test_spaces.py88 # Check if the samples are equivalentCOMMENT
LOWtests/envs/registration/test_register.py192 # Check if the namespace context manager worksCOMMENT
LOW.github/workflows/run-tutorial.yml146 # Output results to console immediatelyCOMMENT
AI Structural Patterns15 hits · 15 pts
SeverityFileLineSnippetContext
LOWgymnasium/wrappers/vector/rendering.py261CODE
LOWgymnasium/spaces/dict.py281CODE
LOWgymnasium/utils/play.py182CODE
LOWgymnasium/envs/registration.py564CODE
LOWgymnasium/envs/mujoco/hopper_v5.py163CODE
LOWgymnasium/envs/mujoco/walker2d_v4.py26CODE
LOWgymnasium/envs/mujoco/walker2d_v5.py172CODE
LOWgymnasium/envs/mujoco/hopper_v4.py26CODE
LOWgymnasium/envs/mujoco/mujoco_env.py38CODE
LOWgymnasium/envs/mujoco/ant_v5.py228CODE
LOWgymnasium/envs/mujoco/ant_v4.py23CODE
LOWgymnasium/envs/mujoco/humanoidstandup_v5.py286CODE
LOWgymnasium/envs/mujoco/humanoid_v5.py307CODE
LOWtests/testing_env.py63CODE
LOWtests/testing_env.py177CODE
AI Slop Vocabulary5 hits · 14 pts
SeverityFileLineSnippetContext
LOWgymnasium/vector/vector_env.py322 # Otherwise, just use the array that already existsCOMMENT
LOWdocs/tutorials/gymnasium_basics/environment_creation.py545# environment implementation to fix this! We can simply add a wrapper onCOMMENT
MEDIUMdocs/tutorials/training_agents/action_masking_taxi.py145# We'll use multiple random seeds to ensure robust statistical comparison.COMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py30# Vectorized environments [3] can help to achieve quicker and more robust training by allowing multiple instancesCOMMENT
MEDIUMdocs/tutorials/training_agents/vector_a2c.py278# If we want to randomize the environment for training to get more robust agents (that can deal with different parameterCOMMENT
Excessive Try-Catch Wrapping13 hits · 13 pts
SeverityFileLineSnippetContext
LOWgymnasium/__init__.py69except Exception: # nosecCODE
LOWgymnasium/core.py388 except Exception as e:CODE
LOWgymnasium/wrappers/common.py163 except Exception as e:CODE
LOWgymnasium/wrappers/common.py320 except Exception as e:CODE
LOWgymnasium/wrappers/common.py337 except Exception as e:CODE
LOWgymnasium/wrappers/common.py431 except Exception as e:CODE
LOWgymnasium/utils/env_checker.py455 except Exception as e:CODE
LOWgymnasium/utils/passive_env_checker.py175 except Exception as e:CODE
LOWgymnasium/envs/registration.py176 except Exception as e:CODE
LOWgymnasium/envs/registration.py184 except Exception as e:CODE
LOWgymnasium/vector/utils/space_utils.py363 except Exception as e:CODE
LOWtests/envs/test_rendering.py101 except Exception as e:CODE
LOWdocs/introduction/create_custom_env.md383except Exception as e:CODE
Structural Annotation Overuse3 hits · 5 pts
SeverityFileLineSnippetContext
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py54# Step 1 - Load the modelCOMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py82# Step 2 - Tweaking the Environment ParametersCOMMENT
LOWdocs/tutorials/gymnasium_basics/load_quadruped_model.py229# Step 3 - Train your AgentCOMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWgymnasium/core.py305 If you inherit from :class:`Wrapper`, don't forget to call ``super().__init__(env)``STRING
LOWgymnasium/vector/vector_env.py362 Don't forget to call ``super().__init__(env)`` if the subclass overrides :meth:`__init__`.STRING
MEDIUMdocs/tutorials/gymnasium_basics/load_quadruped_model.py172# we have to pick values that make sense for our robot, you can use the default `MuJoCo/Ant`COMMENT