Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
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).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aima/perception.py | 501 | # show the demo of rcnn, the model is from | COMMENT |
| LOW | notebooks/bootstrap.py | 1 | # --- | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 1 | # --- | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 21 | # The [knowledge](https://github.com/aimacode/aima-python/blob/master/knowledge.py) module covers **Chapter 19: Knowledg | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 41 | # ### First-Order Logic | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 61 | # We say that an example `e` is **consistent** with an hypothesis `h` if the assignment from the hypothesis for `e` is t | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 81 | # %% | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 101 | # | COMMENT |
| LOW | notebooks/knowledge_current_best.py | 141 | COMMENT | |
| LOW | notebooks/knowledge_current_best.py | 161 | # * How much does it cost (`Price`, takes values in [$, $$, $$$]) | COMMENT |
| LOW | notebooks/dynamic_decision_network.py | 1 | # --- | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 1 | # --- | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 21 | # # Improving Boolean Satisfiability Algorithms | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 41 | # | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 61 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 81 | # ***Freeman’s POSIT*** <a name="ref-1"/>[[1]](#cite-freeman1995improvements) version counts both the number of positive | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 101 | # %psource dlis | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 121 | # %% | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 141 | # The first difference between a DPLL solver and a CDCL solver is the introduction of the *non-chronological backtrackin | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 161 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 181 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 201 | # #### Luby | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 221 | # %psource luby | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 241 | # ### Australia | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 261 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 281 | # %time model = dpll_satisfiable(australia_sat, branching_heuristic=dlis) | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 341 | # %% | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 361 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 421 | # %time model = dpll_satisfiable(usa_sat, branching_heuristic=moms) | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 441 | # %% | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 481 | # %% [markdown] | COMMENT |
| LOW | notebooks/improving_sat_algorithms.py | 501 | COMMENT | |
| LOW | notebooks/improving_sat_algorithms.py | 521 | # ## References | COMMENT |
| LOW | notebooks/nlp_apps.py | 1 | # --- | COMMENT |
| LOW | notebooks/nlp_apps.py | 21 | # In this notebook we will take a look at some indicative applications of natural language processing. We will cover con | COMMENT |
| LOW | notebooks/nlp_apps.py | 101 | COMMENT | |
| LOW | notebooks/nlp_apps.py | 161 | COMMENT | |
| LOW | notebooks/nlp_apps.py | 181 | # Let's now take a look at a harder problem, classifying the authors of the [Federalist Papers](https://en.wikipedia.org | COMMENT |
| LOW | notebooks/nlp_apps.py | 201 | # %% [markdown] | COMMENT |
| LOW | notebooks/nlp_apps.py | 261 | madison = ''.join(madison) | COMMENT |
| LOW | notebooks/nlp_apps.py | 381 | print('Paper No. {}: {}'.format(d, ' '.join(results))) | COMMENT |
| LOW | notebooks/nlp_apps.py | 401 | # Some of the broad applications of Text Classification are:- | COMMENT |
| LOW | notebooks/nlp_apps.py | 481 | words_1 += sent | COMMENT |
| LOW | notebooks/planning_total_order_planner.py | 1 | # --- | COMMENT |
| LOW | notebooks/planning_total_order_planner.py | 21 | # In mathematical terminology, **total order**, **linear order** or **simple order** refers to a set *X* which is said t | COMMENT |
| LOW | notebooks/planning_total_order_planner.py | 41 | COMMENT | |
| LOW | notebooks/planning_partial_order_planner.py | 1 | # --- | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 21 | # The way a partial-order plan works enables it to take advantage of _problem decomposition_ and work on each subproblem | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 41 | # We will first describe the data-structures and helper methods used, followed by the algorithm used to find a partial-o | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 61 | # `causal_links` stores this information as tuples `(Action(A), precondition(p), Action(B))` which is interpreted as giv | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 81 | # <br> | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 101 | # %% [markdown] | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 121 | # <br> | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 161 | # <br> | COMMENT |
| LOW | notebooks/planning_partial_order_planner.py | 181 | # %% | COMMENT |
| LOW | notebooks/index.py | 1 | # --- | COMMENT |
| LOW | notebooks/index.py | 21 | # Welcome to the AIMA Python Code Repository. You should be seeing this index notebook if you clicked on the **Launch Bi | COMMENT |
| LOW | notebooks/index.py | 41 | # 8. [**Probability**](./probability.ipynb) | COMMENT |
| LOW | notebooks/knowledge_version_space.py | 1 | # --- | COMMENT |
| LOW | notebooks/knowledge_version_space.py | 21 | # The [knowledge](https://github.com/aimacode/aima-python/blob/master/knowledge.py) module covers **Chapter 19: Knowledg | COMMENT |
| 561 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 2 | CODE | |
| LOW | tests/test_perception.py | 5 | CODE | |
| LOW | tests/test_csp.py | 3 | CODE | |
| LOW | tests/test_deep_learning.py | 4 | CODE | |
| LOW | tests/test_search.py | 2 | CODE | |
| LOW | tests/test_knowledge.py | 3 | CODE | |
| LOW | tests/test_graphplan.py | 5 | CODE | |
| LOW | tests/test_learning.py | 3 | CODE | |
| LOW | tests/test_probabilistic_learning.py | 6 | CODE | |
| LOW | tests/test_text.py | 6 | CODE | |
| LOW | tests/test_reinforcement_learning.py | 3 | CODE | |
| LOW | tests/test_nlp.py | 10 | CODE | |
| LOW | tests/test_mdp.py | 3 | CODE | |
| LOW | tests/test_logic.py | 3 | CODE | |
| LOW | tests/test_games.py | 3 | CODE | |
| LOW | tests/test_planning.py | 5 | CODE | |
| LOW | tests/test_probability.py | 3 | CODE | |
| LOW | gui/romania_problem.py | 4 | CODE | |
| LOW | gui/tic-tac-toe.py | 2 | CODE | |
| LOW | gui/vacuum_agent.py | 2 | CODE | |
| LOW | gui/vacuum_agent.py | 4 | CODE | |
| LOW | gui/grid_mdp.py | 16 | CODE | |
| LOW | gui/genetic_algorithm_example.py | 13 | CODE | |
| LOW | gui/tsp.py | 1 | CODE | |
| LOW | gui/tsp.py | 5 | CODE | |
| LOW | gui/eight_puzzle.py | 5 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 2 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 4 | CODE | |
| LOW | aima/making_simple_decisions.py | 9 | CODE | |
| LOW | aima/making_simple_decisions.py | 9 | CODE | |
| LOW | aima/utils.py | 3 | CODE | |
| LOW | aima/search.py | 12 | CODE | |
| LOW | aima/probability.py | 10 | CODE | |
| LOW | aima/learning.py | 9 | CODE | |
| LOW | notebooks/knowledge_current_best.py | 26 | CODE | |
| LOW | notebooks/improving_sat_algorithms.py | 31 | CODE | |
| LOW | notebooks/improving_sat_algorithms.py | 238 | CODE | |
| LOW | notebooks/nlp_apps.py | 44 | CODE | |
| LOW | notebooks/nlp_apps.py | 123 | CODE | |
| LOW | notebooks/nlp_apps.py | 191 | CODE | |
| LOW | notebooks/nlp_apps.py | 281 | CODE | |
| LOW | notebooks/planning_total_order_planner.py | 39 | CODE | |
| LOW | notebooks/planning_partial_order_planner.py | 34 | CODE | |
| LOW | notebooks/knowledge_version_space.py | 26 | CODE | |
| LOW | notebooks/arc_consistency_heuristics.py | 34 | CODE | |
| LOW | notebooks/mdp_apps.py | 26 | CODE | |
| LOW | notebooks/mdp_apps.py | 27 | CODE | |
| LOW | notebooks/mdp_apps.py | 27 | CODE | |
| LOW | notebooks/planning_hierarchical_search.py | 48 | CODE | |
| LOW | notebooks/learning_apps.py | 24 | CODE | |
| LOW | notebooks/learning_apps.py | 25 | CODE | |
| LOW | notebooks/learning_apps.py | 26 | CODE | |
| LOW | notebooks/game_theory.py | 24 | CODE | |
| LOW | notebooks/planning_graph_plan.py | 64 | CODE | |
| LOW | notebooks/csp.py | 24 | CODE | |
| LOW | notebooks/planning_angelic_search.py | 29 | CODE | |
| LOW | notebooks/sarsa.py | 24 | CODE | |
| LOW | notebooks/games.py | 36 | CODE | |
| LOW | notebooks/reinforcement_learning.py | 24 | CODE | |
| LOW | notebooks/logic.py | 27 | CODE | |
| 80 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 284 | def test_priority_queue_with_objects(): | CODE |
| LOW | tests/test_utils.py | 302 | def test_priority_queue_ties_with_non_comparable_items(): | CODE |
| LOW⚡ | tests/test_perception.py | 18 | def test_sum_squared_difference(): | CODE |
| LOW⚡ | tests/test_perception.py | 28 | def test_gen_gray_scale_picture(): | CODE |
| LOW⚡ | tests/test_perception.py | 36 | def test_generate_edge_weight(): | CODE |
| LOW | tests/test_game_theory.py | 35 | def test_pure_nash_equilibria(): | CODE |
| LOW | tests/test_game_theory.py | 125 | def test_zero_sum_game_with_saddle_point(): | CODE |
| LOW | tests/test_game_theory.py | 161 | def test_alternating_offers_bargaining(): | CODE |
| LOW | tests/test_csp.py | 38 | def test_csp_count_lost_values(): | CODE |
| LOW | tests/test_csp.py | 131 | def test_csp_infer_assignment(): | CODE |
| LOW | tests/test_csp.py | 279 | def test_first_unassigned_variable(): | CODE |
| LOW | tests/test_csp.py | 326 | def test_unordered_domain_values(): | CODE |
| LOW | tests/test_csp.py | 562 | def test_different_values_constraint(): | CODE |
| LOW | tests/test_csp.py | 704 | def test_constraint_check_count(): | CODE |
| LOW⚡ | tests/test_search.py | 19 | def test_breadth_first_tree_search(): | CODE |
| LOW⚡ | tests/test_search.py | 25 | def test_breadth_first_graph_search(): | CODE |
| LOW⚡ | tests/test_search.py | 29 | def test_best_first_graph_search(): | CODE |
| LOW⚡ | tests/test_search.py | 51 | def test_depth_first_tree_search(): | CODE |
| LOW⚡ | tests/test_search.py | 55 | def test_depth_first_graph_search(): | CODE |
| LOW⚡ | tests/test_search.py | 60 | def test_iterative_deepening_search(): | CODE |
| LOW⚡ | tests/test_search.py | 65 | def test_depth_limited_search(): | CODE |
| LOW⚡ | tests/test_search.py | 73 | def test_bidirectional_search(): | CODE |
| LOW | tests/test_search.py | 87 | def test_tree_search_variants(): | CODE |
| LOW | tests/test_search.py | 100 | def test_iterative_deepening_astar_search(): | CODE |
| LOW | tests/test_search.py | 206 | def test_recursive_best_first_search(): | CODE |
| LOW | tests/test_search.py | 385 | def test_simple_problem_solving_agent(): | CODE |
| LOW | tests/test_search.py | 500 | def test_grid_search_visualization(): | CODE |
| LOW | tests/test_search.py | 515 | def test_local_search_variants(): | CODE |
| LOW | tests/test_knowledge.py | 55 | def test_current_best_learning(): | CODE |
| LOW | tests/test_knowledge.py | 78 | def test_version_space_learning(): | CODE |
| LOW | tests/test_knowledge.py | 94 | def test_minimal_consistent_det(): | CODE |
| LOW | tests/test_graphplan.py | 35 | def test_generalized_blocksworld_manual(): | CODE |
| LOW | tests/test_graphplan.py | 85 | def test_have_cake_and_eat_cake_too(): | CODE |
| LOW | tests/test_graphplan.py | 111 | def test_logistics_plan_valid(goal_state): | CODE |
| LOW | tests/test_graphplan.py | 117 | def test_rush_hour_manual_alt_sequence(): | CODE |
| LOW | tests/test_graphplan.py | 178 | def test_impossible_cake_exits_via_leveloff(): | CODE |
| LOW | tests/test_learning.py | 51 | def test_decision_tree_learner(): | CODE |
| LOW | tests/test_learning.py | 99 | def test_neural_network_learner(): | CODE |
| LOW | tests/test_learning.py | 207 | def test_decision_list_learner(): | CODE |
| LOW | tests/test_text.py | 143 | def test_viterbi_segmentation(): | CODE |
| LOW | tests/test_text.py | 194 | def test_counting_probability_distribution(): | CODE |
| LOW | tests/test_mdp.py | 154 | def test_pomdp_value_iteration(): | CODE |
| LOW | tests/test_logic.py | 102 | def test_parse_definite_clause(): | CODE |
| LOW | tests/test_logic.py | 161 | def test_dpll_branching_heuristics(): | CODE |
| LOW | tests/test_logic.py | 171 | def test_cdcl_restart_strategies(): | CODE |
| LOW | tests/test_logic.py | 270 | def test_eliminate_implications(): | CODE |
| LOW | tests/test_logic.py | 293 | def test_distribute_and_over_or(): | CODE |
| LOW | tests/test_logic.py | 331 | def test_standardize_variables(): | CODE |
| LOW | tests/test_logic.py | 408 | def test_hybrid_wumpus_agent_make_percept_sentence(): | CODE |
| LOW⚡ | tests/test_logic.py | 419 | def test_hybrid_wumpus_agent_plan_shot(): | CODE |
| LOW⚡ | tests/test_logic.py | 428 | def test_hybrid_wumpus_agent_plan_route_no_path(): | CODE |
| LOW⚡ | tests/test_logic.py | 434 | def test_hybrid_wumpus_agent_first_action(): | CODE |
| LOW | tests/test_games.py | 59 | def test_monte_carlo_tree_search(): | CODE |
| LOW | tests/test_planning.py | 145 | def test_have_cake_and_eat_cake_too(): | CODE |
| LOW | tests/test_planning.py | 467 | def test_find_open_precondition(): | CODE |
| LOW | tests/test_planning.py | 505 | def test_partial_order_planner(): | CODE |
| LOW | tests/test_planning.py | 518 | def test_partial_order_planner_solves_standard_problems(): | CODE |
| LOW | tests/test_planning.py | 657 | def test_hierarchical_search_max_depth(): | CODE |
| LOW | tests/test_planning.py | 728 | def test_optimistic_reachable_set(): | CODE |
| LOW | tests/test_planning.py | 743 | def test_pessimistic_reachable_set(): | CODE |
| 57 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_search.py | 385 | CODE | |
| LOW | tests/test_search.py | 398 | CODE | |
| LOW | docs/conf.py | 68 | CODE | |
| LOW | gui/romania_problem.py | 446 | CODE | |
| LOW | gui/romania_problem.py | 503 | CODE | |
| LOW | gui/romania_problem.py | 559 | CODE | |
| LOW | gui/vacuum_agent.py | 37 | CODE | |
| LOW | gui/grid_mdp.py | 132 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 63 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 74 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 105 | CODE | |
| LOW | gui/xy_vacuum_environment.py | 128 | CODE | |
| LOW | aima/deep_learning.py | 350 | CODE | |
| LOW | aima/deep_learning.py | 382 | CODE | |
| LOW | aima/game_theory.py | 41 | CODE | |
| LOW | aima/game_theory.py | 53 | CODE | |
| LOW | aima/csp.py | 200 | CODE | |
| LOW | aima/csp.py | 241 | CODE | |
| LOW | aima/csp.py | 295 | CODE | |
| LOW | aima/csp.py | 333 | CODE | |
| LOW | aima/csp.py | 428 | CODE | |
| LOW | aima/csp.py | 449 | CODE | |
| LOW | aima/csp.py | 863 | CODE | |
| LOW | aima/csp.py | 453 | CODE | |
| LOW | aima/csp.py | 745 | CODE | |
| LOW | aima/csp.py | 1092 | CODE | |
| LOW | aima/csp.py | 1290 | CODE | |
| LOW | aima/csp.py | 1321 | CODE | |
| LOW | aima/csp.py | 1394 | CODE | |
| LOW | aima/csp.py | 1447 | CODE | |
| LOW | aima/logic.py | 285 | CODE | |
| LOW | aima/logic.py | 362 | CODE | |
| LOW | aima/logic.py | 561 | CODE | |
| LOW | aima/logic.py | 918 | CODE | |
| LOW | aima/logic.py | 1816 | CODE | |
| LOW | aima/logic.py | 1868 | CODE | |
| LOW | aima/logic.py | 1884 | CODE | |
| LOW | aima/logic.py | 1920 | CODE | |
| LOW | aima/logic.py | 2069 | CODE | |
| LOW | aima/logic.py | 2128 | CODE | |
| LOW | aima/logic.py | 2185 | CODE | |
| LOW | aima/logic.py | 2218 | CODE | |
| LOW | aima/logic.py | 1372 | CODE | |
| LOW | aima/logic.py | 1601 | CODE | |
| LOW | aima/agents.py | 255 | CODE | |
| LOW | aima/agents.py | 266 | CODE | |
| LOW | aima/agents.py | 410 | CODE | |
| LOW | aima/agents.py | 448 | CODE | |
| LOW | aima/agents.py | 506 | CODE | |
| LOW | aima/agents.py | 820 | CODE | |
| LOW | aima/agents.py | 1006 | CODE | |
| LOW | aima/nlp.py | 366 | CODE | |
| LOW | aima/nlp.py | 492 | CODE | |
| LOW | aima/nlp.py | 433 | CODE | |
| LOW | aima/nlp.py | 501 | CODE | |
| LOW | aima/mdp.py | 343 | CODE | |
| LOW | aima/planning.py | 50 | CODE | |
| LOW | aima/planning.py | 90 | CODE | |
| LOW | aima/planning.py | 1100 | CODE | |
| LOW | aima/planning.py | 1135 | CODE | |
| 39 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | notebooks/improving_sat_algorithms.py | 38 | # Essentially, `DPLL` is a backtracking depth-first search through partial truth assignments which uses a *splitting rul | COMMENT |
| MEDIUM | notebooks/improving_sat_algorithms.py | 169 | # Implementation issues for SAT solvers include the design of suitable data structures for storing clauses. The implemen | COMMENT |
| MEDIUM | notebooks/nlp_apps.py | 219 | # 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 |
| MEDIUM | notebooks/planning_total_order_planner.py | 34 | # In the module, the `Linearize` class solves problems using this paradigm. | COMMENT |
| LOW | notebooks/mdp_apps.py | 198 | # This is not a conventional term, we just use it to minimize confusion between the two. | COMMENT |
| LOW | notebooks/csp.py | 100 | # The _ ___init___ _ method takes only one parameter **n** i.e. the size of the problem. To create an instance, we just | COMMENT |
| MEDIUM | notebooks/games.py | 254 | # 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 |
| MEDIUM | notebooks/games.py | 340 | # Below we see the best moves for MIN starting from B, C and D respectively. Note that the algorithm in these cases work | COMMENT |
| MEDIUM | notebooks/logic.py | 873 | # In this section we look at a forward chaining and a backward chaining algorithm for `FolKB`. Both aforementioned algor | COMMENT |
| MEDIUM | notebooks/nlp.py | 326 | # **Hyperlink-Induced Topic Search** (or HITS for short) is an algorithm for information retrieval and page ranking. You | COMMENT |
| MEDIUM | notebooks/nlp.py | 326 | # **Hyperlink-Induced Topic Search** (or HITS for short) is an algorithm for information retrieval and page ranking. You | COMMENT |
| LOW | notebooks/nlp.py | 549 | # And then we simply call the `parses` function: | COMMENT |
| MEDIUM | notebooks/search.py | 67 | # * **Informed search algorithms**: These type of algorithms leverage any information (heuristics, path cost) on the pro | COMMENT |
| MEDIUM | notebooks/search.py | 1849 | # Next we need to come up with a fitness function that appropriately scores individuals. Again, we will look at the prob | COMMENT |
| MEDIUM | notebooks/search.py | 1931 | # A gene's value in an individual `q` denotes the queen's column, and the position of the gene denotes its row. We can c | COMMENT |
| LOW | notebooks/search.py | 231 | # We can simply call the function with node_colors dictionary object to display it. | COMMENT |
| LOW | notebooks/search.py | 1687 | # There has to be some way of determining which phrases in our population have a better chance of eventually evolving in | COMMENT |
| LOW | notebooks/search.py | 1723 | # Great! Now, we need to define the most important metric for the genetic algorithm, i.e the fitness function. This will | COMMENT |
| MEDIUM | notebooks/learning.py | 215 | # Currently the `iris` dataset has three classes, setosa, virginica and versicolor. We want though to convert it to a bi | COMMENT |
| MEDIUM | notebooks/learning.py | 370 | # The Plurality Learner is a simple algorithm, used mainly as a baseline comparison for other algorithms. It finds the m | COMMENT |
| MEDIUM | notebooks/learning.py | 535 | # As the name of the algorithm and image above suggest, this algorithm creates the forest with a number of trees. The mo | COMMENT |
| MEDIUM | notebooks/learning.py | 594 | # We have a dataset with a set of classes (**C**) and we want to classify an item with a set of features (**F**). Essent | COMMENT |
| MEDIUM | notebooks/neural_nets.py | 39 | # After the input values are fed-forward into the network, the resulting output can be used for classification. The prob | COMMENT |
| LOW | notebooks/classical_planning_approaches.py | 155 | # A propositional planning procedure implements the basic idea just given but, because the agent does not know how many | COMMENT |
| MEDIUM | notebooks/chapter19/RNN.py | 79 | # Autoencoders are an unsupervised learning technique in which we leverage neural networks for the task of representatio | COMMENT |
| MEDIUM | notebooks/chapter18/Decision Tree.py | 153 | # As the name of the algorithm and image above suggest, this algorithm creates the forest with a number of trees. The mo | COMMENT |
| MEDIUM | notebooks/chapter18/Datasets.py | 188 | # Currently the iris dataset has three classes, setosa, virginica and versicolor. We want though to convert it to a bina | COMMENT |
| MEDIUM | notebooks/chapter22/nlp_apps.py | 221 | # 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 |
| LOW | notebooks/chapter22/Parsing.py | 85 | # And then we simply call the `parses` function: | COMMENT |
| MEDIUM | notebooks/chapter24/Image Edge Detection.py | 99 | # When considering the situation when there is strong noise in an image, the ups and downs of the noise will induce stro | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | gui/romania_problem.py | 0 | search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for example | STRING |
| HIGH | aima/search.py | 0 | search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for example | STRING |
| HIGH | notebooks/search.py | 0 | search the nodes with the lowest f scores first. you specify the function f(node) that you want to minimize; for example | STRING |
| HIGH | gui/romania_problem.py | 0 | a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searc | STRING |
| HIGH | aima/search.py | 0 | a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searc | STRING |
| HIGH | notebooks/search.py | 0 | a* search is best-first graph search with f(n) = g(n)+h(n). you need to specify the h function when you call astar_searc | STRING |
| HIGH | aima/csp.py | 0 | wa: 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 n | STRING |
| HIGH | aima/logic.py | 0 | wa: 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 n | STRING |
| HIGH | notebooks/improving_sat_algorithms.py | 0 | wa: 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 n | STRING |
| HIGH | aima/csp.py | 0 | al: 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 bo | STRING |
| HIGH | aima/logic.py | 0 | al: 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 bo | STRING |
| HIGH | notebooks/improving_sat_algorithms.py | 0 | al: 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 bo | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_games.py | 5 | # Creating the game instances | COMMENT |
| MEDIUM | aima/agents.py | 473 | """This class is for environments on a 2D plane, with locations | STRING |
| MEDIUM | notebooks/planning_graph_plan.py | 99 | # This method is invoked when the goal conditions haven't been met in the current level or the actions that lead to it a | COMMENT |
| MEDIUM | notebooks/mdp.py | 647 | # This function is represented as `b' = FORWARD(b, a, e)` | COMMENT |
| MEDIUM | notebooks/mdp.py | 733 | # Defining a POMDP is useless unless we can find a way to solve it. As POMDPs can have infinitely many belief states, we | COMMENT |
| MEDIUM | notebooks/planning.py | 109 | # This class represents an action given the expression, the preconditions and its effects. | COMMENT |
| MEDIUM | notebooks/search.py | 1412 | # Define a problem with these parameters. | COMMENT |
| MEDIUM | notebooks/probability.py | 1125 | # Define the sensor model as a function `P_sensor`. | COMMENT |
| MEDIUM | notebooks/vacuum_world.py | 89 | # Create the random agent | COMMENT |
| MEDIUM | notebooks/vacuum_world.py | 136 | # Create a table-driven agent | COMMENT |
| MEDIUM | notebooks/vacuum_world.py | 196 | # Create a simple reflex agent the two-state environment | COMMENT |
| MEDIUM | notebooks/vacuum_world.py | 241 | # Create a model-based reflex agent | COMMENT |
| MEDIUM | notebooks/chapter16-17/Partially Observable MDP.py | 127 | # This function is represented as `b' = FORWARD(b, a, e)` | COMMENT |
| MEDIUM | notebooks/chapter16-17/Partially Observable MDP.py | 216 | # Defining a POMDP is useless unless we can find a way to solve it. As POMDPs can have infinitely many belief states, we | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | notebooks/knowledge_current_best.py | 76 | # When specializing or generalizing, we should make sure to not create inconsistencies with previous examples. To avoid | COMMENT |
| MEDIUM | notebooks/knowledge_current_best.py | 87 | # As mentioned earlier, examples are dictionaries (with keys being the attribute names) and hypotheses are lists of dict | COMMENT |
| MEDIUM | notebooks/mdp_apps.py | 775 | # Perhaps you can try this as an exercise. | COMMENT |
| MEDIUM | notebooks/games.py | 105 | # The class `TicTacToe` has been inherited from the class `Game`. As mentioned earlier, you really want to do this. Catc | COMMENT |
| MEDIUM | notebooks/logic.py | 130 | # If the `|'==>'|` notation looks ugly to you, you can use the function `expr` instead: | COMMENT |
| MEDIUM | notebooks/intro.py | 57 | # From there, the notebook alternates explanations with examples of use. You can run the examples as they are, and you c | COMMENT |
| MEDIUM | notebooks/intro.py | 59 | # 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 fr | COMMENT |
| MEDIUM | notebooks/chapter19/Optimizer and Backpropagation.py | 58 | # To view the pseudocode and the implementation, you can use the following codes: | COMMENT |
| MEDIUM | notebooks/chapter18/Linear and Nonparametric Models.py | 131 | # Which is the same as expected. By altering k, you can change the number of neighbors considering in the lookup procedu | COMMENT |
| MEDIUM | notebooks/chapter18/Decision Tree.py | 96 | # Then you can try a new example on the trained learner: | COMMENT |
| MEDIUM | notebooks/chapter24/Objects in Images.py | 82 | # Within 5 epochs of training, the model accuracy on the training set improves from 35% to 42% while validation accuracy | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lite/verify_browser.py | 126 | except Exception: | CODE |
| MEDIUM⚡ | notebooks/learning.py | 943 | print("Error ratio for k=1:", err_ratio(kNN_1, iris)) | CODE |
| MEDIUM⚡ | notebooks/learning.py | 944 | print("Error ratio for k=3:", err_ratio(kNN_3, iris)) | CODE |
| MEDIUM⚡ | notebooks/learning.py | 945 | print("Error ratio for k=5:", err_ratio(kNN_5, iris)) | CODE |
| MEDIUM⚡ | notebooks/learning.py | 946 | print("Error ratio for k=7:", err_ratio(kNN_7, iris)) | CODE |
| MEDIUM | notebooks/learning.py | 924 | print("Error ratio for Discrete:", err_ratio(nBD, iris)) | CODE |
| MEDIUM | notebooks/learning.py | 927 | print("Error ratio for Continuous:", err_ratio(nBC, iris)) | CODE |
| MEDIUM | notebooks/learning.py | 963 | print("Error ratio for Perceptron:", err_ratio(perceptron, iris2)) | CODE |
| MEDIUM | notebooks/learning.py | 1025 | print("Error ratio for adaboost: ", err_ratio(adaboost, iris2)) | CODE |
| MEDIUM | notebooks/chapter18/Ensemble Learning.py | 107 | print("Error ratio for adaboost: ", err_ratio(adaboost, iris2)) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lite/verify_browser.py | 18 | cd lite && ./build.sh && python verify_browser.py | STRING |
| HIGH | lite/verify_browser.py | 48 | pyodide.setStdout({{batched: (s) => window.OUT.push(s)}}); | CODE |
| HIGH | lite/verify_browser.py | 49 | pyodide.setStderr({{batched: (s) => window.OUT.push(s)}}); | CODE |
| HIGH | lite/verify_browser.py | 74 | }} catch (e) {{ window.bootErr = e.toString(); }} | CODE |
| HIGH | lite/verify_browser.py | 95 | return {ok: false, out: window.OUT.join('') + '\\n' + e.toString()}; | STRING |
| HIGH | tests/test_nlp.py | 269 | # retest function with values. Should now return false | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_reinforcement_learning.py | 26 | # Check if results are good enough. | COMMENT |
| LOW | tests/test_reinforcement_learning.py | 39 | # Check if results are good enough. | COMMENT |
| LOW | tests/test_reinforcement_learning.py | 52 | # Check if results are good enough. | COMMENT |
| LOW | tests/test_reinforcement_learning.py | 65 | # Check if results are good enough. | COMMENT |
| LOW | notebooks/agents.py | 433 | #Check if agent is about to bump into a wall | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | notebooks/probability.py | 736 | # Before we start, it will be helpful to understand the structure of a temporal model. We will use the example of the bo | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_game_theory.py | 106 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_game_theory.py | 108 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aima/planning.py | 1653 | CODE | |
| LOW | aima/probability.py | 584 | CODE | |
| LOW | aima/learning.py | 39 | CODE | |
| LOW | aima/knowledge.py | 355 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | notebooks/probability.py | 1193 | # While constructing multi-agent systems, one major element in the design is the mechanism the agents use for making dec | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_probability.py | 456 | # TODO: Add tests for random motion/inaccurate sensors | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gui/grid_mdp.py | 573 | def process_data(self, terminals, _height, _width, gridmdp): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | aima/making_simple_decisions.py | 11 | __all__ = ['DecisionNetwork', 'InformationGatheringAgent'] | CODE |