Repository Analysis

aimacode/aima-python

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"

23.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of aimacode/aima-python, a Jupyter Notebook project with 8,774 GitHub stars. SynthScan v2.0 examined 49,729 lines of code across 130 source files, recording 1076 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 23.7 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).

23.7
Adjusted Score
23.7
Raw Score
100%
Time Factor
2026-06-30
Last Push
8.8K
Stars
Jupyter Notebook
Language
49.7K
Lines of Code
130
Files
1.1K
Pattern Hits
2026-07-14
Scan Date
0.15
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

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.

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 19MEDIUM 58LOW 999

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 1076 distinct pattern matches across 18 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.

Over-Commented Block621 hits · 540 pts
SeverityFileLineSnippetContext
LOWaima/perception.py501# show the demo of rcnn, the model is fromCOMMENT
LOWnotebooks/bootstrap.py1# ---COMMENT
LOWnotebooks/knowledge_current_best.py1# ---COMMENT
LOWnotebooks/knowledge_current_best.py21# The [knowledge](https://github.com/aimacode/aima-python/blob/master/knowledge.py) module covers **Chapter 19: KnowledgCOMMENT
LOWnotebooks/knowledge_current_best.py41# ### First-Order LogicCOMMENT
LOWnotebooks/knowledge_current_best.py61# We say that an example `e` is **consistent** with an hypothesis `h` if the assignment from the hypothesis for `e` is tCOMMENT
LOWnotebooks/knowledge_current_best.py81# %%COMMENT
LOWnotebooks/knowledge_current_best.py101#COMMENT
LOWnotebooks/knowledge_current_best.py141COMMENT
LOWnotebooks/knowledge_current_best.py161# * How much does it cost (`Price`, takes values in [$, $$, $$$])COMMENT
LOWnotebooks/dynamic_decision_network.py1# ---COMMENT
LOWnotebooks/improving_sat_algorithms.py1# ---COMMENT
LOWnotebooks/improving_sat_algorithms.py21# # Improving Boolean Satisfiability AlgorithmsCOMMENT
LOWnotebooks/improving_sat_algorithms.py41#COMMENT
LOWnotebooks/improving_sat_algorithms.py61COMMENT
LOWnotebooks/improving_sat_algorithms.py81# ***Freeman’s POSIT*** <a name="ref-1"/>[[1]](#cite-freeman1995improvements) version counts both the number of positiveCOMMENT
LOWnotebooks/improving_sat_algorithms.py101# %psource dlisCOMMENT
LOWnotebooks/improving_sat_algorithms.py121# %%COMMENT
LOWnotebooks/improving_sat_algorithms.py141# The first difference between a DPLL solver and a CDCL solver is the introduction of the *non-chronological backtrackinCOMMENT
LOWnotebooks/improving_sat_algorithms.py161COMMENT
LOWnotebooks/improving_sat_algorithms.py181COMMENT
LOWnotebooks/improving_sat_algorithms.py201# #### LubyCOMMENT
LOWnotebooks/improving_sat_algorithms.py221# %psource lubyCOMMENT
LOWnotebooks/improving_sat_algorithms.py241# ### AustraliaCOMMENT
LOWnotebooks/improving_sat_algorithms.py261COMMENT
LOWnotebooks/improving_sat_algorithms.py281# %time model = dpll_satisfiable(australia_sat, branching_heuristic=dlis)COMMENT
LOWnotebooks/improving_sat_algorithms.py341# %%COMMENT
LOWnotebooks/improving_sat_algorithms.py361COMMENT
LOWnotebooks/improving_sat_algorithms.py421# %time model = dpll_satisfiable(usa_sat, branching_heuristic=moms)COMMENT
LOWnotebooks/improving_sat_algorithms.py441# %%COMMENT
LOWnotebooks/improving_sat_algorithms.py481# %% [markdown]COMMENT
LOWnotebooks/improving_sat_algorithms.py501COMMENT
LOWnotebooks/improving_sat_algorithms.py521# ## ReferencesCOMMENT
LOWnotebooks/nlp_apps.py1# ---COMMENT
LOWnotebooks/nlp_apps.py21# In this notebook we will take a look at some indicative applications of natural language processing. We will cover conCOMMENT
LOWnotebooks/nlp_apps.py101COMMENT
LOWnotebooks/nlp_apps.py161COMMENT
LOWnotebooks/nlp_apps.py181# Let's now take a look at a harder problem, classifying the authors of the [Federalist Papers](https://en.wikipedia.orgCOMMENT
LOWnotebooks/nlp_apps.py201# %% [markdown]COMMENT
LOWnotebooks/nlp_apps.py261madison = ''.join(madison)COMMENT
LOWnotebooks/nlp_apps.py381 print('Paper No. {}: {}'.format(d, ' '.join(results)))COMMENT
LOWnotebooks/nlp_apps.py401# Some of the broad applications of Text Classification are:-COMMENT
LOWnotebooks/nlp_apps.py481 words_1 += sentCOMMENT
LOWnotebooks/planning_total_order_planner.py1# ---COMMENT
LOWnotebooks/planning_total_order_planner.py21# In mathematical terminology, **total order**, **linear order** or **simple order** refers to a set *X* which is said tCOMMENT
LOWnotebooks/planning_total_order_planner.py41COMMENT
LOWnotebooks/planning_partial_order_planner.py1# ---COMMENT
LOWnotebooks/planning_partial_order_planner.py21# The way a partial-order plan works enables it to take advantage of _problem decomposition_ and work on each subproblemCOMMENT
LOWnotebooks/planning_partial_order_planner.py41# We will first describe the data-structures and helper methods used, followed by the algorithm used to find a partial-oCOMMENT
LOWnotebooks/planning_partial_order_planner.py61# `causal_links` stores this information as tuples `(Action(A), precondition(p), Action(B))` which is interpreted as givCOMMENT
LOWnotebooks/planning_partial_order_planner.py81# <br>COMMENT
LOWnotebooks/planning_partial_order_planner.py101# %% [markdown]COMMENT
LOWnotebooks/planning_partial_order_planner.py121# <br>COMMENT
LOWnotebooks/planning_partial_order_planner.py161# <br>COMMENT
LOWnotebooks/planning_partial_order_planner.py181# %%COMMENT
LOWnotebooks/index.py1# ---COMMENT
LOWnotebooks/index.py21# Welcome to the AIMA Python Code Repository. You should be seeing this index notebook if you clicked on the **Launch BiCOMMENT
LOWnotebooks/index.py41# 8. [**Probability**](./probability.ipynb)COMMENT
LOWnotebooks/knowledge_version_space.py1# ---COMMENT
LOWnotebooks/knowledge_version_space.py21# The [knowledge](https://github.com/aimacode/aima-python/blob/master/knowledge.py) module covers **Chapter 19: KnowledgCOMMENT
561 more matches not shown…
Unused Imports140 hits · 128 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py2CODE
LOWtests/test_perception.py5CODE
LOWtests/test_csp.py3CODE
LOWtests/test_deep_learning.py4CODE
LOWtests/test_search.py2CODE
LOWtests/test_knowledge.py3CODE
LOWtests/test_graphplan.py5CODE
LOWtests/test_learning.py3CODE
LOWtests/test_probabilistic_learning.py6CODE
LOWtests/test_text.py6CODE
LOWtests/test_reinforcement_learning.py3CODE
LOWtests/test_nlp.py10CODE
LOWtests/test_mdp.py3CODE
LOWtests/test_logic.py3CODE
LOWtests/test_games.py3CODE
LOWtests/test_planning.py5CODE
LOWtests/test_probability.py3CODE
LOWgui/romania_problem.py4CODE
LOWgui/tic-tac-toe.py2CODE
LOWgui/vacuum_agent.py2CODE
LOWgui/vacuum_agent.py4CODE
LOWgui/grid_mdp.py16CODE
LOWgui/genetic_algorithm_example.py13CODE
LOWgui/tsp.py1CODE
LOWgui/tsp.py5CODE
LOWgui/eight_puzzle.py5CODE
LOWgui/xy_vacuum_environment.py2CODE
LOWgui/xy_vacuum_environment.py4CODE
LOWaima/making_simple_decisions.py9CODE
LOWaima/making_simple_decisions.py9CODE
LOWaima/utils.py3CODE
LOWaima/search.py12CODE
LOWaima/probability.py10CODE
LOWaima/learning.py9CODE
LOWnotebooks/knowledge_current_best.py26CODE
LOWnotebooks/improving_sat_algorithms.py31CODE
LOWnotebooks/improving_sat_algorithms.py238CODE
LOWnotebooks/nlp_apps.py44CODE
LOWnotebooks/nlp_apps.py123CODE
LOWnotebooks/nlp_apps.py191CODE
LOWnotebooks/nlp_apps.py281CODE
LOWnotebooks/planning_total_order_planner.py39CODE
LOWnotebooks/planning_partial_order_planner.py34CODE
LOWnotebooks/knowledge_version_space.py26CODE
LOWnotebooks/arc_consistency_heuristics.py34CODE
LOWnotebooks/mdp_apps.py26CODE
LOWnotebooks/mdp_apps.py27CODE
LOWnotebooks/mdp_apps.py27CODE
LOWnotebooks/planning_hierarchical_search.py48CODE
LOWnotebooks/learning_apps.py24CODE
LOWnotebooks/learning_apps.py25CODE
LOWnotebooks/learning_apps.py26CODE
LOWnotebooks/game_theory.py24CODE
LOWnotebooks/planning_graph_plan.py64CODE
LOWnotebooks/csp.py24CODE
LOWnotebooks/planning_angelic_search.py29CODE
LOWnotebooks/sarsa.py24CODE
LOWnotebooks/games.py36CODE
LOWnotebooks/reinforcement_learning.py24CODE
LOWnotebooks/logic.py27CODE
80 more matches not shown…
Hyper-Verbose Identifiers117 hits · 126 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py284def test_priority_queue_with_objects():CODE
LOWtests/test_utils.py302def test_priority_queue_ties_with_non_comparable_items():CODE
LOWtests/test_perception.py18def test_sum_squared_difference():CODE
LOWtests/test_perception.py28def test_gen_gray_scale_picture():CODE
LOWtests/test_perception.py36def test_generate_edge_weight():CODE
LOWtests/test_game_theory.py35def test_pure_nash_equilibria():CODE
LOWtests/test_game_theory.py125def test_zero_sum_game_with_saddle_point():CODE
LOWtests/test_game_theory.py161def test_alternating_offers_bargaining():CODE
LOWtests/test_csp.py38def test_csp_count_lost_values():CODE
LOWtests/test_csp.py131def test_csp_infer_assignment():CODE
LOWtests/test_csp.py279def test_first_unassigned_variable():CODE
LOWtests/test_csp.py326def test_unordered_domain_values():CODE
LOWtests/test_csp.py562def test_different_values_constraint():CODE
LOWtests/test_csp.py704def test_constraint_check_count():CODE
LOWtests/test_search.py19def test_breadth_first_tree_search():CODE
LOWtests/test_search.py25def test_breadth_first_graph_search():CODE
LOWtests/test_search.py29def test_best_first_graph_search():CODE
LOWtests/test_search.py51def test_depth_first_tree_search():CODE
LOWtests/test_search.py55def test_depth_first_graph_search():CODE
LOWtests/test_search.py60def test_iterative_deepening_search():CODE
LOWtests/test_search.py65def test_depth_limited_search():CODE
LOWtests/test_search.py73def test_bidirectional_search():CODE
LOWtests/test_search.py87def test_tree_search_variants():CODE
LOWtests/test_search.py100def test_iterative_deepening_astar_search():CODE
LOWtests/test_search.py206def test_recursive_best_first_search():CODE
LOWtests/test_search.py385def test_simple_problem_solving_agent():CODE
LOWtests/test_search.py500def test_grid_search_visualization():CODE
LOWtests/test_search.py515def test_local_search_variants():CODE
LOWtests/test_knowledge.py55def test_current_best_learning():CODE
LOWtests/test_knowledge.py78def test_version_space_learning():CODE
LOWtests/test_knowledge.py94def test_minimal_consistent_det():CODE
LOWtests/test_graphplan.py35def test_generalized_blocksworld_manual():CODE
LOWtests/test_graphplan.py85def test_have_cake_and_eat_cake_too():CODE
LOWtests/test_graphplan.py111def test_logistics_plan_valid(goal_state):CODE
LOWtests/test_graphplan.py117def test_rush_hour_manual_alt_sequence():CODE
LOWtests/test_graphplan.py178def test_impossible_cake_exits_via_leveloff():CODE
LOWtests/test_learning.py51def test_decision_tree_learner():CODE
LOWtests/test_learning.py99def test_neural_network_learner():CODE
LOWtests/test_learning.py207def test_decision_list_learner():CODE
LOWtests/test_text.py143def test_viterbi_segmentation():CODE
LOWtests/test_text.py194def test_counting_probability_distribution():CODE
LOWtests/test_mdp.py154def test_pomdp_value_iteration():CODE
LOWtests/test_logic.py102def test_parse_definite_clause():CODE
LOWtests/test_logic.py161def test_dpll_branching_heuristics():CODE
LOWtests/test_logic.py171def test_cdcl_restart_strategies():CODE
LOWtests/test_logic.py270def test_eliminate_implications():CODE
LOWtests/test_logic.py293def test_distribute_and_over_or():CODE
LOWtests/test_logic.py331def test_standardize_variables():CODE
LOWtests/test_logic.py408def test_hybrid_wumpus_agent_make_percept_sentence():CODE
LOWtests/test_logic.py419def test_hybrid_wumpus_agent_plan_shot():CODE
LOWtests/test_logic.py428def test_hybrid_wumpus_agent_plan_route_no_path():CODE
LOWtests/test_logic.py434def test_hybrid_wumpus_agent_first_action():CODE
LOWtests/test_games.py59def test_monte_carlo_tree_search():CODE
LOWtests/test_planning.py145def test_have_cake_and_eat_cake_too():CODE
LOWtests/test_planning.py467def test_find_open_precondition():CODE
LOWtests/test_planning.py505def test_partial_order_planner():CODE
LOWtests/test_planning.py518def test_partial_order_planner_solves_standard_problems():CODE
LOWtests/test_planning.py657def test_hierarchical_search_max_depth():CODE
LOWtests/test_planning.py728def test_optimistic_reachable_set():CODE
LOWtests/test_planning.py743def test_pessimistic_reachable_set():CODE
57 more matches not shown…
Deep Nesting99 hits · 97 pts
SeverityFileLineSnippetContext
LOWtests/test_search.py385CODE
LOWtests/test_search.py398CODE
LOWdocs/conf.py68CODE
LOWgui/romania_problem.py446CODE
LOWgui/romania_problem.py503CODE
LOWgui/romania_problem.py559CODE
LOWgui/vacuum_agent.py37CODE
LOWgui/grid_mdp.py132CODE
LOWgui/xy_vacuum_environment.py63CODE
LOWgui/xy_vacuum_environment.py74CODE
LOWgui/xy_vacuum_environment.py105CODE
LOWgui/xy_vacuum_environment.py128CODE
LOWaima/deep_learning.py350CODE
LOWaima/deep_learning.py382CODE
LOWaima/game_theory.py41CODE
LOWaima/game_theory.py53CODE
LOWaima/csp.py200CODE
LOWaima/csp.py241CODE
LOWaima/csp.py295CODE
LOWaima/csp.py333CODE
LOWaima/csp.py428CODE
LOWaima/csp.py449CODE
LOWaima/csp.py863CODE
LOWaima/csp.py453CODE
LOWaima/csp.py745CODE
LOWaima/csp.py1092CODE
LOWaima/csp.py1290CODE
LOWaima/csp.py1321CODE
LOWaima/csp.py1394CODE
LOWaima/csp.py1447CODE
LOWaima/logic.py285CODE
LOWaima/logic.py362CODE
LOWaima/logic.py561CODE
LOWaima/logic.py918CODE
LOWaima/logic.py1816CODE
LOWaima/logic.py1868CODE
LOWaima/logic.py1884CODE
LOWaima/logic.py1920CODE
LOWaima/logic.py2069CODE
LOWaima/logic.py2128CODE
LOWaima/logic.py2185CODE
LOWaima/logic.py2218CODE
LOWaima/logic.py1372CODE
LOWaima/logic.py1601CODE
LOWaima/agents.py255CODE
LOWaima/agents.py266CODE
LOWaima/agents.py410CODE
LOWaima/agents.py448CODE
LOWaima/agents.py506CODE
LOWaima/agents.py820CODE
LOWaima/agents.py1006CODE
LOWaima/nlp.py366CODE
LOWaima/nlp.py492CODE
LOWaima/nlp.py433CODE
LOWaima/nlp.py501CODE
LOWaima/mdp.py343CODE
LOWaima/planning.py50CODE
LOWaima/planning.py90CODE
LOWaima/planning.py1100CODE
LOWaima/planning.py1135CODE
39 more matches not shown…
AI Slop Vocabulary30 hits · 78 pts
SeverityFileLineSnippetContext
MEDIUMnotebooks/improving_sat_algorithms.py38# Essentially, `DPLL` is a backtracking depth-first search through partial truth assignments which uses a *splitting rulCOMMENT
MEDIUMnotebooks/improving_sat_algorithms.py169# Implementation issues for SAT solvers include the design of suitable data structures for storing clauses. The implemenCOMMENT
MEDIUMnotebooks/nlp_apps.py219# NOTE: Since we are only removing a single word from each paper, this step can be skipped. We add it here to show that COMMENT
MEDIUMnotebooks/planning_total_order_planner.py34# In the module, the `Linearize` class solves problems using this paradigm.COMMENT
LOWnotebooks/mdp_apps.py198# This is not a conventional term, we just use it to minimize confusion between the two.COMMENT
LOWnotebooks/csp.py100# The _ ___init___ _ method takes only one parameter **n** i.e. the size of the problem. To create an instance, we just COMMENT
MEDIUMnotebooks/games.py254# It is the turn of MAX to move, and he is at state A. He can move to B, C or D, using moves a1, a2 and a3 respectively.COMMENT
MEDIUMnotebooks/games.py340# Below we see the best moves for MIN starting from B, C and D respectively. Note that the algorithm in these cases workCOMMENT
MEDIUMnotebooks/logic.py873# In this section we look at a forward chaining and a backward chaining algorithm for `FolKB`. Both aforementioned algorCOMMENT
MEDIUMnotebooks/nlp.py326# **Hyperlink-Induced Topic Search** (or HITS for short) is an algorithm for information retrieval and page ranking. YouCOMMENT
MEDIUMnotebooks/nlp.py326# **Hyperlink-Induced Topic Search** (or HITS for short) is an algorithm for information retrieval and page ranking. YouCOMMENT
LOWnotebooks/nlp.py549# And then we simply call the `parses` function:COMMENT
MEDIUMnotebooks/search.py67# * **Informed search algorithms**: These type of algorithms leverage any information (heuristics, path cost) on the proCOMMENT
MEDIUMnotebooks/search.py1849# Next we need to come up with a fitness function that appropriately scores individuals. Again, we will look at the probCOMMENT
MEDIUMnotebooks/search.py1931# A gene's value in an individual `q` denotes the queen's column, and the position of the gene denotes its row. We can cCOMMENT
LOWnotebooks/search.py231# We can simply call the function with node_colors dictionary object to display it.COMMENT
LOWnotebooks/search.py1687# There has to be some way of determining which phrases in our population have a better chance of eventually evolving inCOMMENT
LOWnotebooks/search.py1723# Great! Now, we need to define the most important metric for the genetic algorithm, i.e the fitness function. This willCOMMENT
MEDIUMnotebooks/learning.py215# Currently the `iris` dataset has three classes, setosa, virginica and versicolor. We want though to convert it to a biCOMMENT
MEDIUMnotebooks/learning.py370# The Plurality Learner is a simple algorithm, used mainly as a baseline comparison for other algorithms. It finds the mCOMMENT
MEDIUMnotebooks/learning.py535# As the name of the algorithm and image above suggest, this algorithm creates the forest with a number of trees. The moCOMMENT
MEDIUMnotebooks/learning.py594# We have a dataset with a set of classes (**C**) and we want to classify an item with a set of features (**F**). EssentCOMMENT
MEDIUMnotebooks/neural_nets.py39# After the input values are fed-forward into the network, the resulting output can be used for classification. The probCOMMENT
LOWnotebooks/classical_planning_approaches.py155# A propositional planning procedure implements the basic idea just given but, because the agent does not know how many COMMENT
MEDIUMnotebooks/chapter19/RNN.py79# Autoencoders are an unsupervised learning technique in which we leverage neural networks for the task of representatioCOMMENT
MEDIUMnotebooks/chapter18/Decision Tree.py153# As the name of the algorithm and image above suggest, this algorithm creates the forest with a number of trees. The moCOMMENT
MEDIUMnotebooks/chapter18/Datasets.py188# Currently the iris dataset has three classes, setosa, virginica and versicolor. We want though to convert it to a binaCOMMENT
MEDIUMnotebooks/chapter22/nlp_apps.py221# NOTE: Since we are only removing a single word from each paper, this step can be skipped. We add it here to show that COMMENT
LOWnotebooks/chapter22/Parsing.py85# And then we simply call the `parses` function:COMMENT
MEDIUMnotebooks/chapter24/Image Edge Detection.py99# When considering the situation when there is strong noise in an image, the ups and downs of the noise will induce stroCOMMENT
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHgui/romania_problem.py0search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for exampleSTRING
HIGHaima/search.py0search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for exampleSTRING
HIGHnotebooks/search.py0search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for exampleSTRING
HIGHgui/romania_problem.py0a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searcSTRING
HIGHaima/search.py0a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searcSTRING
HIGHnotebooks/search.py0a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searcSTRING
HIGHaima/csp.py0wa: or id; or: id nv ca; ca: nv az; nv: id ut az; id: mt wy ut; ut: wy co az; mt: nd sd wy; wy: sd ne co; co: ne ka ok nSTRING
HIGHaima/logic.py0wa: or id; or: id nv ca; ca: nv az; nv: id ut az; id: mt wy ut; ut: wy co az; mt: nd sd wy; wy: sd ne co; co: ne ka ok nSTRING
HIGHnotebooks/improving_sat_algorithms.py0wa: or id; or: id nv ca; ca: nv az; nv: id ut az; id: mt wy ut; ut: wy co az; mt: nd sd wy; wy: sd ne co; co: ne ka ok nSTRING
HIGHaima/csp.py0al: lo fc; aq: mp li pc; au: li ce bo ra lr mp; bo: ce if ca fc ra au; br: nb pl; ca: if pi lo fc bo; ce: pl nb nh if boSTRING
HIGHaima/logic.py0al: lo fc; aq: mp li pc; au: li ce bo ra lr mp; bo: ce if ca fc ra au; br: nb pl; ca: if pi lo fc bo; ce: pl nb nh if boSTRING
HIGHnotebooks/improving_sat_algorithms.py0al: lo fc; aq: mp li pc; au: li ce bo ra lr mp; bo: ce if ca fc ra au; br: nb pl; ca: if pi lo fc bo; ce: pl nb nh if boSTRING
Self-Referential Comments14 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_games.py5# Creating the game instancesCOMMENT
MEDIUMaima/agents.py473 """This class is for environments on a 2D plane, with locationsSTRING
MEDIUMnotebooks/planning_graph_plan.py99# This method is invoked when the goal conditions haven't been met in the current level or the actions that lead to it aCOMMENT
MEDIUMnotebooks/mdp.py647# This function is represented as `b' = FORWARD(b, a, e)`COMMENT
MEDIUMnotebooks/mdp.py733# Defining a POMDP is useless unless we can find a way to solve it. As POMDPs can have infinitely many belief states, weCOMMENT
MEDIUMnotebooks/planning.py109# This class represents an action given the expression, the preconditions and its effects.COMMENT
MEDIUMnotebooks/search.py1412# Define a problem with these parameters.COMMENT
MEDIUMnotebooks/probability.py1125# Define the sensor model as a function `P_sensor`.COMMENT
MEDIUMnotebooks/vacuum_world.py89# Create the random agentCOMMENT
MEDIUMnotebooks/vacuum_world.py136# Create a table-driven agentCOMMENT
MEDIUMnotebooks/vacuum_world.py196# Create a simple reflex agent the two-state environmentCOMMENT
MEDIUMnotebooks/vacuum_world.py241# Create a model-based reflex agentCOMMENT
MEDIUMnotebooks/chapter16-17/Partially Observable MDP.py127# This function is represented as `b' = FORWARD(b, a, e)`COMMENT
MEDIUMnotebooks/chapter16-17/Partially Observable MDP.py216# Defining a POMDP is useless unless we can find a way to solve it. As POMDPs can have infinitely many belief states, weCOMMENT
Slop Phrases11 hits · 32 pts
SeverityFileLineSnippetContext
LOWnotebooks/knowledge_current_best.py76# When specializing or generalizing, we should make sure to not create inconsistencies with previous examples. To avoid COMMENT
MEDIUMnotebooks/knowledge_current_best.py87# As mentioned earlier, examples are dictionaries (with keys being the attribute names) and hypotheses are lists of dictCOMMENT
MEDIUMnotebooks/mdp_apps.py775# Perhaps you can try this as an exercise.COMMENT
MEDIUMnotebooks/games.py105# The class `TicTacToe` has been inherited from the class `Game`. As mentioned earlier, you really want to do this. CatcCOMMENT
MEDIUMnotebooks/logic.py130# If the `|'==>'|` notation looks ugly to you, you can use the function `expr` instead:COMMENT
MEDIUMnotebooks/intro.py57# From there, the notebook alternates explanations with examples of use. You can run the examples as they are, and you cCOMMENT
MEDIUMnotebooks/intro.py59# If you want to see the source code of a function, you can open a browser or editor and see it in another window, or frCOMMENT
MEDIUMnotebooks/chapter19/Optimizer and Backpropagation.py58# To view the pseudocode and the implementation, you can use the following codes:COMMENT
MEDIUMnotebooks/chapter18/Linear and Nonparametric Models.py131# Which is the same as expected. By altering k, you can change the number of neighbors considering in the lookup proceduCOMMENT
MEDIUMnotebooks/chapter18/Decision Tree.py96# Then you can try a new example on the trained learner:COMMENT
MEDIUMnotebooks/chapter24/Objects in Images.py82# Within 5 epochs of training, the model accuracy on the training set improves from 35% to 42% while validation accuracyCOMMENT
Excessive Try-Catch Wrapping10 hits · 23 pts
SeverityFileLineSnippetContext
LOWlite/verify_browser.py126 except Exception:CODE
MEDIUMnotebooks/learning.py943print("Error ratio for k=1:", err_ratio(kNN_1, iris))CODE
MEDIUMnotebooks/learning.py944print("Error ratio for k=3:", err_ratio(kNN_3, iris))CODE
MEDIUMnotebooks/learning.py945print("Error ratio for k=5:", err_ratio(kNN_5, iris))CODE
MEDIUMnotebooks/learning.py946print("Error ratio for k=7:", err_ratio(kNN_7, iris))CODE
MEDIUMnotebooks/learning.py924print("Error ratio for Discrete:", err_ratio(nBD, iris))CODE
MEDIUMnotebooks/learning.py927print("Error ratio for Continuous:", err_ratio(nBC, iris))CODE
MEDIUMnotebooks/learning.py963print("Error ratio for Perceptron:", err_ratio(perceptron, iris2))CODE
MEDIUMnotebooks/learning.py1025print("Error ratio for adaboost: ", err_ratio(adaboost, iris2))CODE
MEDIUMnotebooks/chapter18/Ensemble Learning.py107print("Error ratio for adaboost: ", err_ratio(adaboost, iris2))CODE
Cross-Language Confusion6 hits · 22 pts
SeverityFileLineSnippetContext
HIGHlite/verify_browser.py18 cd lite && ./build.sh && python verify_browser.pySTRING
HIGHlite/verify_browser.py48 pyodide.setStdout({{batched: (s) => window.OUT.push(s)}});CODE
HIGHlite/verify_browser.py49 pyodide.setStderr({{batched: (s) => window.OUT.push(s)}});CODE
HIGHlite/verify_browser.py74 }} catch (e) {{ window.bootErr = e.toString(); }}CODE
HIGHlite/verify_browser.py95 return {ok: false, out: window.OUT.join('') + '\\n' + e.toString()};STRING
HIGHtests/test_nlp.py269 # retest function with values. Should now return falseSTRING
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/test_reinforcement_learning.py26 # Check if results are good enough.COMMENT
LOWtests/test_reinforcement_learning.py39 # Check if results are good enough.COMMENT
LOWtests/test_reinforcement_learning.py52 # Check if results are good enough.COMMENT
LOWtests/test_reinforcement_learning.py65 # Check if results are good enough.COMMENT
LOWnotebooks/agents.py433 #Check if agent is about to bump into a wallCOMMENT
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHnotebooks/probability.py736# Before we start, it will be helpful to understand the structure of a temporal model. We will use the example of the boCOMMENT
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_game_theory.py106# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_game_theory.py108# ---------------------------------------------------------------------------COMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWaima/planning.py1653CODE
LOWaima/probability.py584CODE
LOWaima/learning.py39CODE
LOWaima/knowledge.py355CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMnotebooks/probability.py1193# While constructing multi-agent systems, one major element in the design is the mechanism the agents use for making decCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_probability.py456 # TODO: Add tests for random motion/inaccurate sensorsCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWgui/grid_mdp.py573 def process_data(self, terminals, _height, _width, gridmdp):CODE
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWaima/making_simple_decisions.py11__all__ = ['DecisionNetwork', 'InformationGatheringAgent']CODE