Repository Analysis

google-deepmind/open_spiel

OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games.

16.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of google-deepmind/open_spiel, a C++ project with 5,325 GitHub stars. SynthScan v2.0 examined 338,739 lines of code across 1311 source files, recording 3928 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 16.4 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

16.4
Adjusted Score
16.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.3K
Stars
C++
Language
338.7K
Lines of Code
1.3K
Files
3.9K
Pattern Hits
2026-07-14
Scan Date
0.29
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 379MEDIUM 151LOW 3398

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 3928 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 Block2277 hits · 2104 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1# The core OpenSpiel pip dependencies.COMMENT
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOW__init__.py1# Copyright 2019 DeepMind Technologies LimitedCOMMENT
LOWsetup.py1# Copyright 2019 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/game_parameters.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/action_view.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/action_view.h81 int num_actions(Player pl) const { return legal_actions.at(pl).size(); }COMMENT
LOWopen_spiel/canonical_game_strings.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/canonical_game_strings.h21// can sent to LoadGame to load the game.COMMENT
LOWopen_spiel/observer.h1// Copyright 2019 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/observer.h21COMMENT
LOWopen_spiel/observer.h41// for accessing pieces of the observation tensor by name. See `observation.py`COMMENT
LOWopen_spiel/observer.h221COMMENT
LOWopen_spiel/observer.h241// within this sequence.COMMENT
LOWopen_spiel/observer.h261// his hand in the reflection. Even if everyone was aware of the mirror, thenCOMMENT
LOWopen_spiel/observer.h361 return tensors_info_;COMMENT
LOWopen_spiel/observer.h381 // Different computer architectures may use different EndiannessCOMMENT
LOWopen_spiel/observer.h441 observers() {COMMENT
LOWopen_spiel/policy.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/policy.h121 // player at this state. If the policy is not available at the state, returnsCOMMENT
LOWopen_spiel/tensor_game.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/tensor_game.h21#include <numeric>COMMENT
LOWopen_spiel/__init__.py1# Copyright 2019 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/spiel.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/spiel.h21#include <memory>COMMENT
LOWopen_spiel/spiel.h161 || provides_observation_string;COMMENT
LOWopen_spiel/spiel.h181// Information about a concrete Game instantiation.COMMENT
LOWopen_spiel/spiel.h301class State {COMMENT
LOWopen_spiel/spiel.h321 // Change the state of the game by applying the specified action in turn-basedCOMMENT
LOWopen_spiel/spiel.h361 // be overridden by simultaneous-move games. At least one player should have aCOMMENT
LOWopen_spiel/spiel.h381 // least one legal action.COMMENT
LOWopen_spiel/spiel.h481 // implemented. The default is to return 0 except at terminal states, whereCOMMENT
LOWopen_spiel/spiel.h581 // Is this a first state in the game, i.e. the initial state (root node)?COMMENT
LOWopen_spiel/spiel.h601 // well, like P1Jack and P2Jack. However prefixing by player number is notCOMMENT
LOWopen_spiel/spiel.h621 //COMMENT
LOWopen_spiel/spiel.h641 return InformationStateString(CurrentPlayer());COMMENT
LOWopen_spiel/spiel.h681 // Note that neither of these are valid information states, since the sameCOMMENT
LOWopen_spiel/spiel.h741 std::unique_ptr<State> child = Clone();COMMENT
LOWopen_spiel/spiel.h781 //COMMENT
LOWopen_spiel/spiel.h801 outcome_list.push_back(pair.first);COMMENT
LOWopen_spiel/spiel.h821 // Resamples a new history from the information state from player_id's view.COMMENT
LOWopen_spiel/spiel.h861 return {};COMMENT
LOWopen_spiel/spiel.h921// Breakthrough(8x8).COMMENT
LOWopen_spiel/spiel.h1001 // give some information to algorithms that require it, and so theirCOMMENT
LOWopen_spiel/spiel.h1061 }COMMENT
LOWopen_spiel/spiel.h1121 // Returns true if these games are equal, false otherwise.COMMENT
LOWopen_spiel/spiel.h1321// (with whitespace allowed).COMMENT
LOWopen_spiel/spiel.h1341COMMENT
LOWopen_spiel/spiel.h1361// parsed using LoadGame(string) and the state section is parsed usingCOMMENT
LOWopen_spiel/spiel.h1381// LoadGame.COMMENT
LOWopen_spiel/spiel_globals.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/spiel_utils.h1// Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWopen_spiel/spiel_utils.h21#include <cstdint>COMMENT
LOWopen_spiel/spiel_utils.h301 __FILE__, ":", __LINE__, " CHECK_TRUE(", #x, "): ", e), \COMMENT
LOWopen_spiel/spiel_utils.h321#define SPIEL_DCHECK_EQ(x, y) SPIEL_CHECK_EQ(x, y)COMMENT
LOWopen_spiel/spiel_utils.h341#define SPIEL_DCHECK_NE(x, y)COMMENT
LOWopen_spiel/spiel_utils.h441 int operator()(absl::Span<const double> probs);COMMENT
LOWopen_spiel/spiel_utils.h461// SPIEL_DEFINE_STRUCT(TicTacToeStateStruct, StateStruct,COMMENT
LOWopen_spiel/spiel_utils.h481// SPIEL_STRUCT_BOILERPLATE: Generates boilerplate for structs with inlineCOMMENT
LOWopen_spiel/spiel_utils.h501 nlohmann::json::parse(json_str).get_to(*this); \COMMENT
2217 more matches not shown…
Cross-File Repetition343 hits · 1715 pts
SeverityFileLineSnippetContext
HIGHopen_spiel/python/policy.py0returns the key to use to look up this (state, player) pair.STRING
HIGHopen_spiel/python/algorithms/policy_aggregator_joint.py0returns the key to use to look up this (state, player) pair.STRING
HIGHopen_spiel/python/algorithms/policy_aggregator.py0returns the key to use to look up this (state, player) pair.STRING
HIGHopen_spiel/python/algorithms/noisy_policy.py0returns the key to use to look up this (state, player) pair.STRING
HIGHopen_spiel/python/algorithms/policy_aggregator_joint.py0returns the policy for a player in a state. args: state: a `pyspiel.state` object. player_id: optional, the player id foSTRING
HIGHopen_spiel/python/algorithms/policy_aggregator.py0returns the policy for a player in a state. args: state: a `pyspiel.state` object. player_id: optional, the player id foSTRING
HIGHopen_spiel/python/algorithms/best_response.py0returns the policy for a player in a state. args: state: a `pyspiel.state` object. player_id: optional, the player id foSTRING
HIGHopen_spiel/python/algorithms/noisy_policy.py0returns the policy for a player in a state. args: state: a `pyspiel.state` object. player_id: optional, the player id foSTRING
HIGH…_spiel/python/algorithms/boltzmann_tabular_qlearner.py0returns a selected action and the probabilities of legal actions.STRING
HIGHopen_spiel/python/pytorch/boltzmann_dqn.py0returns a selected action and the probabilities of legal actions.STRING
HIGHopen_spiel/python/jax/boltzmann_dqn.py0returns a selected action and the probabilities of legal actions.STRING
HIGHopen_spiel/python/algorithms/wolf_phc.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/algorithms/tabular_qlearner.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/pytorch/eva.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/pytorch/policy_gradient.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/jax/policy_gradient.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/pytorch/nfsp.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/jax/nfsp.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/jax/dqn.py0returns the action to be taken and updates the q-network if needed. args: time_step: an instance of rl_environment.timesSTRING
HIGHopen_spiel/python/algorithms/cfr_br.py0performs a single step of policy evaluation and policy improvement.STRING
HIGHopen_spiel/python/algorithms/cfr.py0performs a single step of policy evaluation and policy improvement.STRING
HIGHopen_spiel/python/algorithms/discounted_cfr.py0performs a single step of policy evaluation and policy improvement.STRING
HIGHopen_spiel/python/algorithms/efr.py0performs a single step of policy evaluation and policy improvement.STRING
HIGH…l/python/algorithms/boltzmann_tabular_qlearner_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/algorithms/tabular_qlearner_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGH…en_spiel/python/examples/rrps_poprl/impala_jax_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/pytorch/dqn_pytorch_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/pytorch/ppo_pytorch_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/pytorch/boltzmann_dqn_pytorch_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/jax/dqn_jax_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGHopen_spiel/python/jax/boltzmann_dqn_jax_test.py0efg 2 r "simple single-agent problem" { "player 1" } "" p "root" 1 1 "root" { "l" "r" } 0 t "l" 1 "outcome l" { -1.0 } tSTRING
HIGH…python/algorithms/adidas_utils/solvers/symmetric/pg.py0regret matching does not minimize any exploitability so return nan. args: params: tuple of params (dist,) payoff_matriceSTRING
HIGH…hon/algorithms/adidas_utils/solvers/nonsymmetric/pg.py0regret matching does not minimize any exploitability so return nan. args: params: tuple of params (dist,) payoff_matriceSTRING
HIGH…/algorithms/adidas_utils/solvers/symmetric/regmatch.py0regret matching does not minimize any exploitability so return nan. args: params: tuple of params (dist,) payoff_matriceSTRING
HIGH…gorithms/adidas_utils/solvers/symmetric/adam_anneal.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/ate.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…on/algorithms/adidas_utils/solvers/nonsymmetric/ate.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…thms/adidas_utils/solvers/nonsymmetric/ate_regmatch.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…gorithms/adidas_utils/solvers/nonsymmetric/ate_poly.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…lgorithms/adidas_utils/solvers/symmetric/qre_anneal.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…lgorithms/adidas_utils/solvers/symmetric/ate_anneal.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…rithms/adidas_utils/solvers/nonsymmetric/ate_anneal.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…hms/adidas_utils/solvers/symmetric/qre_anneal_noaux.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/qre.py0compute and return gradients (and exploitabilities) for all parameters. args: params: tuple of params (dist, y), see qreSTRING
HIGH…gorithms/adidas_utils/solvers/symmetric/adam_anneal.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…lgorithms/adidas_utils/solvers/symmetric/qre_anneal.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…hms/adidas_utils/solvers/symmetric/qre_anneal_noaux.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/qre.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/ate.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…lgorithms/adidas_utils/solvers/symmetric/ate_anneal.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…on/algorithms/adidas_utils/solvers/nonsymmetric/ate.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…rithms/adidas_utils/solvers/nonsymmetric/ate_anneal.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…gorithms/adidas_utils/solvers/nonsymmetric/ate_poly.py0compute and return tsallis entropy regularized exploitability. args: params: tuple of params (dist, y), see ate.gradientSTRING
HIGH…gorithms/adidas_utils/solvers/symmetric/adam_anneal.py0computes exploitablity gradient and aux variable gradients. args: dist: 1-d np.array, current estimate of nash distributSTRING
HIGH…lgorithms/adidas_utils/solvers/symmetric/qre_anneal.py0computes exploitablity gradient and aux variable gradients. args: dist: 1-d np.array, current estimate of nash distributSTRING
HIGH…hms/adidas_utils/solvers/symmetric/qre_anneal_noaux.py0computes exploitablity gradient and aux variable gradients. args: dist: 1-d np.array, current estimate of nash distributSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/qre.py0computes exploitablity gradient and aux variable gradients. args: dist: 1-d np.array, current estimate of nash distributSTRING
HIGH…gorithms/adidas_utils/solvers/symmetric/adam_anneal.py0computes exploitablity gradient. assumption: eta_k = 1 for all k args: dist: 1-d np.array, current estimate of nash distSTRING
HIGH…thon/algorithms/adidas_utils/solvers/symmetric/adam.py0computes exploitablity gradient. assumption: eta_k = 1 for all k args: dist: 1-d np.array, current estimate of nash distSTRING
HIGH…ython/algorithms/adidas_utils/solvers/symmetric/sgd.py0computes exploitablity gradient. assumption: eta_k = 1 for all k args: dist: 1-d np.array, current estimate of nash distSTRING
283 more matches not shown…
Hyper-Verbose Identifiers788 hits · 815 pts
SeverityFileLineSnippetContext
LOWopen_spiel/bots/xinxin/xinxin_bot_test.py34 def test_basic_xinxin_selfplay(self):CODE
LOWopen_spiel/python/policy.py53def joint_action_probabilities_aux(state, policy):CODE
LOWopen_spiel/python/policy.py76def joint_action_probabilities(state, policy):CODE
LOWopen_spiel/python/policy.py473def get_tabular_policy_states(game):CODE
LOWopen_spiel/python/policy.py495def tabular_policy_from_callable(game, callable_policy, players=None):CODE
LOWopen_spiel/python/policy.py522def pyspiel_policy_to_python_policy(game, pyspiel_tabular_policy, players=None):CODE
LOWopen_spiel/python/policy.py550def python_policy_to_pyspiel_policy(python_tabular_policy):CODE
LOWopen_spiel/python/policy.py565def python_policies_to_pyspiel_policies(policies):CODE
LOWopen_spiel/python/egt/dynamics_test.py28def _sum_j_x_j_ln_x_j_over_x_i(x):CODE
LOWopen_spiel/python/egt/dynamics_test.py50 def test__sum_j_x_j_ln_x_j_over_x_i(self):CODE
LOWopen_spiel/python/egt/dynamics_test.py82 def test_rd_rps_pure_fixed_points(self):CODE
LOWopen_spiel/python/egt/dynamics_test.py94 def test_dynamics_rps_mixed_fixed_point(self, func):CODE
LOWopen_spiel/python/egt/dynamics_test.py101 def test_multi_population_rps(self):CODE
LOWopen_spiel/python/egt/dynamics_test.py109 def test_multi_population_three_populations(self):CODE
LOWopen_spiel/python/egt/dynamics_test.py116 def test_multi_population_four_populations(self):CODE
LOWopen_spiel/python/egt/utils_test.py86 def test_distribution_equivalent_implementation(self, num_items, num_slots):CODE
LOWopen_spiel/python/egt/utils_test.py95 def test_sort_rows_lexicographically(self):CODE
LOWopen_spiel/python/egt/utils_test.py136 def test_get_valid_next_profiles(self):CODE
LOWopen_spiel/python/egt/utils_test.py151 def test_constant_sum_checker(self):CODE
LOWopen_spiel/python/egt/utils_test.py162 def test_game_payoffs_array_rps(self):CODE
LOWopen_spiel/python/egt/utils_test.py171 def test_game_payoffs_array_pd(self):CODE
LOWopen_spiel/python/egt/alpharank.py256def _get_singlepop_transition_matrix(payoff_table,CODE
LOWopen_spiel/python/egt/alpharank.py327def _get_multipop_transition_matrix(payoff_tables,CODE
LOWopen_spiel/python/egt/alpharank.py692def compute_and_report_alpharank(payoff_tables,CODE
LOWopen_spiel/python/egt/alpharank_visualizer.py314def generate_sorted_masses_strats(pi_list, curr_alpha_idx, strats_to_go):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table.py177def from_heuristic_payoff_table(hpt):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table.py195def _compute_win_probability_from_elo(rating_1, rating_2):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table.py483 def get_distribution_from_profile(self, strat_profile):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table.py502def _multinomial_coefficients(distributions):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table_test.py29 def test__multinomial_coefficients(self):CODE
LOWopen_spiel/python/egt/heuristic_payoff_table_test.py79 def test_from_heuristic_payoff_table(self):CODE
LOWopen_spiel/python/egt/alpharank_test.py33 def test_stationary_distribution(self):CODE
LOWopen_spiel/python/egt/alpharank_test.py63 def test_constant_sum_transition_matrix(self):CODE
LOWopen_spiel/python/egt/utils.py146def sort_rows_lexicographically(array):CODE
LOWopen_spiel/python/egt/utils.py185def get_num_strats_per_population(payoff_tables, payoffs_are_hpt_format):CODE
LOWopen_spiel/python/egt/utils.py268def get_strat_profile_from_id(num_strats_per_population, profile_id):CODE
LOWopen_spiel/python/egt/utils.py294def get_label_from_strat_profile(num_populations, strat_profile, strat_labels):CODE
LOWopen_spiel/python/egt/utils.py321def get_id_from_strat_profile(num_strats_per_population, strat_profile):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py30 def test_complete_session_east(self):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py92 def test_complete_session_west(self):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py151 def test_invalid_fixed_message(self):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py168 def test_invalid_variable_message(self):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py189 def test_string_to_action_to_string_roundtrip(self):CODE
LOW…ython/bots/bluechip_bridge_uncontested_bidding_test.py197 def test_action_to_string_to_action_roundtrip(self):CODE
LOWopen_spiel/python/environments/catch_test.py24def _select_random_legal_action(time_step):CODE
LOWopen_spiel/python/environments/cliff_walking_test.py23def _select_random_legal_action(time_step):CODE
LOWopen_spiel/python/voting/base_test.py26 def test_basic_preference_profile(self):CODE
LOWopen_spiel/python/voting/base_test.py45 def test_basic_preference_profile_weighted(self):CODE
LOWopen_spiel/python/voting/base_test.py62 def test_preference_profile_incremental_group(self):CODE
LOWopen_spiel/python/voting/base_test.py98 def test_pref_margin_matrices_strong_condorcet(self):CODE
LOWopen_spiel/python/voting/elo.py23def compute_ratings_from_preference_profile(CODE
LOWopen_spiel/python/voting/maximal_lotteries_test.py31 def test_maximal_lotteries_basic_run(self):CODE
LOWopen_spiel/python/voting/maximal_lotteries_test.py45 def test_maximal_lotteries_basic_iterative(self):CODE
LOWopen_spiel/python/voting/maximal_lotteries_test.py67 def test_maximal_lotteries_cycle(self):CODE
LOWopen_spiel/python/voting/maximal_lotteries_test.py79 def test_maximal_lotteries_iterative_cycle(self):CODE
LOWopen_spiel/python/voting/stv.py82 def _initial_scores_for_round(CODE
LOWopen_spiel/python/voting/stv_test.py32 def test_ranked_pairs_wikipedia_example(self):CODE
LOWopen_spiel/python/voting/schulze_test.py28 def test_shulze_wikipedia_example(self):CODE
LOWopen_spiel/python/voting/elo_test.py47 def test_meeple_pentathlon_with_integer_alternatives(self):CODE
LOWopen_spiel/python/voting/ranked_pairs_test.py96 def test_ranked_pairs_simple_cycle(self):CODE
728 more matches not shown…
Decorative Section Separators111 hits · 314 pts
SeverityFileLineSnippetContext
MEDIUMopen_spiel/python/algorithms/sequence_form_lp_test.py119 # │ ├── P1: Stop ──────► Payoff (0, 0)COMMENT
MEDIUMopen_spiel/python/algorithms/sequence_form_lp_test.py120 # │ └── P1: Play ──────► P2 infoset (cannot see card)COMMENT
MEDIUMopen_spiel/python/algorithms/sequence_form_lp_test.py124 # ├── P1: Stop ──────► Payoff (0, 0)COMMENT
MEDIUMopen_spiel/python/algorithms/sequence_form_lp_test.py125 # └── P1: Play ──────► (same P2 infoset)COMMENT
MEDIUMopen_spiel/python/examples/deep_cfr_pytorch.py32# ---------------------------------------COMMENT
MEDIUMopen_spiel/python/examples/deep_cfr_jax.py39# ---------------------------------------COMMENT
MEDIUMopen_spiel/python/games/pokerkit_wrapper.py1473# ------------------------------------------------------------------------------COMMENT
MEDIUMopen_spiel/python/games/pokerkit_wrapper.py1474# ------------------------------------------------------------------------------COMMENT
MEDIUMopen_spiel/python/games/pokerkit_wrapper.py1475# ------------------------------------------------------------------------------COMMENT
MEDIUMopen_spiel/python/games/pokerkit_wrapper.py265# ------------------------------------------------------------------------------COMMENT
MEDIUMopen_spiel/python/games/pokerkit_wrapper.py2077# ------------------------------------------------------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt31# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt38# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt42# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt45# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt64# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt71# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt75# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt78# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt137# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt144# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt148# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt151# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt171# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt178# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt182# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt185# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt209# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt216# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt221# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt224# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt244# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt251# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt256# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt259# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt279# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt286# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt291# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt294# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt314# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt321# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt326# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt329# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt457# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt464# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt469# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt472# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt492# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt499# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt504# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt507# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt651# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt658# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt663# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt666# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt686# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt693# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt698# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt701# ---------------------------------COMMENT
MEDIUMopen_spiel/integration_tests/playthroughs/cribbage.txt897# ---------------------------------COMMENT
51 more matches not shown…
Docstring Block Structure32 hits · 160 pts
SeverityFileLineSnippetContext
HIGHopen_spiel/python/rl_environment.py338Updates the environment according to `actions` and returns a `TimeStep`. If the environment returned a `TimeStep` wSTRING
HIGHopen_spiel/python/egt/heuristic_payoff_table.py34Builds a heuristic payoff table from average win probabilities. Args: df: a Pandas dataframe of match results. MuSTRING
HIGHopen_spiel/python/egt/heuristic_payoff_table.py214Computes the Elo win probability payoff matrix `X` from the Elo scores. Args: elo_ratings: The elo scores vector STRING
HIGHopen_spiel/python/egt/heuristic_payoff_table.py281The expected payoff of each pure strategy against the mixed strategy. We define the expected payoff of a strategy ASTRING
HIGHopen_spiel/python/egt/utils.py223Returns strategy labels corresponding to a payoff_table. Namely, for games where strategies have no human-understandaSTRING
HIGHopen_spiel/python/algorithms/generate_playthrough.py466Returns the playthrough parameters from a playthrough record. Args: lines: The playthrough as a list of lines. STRING
HIGHopen_spiel/python/algorithms/exploitability.py121Returns the exploitability of the policy in the game. This is implemented only for 2 players constant-sum games, and STRING
HIGHopen_spiel/python/algorithms/exploitability.py165Returns a measure of closeness to Nash for a policy in the game. See https://arxiv.org/pdf/1711.00832.pdf for the NasSTRING
HIGH…iel/python/algorithms/psro_v2/abstract_meta_trainer.py31Process a callable or a string representing a callable. Args: string_or_callable: Either a string or a callable STRING
HIGHopen_spiel/python/algorithms/psro_v2/rl_oracle.py148Randomly samples a set of policies to run during the next episode. Note : sampling is biased to select players & stSTRING
HIGHopen_spiel/python/algorithms/psro_v2/rl_oracle.py214Generates new policies to be trained into best responses. Args: training_parameters: list of list of trainingSTRING
HIGHopen_spiel/python/algorithms/psro_v2/rl_oracle.py245Call method for oracle, returns best responses against a set of policies. Args: game: The game on which the oSTRING
HIGH…piel/python/algorithms/psro_v2/best_response_oracle.py97Call method for oracle, returns best responses for training_parameters. Args: game: The game on which the optSTRING
HIGHopen_spiel/python/algorithms/alpha_zero/utils.py33Allows to choose an implementation API. Args: api_version (str): either of {AVIALABLE_APIS} Returns: modelSTRING
HIGH…en_spiel/python/algorithms/alpha_zero/replay_buffer.py100Returns `num_samples` uniformly sampled from the buffer. Args: rng: `chex.PRNGKey`, a random state state: `ReSTRING
HIGHopen_spiel/python/mfg/tabular_distribution.py37Returns the probability of the distribution on the state string given. Args: state_str: A string. defauSTRING
HIGHopen_spiel/python/mfg/algorithms/bandit_regret.py135Quick implementation of the power method. Args: w_nus: Returns: Highest eigenvalue of the system. RaiseSTRING
HIGHopen_spiel/python/utils/reservoir_buffer.py54Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw.STRING
HIGHopen_spiel/python/utils/replay_buffer.py50Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw.STRING
HIGH…el/python/examples/mcp_tool_server/open_spiel_tools.py80Get detailed information about a specific OpenSpiel game. Args: game_name: The short name of the game (e.g., STRING
HIGHopen_spiel/python/pytorch/deep_cfr.py185Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw.STRING
HIGHopen_spiel/python/pytorch/nfsp.py115Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw.STRING
HIGHopen_spiel/python/pytorch/dqn.py97Returns `num_samples` uniformly sampled from the buffer. Args: num_samples: `int`, number of samples to draw.STRING
HIGHopen_spiel/python/pytorch/rcfr.py169Returns a behavioral policy at `state` from sequence weights. Args: sequence_weights: An array of non-negativSTRING
HIGHopen_spiel/python/pytorch/rcfr.py240Returns counterfactual regrets and reach weights as a tuple. Args: regret_player: The player for whom counterSTRING
HIGHopen_spiel/python/pytorch/rcfr.py265Compute `state`'s counterfactual regrets and reach weights. Args: state: An OpenSpiel `State`. reSTRING
HIGHopen_spiel/python/jax/deep_cfr.py153Returns `num_samples` uniformly sampled from the buffer. Args: rng: `chex.PRNGKey`, a random state statSTRING
HIGHopen_spiel/python/jax/nfsp.py137Returns `num_samples` uniformly sampled from the buffer. Args: rng: `chex.PRNGKey`, a random state statSTRING
HIGHopen_spiel/python/jax/rcfr.py179Returns a behavioral policy at `state` from sequence weights. Args: sequence_weights: An array of non-negativSTRING
HIGHopen_spiel/python/jax/rcfr.py250Returns counterfactual regrets and reach weights as a tuple. Args: regret_player: The player for whom counterSTRING
HIGHopen_spiel/python/jax/rcfr.py279Compute `state`'s counterfactual regrets and reach weights. Args: state: An OpenSpiel `State`. reSTRING
HIGHopen_spiel/python/games/chat_games/chat_game_base.py1204Generates a list of distinct prompts from an initial list. Args: key: str, (descriptive) name of prompt type STRING
Deep Nesting144 hits · 136 pts
SeverityFileLineSnippetContext
LOWopen_spiel/python/policy.py250CODE
LOWopen_spiel/python/egt/alpharank.py256CODE
LOWopen_spiel/python/egt/alpharank.py327CODE
LOWopen_spiel/python/egt/alpharank.py576CODE
LOWopen_spiel/python/egt/alpharank_visualizer.py356CODE
LOWopen_spiel/python/egt/alpharank_visualizer.py180CODE
LOWopen_spiel/python/egt/visualization.py461CODE
LOWopen_spiel/python/egt/visualization.py495CODE
LOWopen_spiel/python/bots/bluechip_bridge.py116CODE
LOWopen_spiel/python/bots/bluechip_bridge.py225CODE
LOWopen_spiel/python/bots/bluechip_bridge.py323CODE
LOWopen_spiel/python/voting/elo.py23CODE
LOWopen_spiel/python/voting/stv.py111CODE
LOWopen_spiel/python/voting/ranked_pairs.py57CODE
LOWopen_spiel/python/voting/schulze.py33CODE
LOWopen_spiel/python/voting/preflib_util.py21CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py50CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py81CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py122CODE
LOWopen_spiel/python/algorithms/policy_aggregator_joint.py173CODE
LOWopen_spiel/python/algorithms/response_graph_ucb.py187CODE
LOWopen_spiel/python/algorithms/response_graph_ucb.py204CODE
LOWopen_spiel/python/algorithms/response_graph_ucb.py284CODE
LOWopen_spiel/python/algorithms/response_graph_ucb.py302CODE
LOWopen_spiel/python/algorithms/response_graph_ucb.py351CODE
LOWopen_spiel/python/algorithms/minimax.py152CODE
LOWopen_spiel/python/algorithms/best_response_test.py82CODE
LOWopen_spiel/python/algorithms/jpsro.py148CODE
LOWopen_spiel/python/algorithms/jpsro.py319CODE
LOWopen_spiel/python/algorithms/jpsro.py1048CODE
LOWopen_spiel/python/algorithms/jpsro.py1184CODE
LOWopen_spiel/python/algorithms/evaluate_bots.py20CODE
LOWopen_spiel/python/algorithms/policy_aggregator.py181CODE
LOWopen_spiel/python/algorithms/fictitious_play.py196CODE
LOWopen_spiel/python/algorithms/noisy_policy_test.py59CODE
LOWopen_spiel/python/algorithms/value_iteration.py73CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py102CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py211CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py465CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py530CODE
LOWopen_spiel/python/algorithms/ismcts.py161CODE
LOWopen_spiel/python/algorithms/async_mcts.py664CODE
LOWopen_spiel/python/algorithms/discounted_cfr.py190CODE
LOWopen_spiel/python/algorithms/mmd_dilated.py232CODE
LOWopen_spiel/python/algorithms/mcts.py370CODE
LOWopen_spiel/python/algorithms/efr.py937CODE
LOWopen_spiel/python/algorithms/efr.py1129CODE
LOWopen_spiel/python/algorithms/efr.py1151CODE
LOWopen_spiel/python/algorithms/efr.py1220CODE
LOWopen_spiel/python/algorithms/efr.py442CODE
LOW…en_spiel/python/algorithms/response_graph_ucb_utils.py66CODE
LOW…en_spiel/python/algorithms/response_graph_ucb_utils.py200CODE
LOWopen_spiel/python/algorithms/matrix_nash.py47CODE
LOWopen_spiel/python/algorithms/matrix_nash.py106CODE
LOWopen_spiel/python/algorithms/lp_solver.py520CODE
LOW…l/python/algorithms/psro_v2/strategy_selectors_test.py144CODE
LOWopen_spiel/python/algorithms/psro_v2/psro_v2.py370CODE
LOW…ithms/adidas_utils/solvers/nonsymmetric/adam_anneal.py260CODE
LOW…on/algorithms/adidas_utils/solvers/nonsymmetric/sgd.py94CODE
LOW…n/algorithms/adidas_utils/solvers/nonsymmetric/adam.py157CODE
84 more matches not shown…
Unused Imports127 hits · 126 pts
SeverityFileLineSnippetContext
LOW__init__.py21CODE
LOWopen_spiel/python/voting/examples/atari.py19CODE
LOWopen_spiel/python/voting/examples/atari.py23CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py19CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py21CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py24CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py26CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py31CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py32CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py34CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py36CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py38CODE
LOWopen_spiel/python/voting/examples/chatbot_arena.py41CODE
LOWopen_spiel/python/voting/examples/example.py19CODE
LOWopen_spiel/python/voting/examples/example.py21CODE
LOWopen_spiel/python/voting/examples/example.py22CODE
LOW…en_spiel/python/algorithms/expected_game_score_test.py20CODE
LOWopen_spiel/python/algorithms/best_response_test.py22CODE
LOWopen_spiel/python/algorithms/noisy_policy_test.py20CODE
LOWopen_spiel/python/algorithms/get_all_states.py23CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py32CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py33CODE
LOWopen_spiel/python/algorithms/best_response.py28CODE
LOWopen_spiel/python/algorithms/async_mcts.py30CODE
LOW…python/algorithms/adidas_utils/solvers/symmetric/pg.py17CODE
LOW…gorithms/adidas_utils/solvers/symmetric/adam_anneal.py17CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/ate.py17CODE
LOW…/algorithms/adidas_utils/solvers/symmetric/regmatch.py17CODE
LOW…lgorithms/adidas_utils/solvers/symmetric/qre_anneal.py17CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/sgd.py17CODE
LOW…hms/adidas_utils/solvers/symmetric/qre_anneal_noaux.py17CODE
LOW…thon/algorithms/adidas_utils/solvers/symmetric/adam.py17CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/ped.py17CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/qre.py17CODE
LOW…lgorithms/adidas_utils/solvers/symmetric/ate_anneal.py17CODE
LOW…hon/algorithms/adidas_utils/solvers/nonsymmetric/pg.py17CODE
LOW…ithms/adidas_utils/solvers/nonsymmetric/adam_anneal.py17CODE
LOW…on/algorithms/adidas_utils/solvers/nonsymmetric/ate.py17CODE
LOW…thms/adidas_utils/solvers/nonsymmetric/ate_regmatch.py17CODE
LOW…gorithms/adidas_utils/solvers/nonsymmetric/regmatch.py17CODE
LOW…rithms/adidas_utils/solvers/nonsymmetric/qre_anneal.py17CODE
LOW…on/algorithms/adidas_utils/solvers/nonsymmetric/sgd.py17CODE
LOW…n/algorithms/adidas_utils/solvers/nonsymmetric/adam.py17CODE
LOW…on/algorithms/adidas_utils/solvers/nonsymmetric/ped.py17CODE
LOW…on/algorithms/adidas_utils/solvers/nonsymmetric/qre.py17CODE
LOW…rithms/adidas_utils/solvers/nonsymmetric/ate_anneal.py17CODE
LOW…gorithms/adidas_utils/solvers/nonsymmetric/ate_poly.py18CODE
LOW…en_spiel/python/algorithms/adidas_utils/games/gamut.py21CODE
LOW…n_spiel/python/algorithms/adidas_utils/helpers/misc.py17CODE
LOW…piel/python/algorithms/adidas_utils/helpers/simplex.py17CODE
LOW…n/algorithms/adidas_utils/helpers/symmetric/updates.py17CODE
LOW…ithms/adidas_utils/helpers/symmetric/exploitability.py17CODE
LOW…gorithms/adidas_utils/helpers/symmetric/game_runner.py18CODE
LOW…lgorithms/adidas_utils/helpers/nonsymmetric/updates.py17CODE
LOW…ms/adidas_utils/helpers/nonsymmetric/exploitability.py17CODE
LOW…ithms/adidas_utils/helpers/nonsymmetric/game_runner.py20CODE
LOWopen_spiel/python/tests/games_sim_test.py25CODE
LOWopen_spiel/python/tests/games_sim_test.py27CODE
LOWopen_spiel/python/tests/policy_test.py19CODE
LOWopen_spiel/python/tests/pyspiel_test.py22CODE
67 more matches not shown…
Self-Referential Comments33 hits · 83 pts
SeverityFileLineSnippetContext
MEDIUMopen_spiel/python/environments/iterated_matrix_game.py15"""This module implements a generic environment for iterated normal form games.STRING
MEDIUMopen_spiel/python/voting/base_test.py27 # Create a preference profile from preferences:COMMENT
MEDIUMopen_spiel/python/voting/base_test.py46 # Create a weighted preference profile from preferences:COMMENT
MEDIUMopen_spiel/python/voting/base_test.py63 # Create a weighted preference profile from preferences:COMMENT
MEDIUMopen_spiel/python/voting/ranked_pairs.py176 # Create the top-ranked pair. This needs to be in a conditional block,COMMENT
MEDIUMopen_spiel/python/voting/schulze.py64 # Define the scores as the sum of preferences for everything it beats inCOMMENT
MEDIUMopen_spiel/python/voting/examples/example.py29 # Create a preference profile that represents the following votes:COMMENT
MEDIUMopen_spiel/python/algorithms/mcts_agent_test.py29 # Create the MCTS bot. Both agents can share the same bot in this case sinceCOMMENT
MEDIUMopen_spiel/python/algorithms/ismcts_agent_test.py35 # Create the MCTS bot. Both agents can share the same bot in this case sinceCOMMENT
MEDIUMopen_spiel/python/tests/pyspiel_test.py484 # Create a reference state with one move appliedCOMMENT
MEDIUM…ython/mfg/algorithms/munchausen_deep_mirror_descent.py120 # Create the replay buffer.COMMENT
MEDIUM…ython/mfg/algorithms/munchausen_deep_mirror_descent.py126 # Create the Q-network.COMMENT
MEDIUM…ython/mfg/algorithms/munchausen_deep_mirror_descent.py150 # Create the loss function and the optimizer.COMMENT
MEDIUM…algorithms/pytorch/mfg_proximal_policy_optimization.py282 """This function is used to log the results to tensor board."""STRING
MEDIUM…n_spiel/python/mfg/examples/mfg_munchausen_domd_jax.py135 # Create the environments with uniform initial policy.COMMENT
MEDIUM…n_spiel/python/mfg/examples/mfg_munchausen_domd_jax.py153 # Create the agents.COMMENT
MEDIUM…g/examples/mfg_proximal_policy_optimization_pytorch.py171 # Create the game instanceCOMMENT
MEDIUM…piel/python/mfg/examples/mfg_average_network_fp_jax.py134 # Create the environments with uniform initial policy.COMMENT
MEDIUMopen_spiel/python/mfg/games/normal_form_game.py212 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/mfg/games/predator_prey.py482 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/mfg/games/periodic_aversion.py307 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/mfg/games/crowd_modelling.py210 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/mfg/games/factory.py124 # Create a copy since we modify it below removing the network key.COMMENT
MEDIUMopen_spiel/python/mfg/games/linear_quadratic.py282 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/mfg/games/crowd_avoidance.py502 """This function is central and specific to the logic of the MFG.STRING
MEDIUMopen_spiel/python/utils/metrics_test.py30 # Create the writer.COMMENT
MEDIUMopen_spiel/python/examples/example.py42 # Create the initial stateCOMMENT
MEDIUMopen_spiel/python/pytorch/dqn.py290 # Create the Q-network instancesCOMMENT
MEDIUMopen_spiel/python/jax/dqn.py314 # Create the Q-network instancesCOMMENT
MEDIUMopen_spiel/scripts/install.sh38# This function is only run on Github Actions!COMMENT
MEDIUMopen_spiel/scripts/install.sh79# Create the cache directory.COMMENT
MEDIUMopen_spiel/scripts/global_variables.sh17# This file contains the global variables that control conditional dependencies.COMMENT
MEDIUMopen_spiel/scripts/test_wheel.sh17# This file is called by the wheels workflow .github/workflows/wheels.yml.COMMENT
AI Structural Patterns38 hits · 38 pts
SeverityFileLineSnippetContext
LOWopen_spiel/python/egt/alpharank.py433CODE
LOWopen_spiel/python/egt/alpharank.py576CODE
LOWopen_spiel/python/algorithms/jpsro.py1420CODE
LOWopen_spiel/python/algorithms/async_mcts.py365CODE
LOWopen_spiel/python/algorithms/psro_v2/psro_v2.py69CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/ate.py30CODE
LOW…lgorithms/adidas_utils/solvers/symmetric/qre_anneal.py29CODE
LOW…hms/adidas_utils/solvers/symmetric/qre_anneal_noaux.py29CODE
LOW…ython/algorithms/adidas_utils/solvers/symmetric/qre.py29CODE
LOW…lgorithms/adidas_utils/solvers/symmetric/ate_anneal.py30CODE
LOW…rithms/adidas_utils/solvers/nonsymmetric/qre_anneal.py29CODE
LOW…rithms/adidas_utils/solvers/nonsymmetric/ate_anneal.py30CODE
LOWopen_spiel/python/mfg/algorithms/bandit_regret.py190CODE
LOWopen_spiel/python/mfg/algorithms/bandit_regret.py264CODE
LOWopen_spiel/python/mfg/algorithms/bandit_regret.py516CODE
LOW…ython/mfg/algorithms/munchausen_deep_mirror_descent.py55CODE
LOW…thon/mfg/algorithms/average_network_fictitious_play.py56CODE
LOWopen_spiel/python/mfg/algorithms/regret/hedge.py28CODE
LOW…spiel/python/mfg/algorithms/regret/regret_minimizer.py48CODE
LOW…_spiel/python/mfg/algorithms/regret/regret_matching.py62CODE
LOW…iel/python/mfg/algorithms/regret/nash_random_search.py54CODE
LOW…thon/mfg/algorithms/regret/nash_evolutionary_search.py56CODE
LOW…iel/python/mfg/algorithms/regret/polynomial_weights.py37CODE
LOWopen_spiel/python/visualizations/treeviz.py130CODE
LOWopen_spiel/python/examples/rrps_poprl/impala.py190CODE
LOWopen_spiel/python/pytorch/deep_cfr.py230CODE
LOWopen_spiel/python/pytorch/eva.py81CODE
LOWopen_spiel/python/pytorch/policy_gradient.py123CODE
LOWopen_spiel/python/pytorch/nfsp.py143CODE
LOWopen_spiel/python/pytorch/dqn.py215CODE
LOWopen_spiel/python/pytorch/ppo.py168CODE
LOWopen_spiel/python/jax/opponent_shaping.py605CODE
LOWopen_spiel/python/jax/deep_cfr.py233CODE
LOWopen_spiel/python/jax/policy_gradient.py186CODE
LOWopen_spiel/python/jax/nfsp.py164CODE
LOWopen_spiel/python/jax/dqn.py237CODE
LOWopen_spiel/python/games/chat_game.py90CODE
LOWopen_spiel/python/games/chat_games/chat_game_base.py880CODE
Redundant / Tautological Comments10 hits · 15 pts
SeverityFileLineSnippetContext
LOWopen_spiel/python/voting/base.py166 # Check if any alternatives are registered for this profile. If not, thenCOMMENT
LOWopen_spiel/python/algorithms/response_graph_ucb.py424 # Add nodes to queueCOMMENT
LOWopen_spiel/python/algorithms/mmd_dilated_test.py96 # Check if a QRE solution is a fixed point of MMDCOMMENT
LOWopen_spiel/python/examples/dqn_lewis_signaling.py247 # Loop over data dimensions and create text annotations.COMMENT
LOWopen_spiel/python/examples/lewis_signaling_qlearner.py266 # Loop over data dimensions and create text annotations.COMMENT
LOWopen_spiel/python/examples/rrps_poprl/poprl_main.py127# Set this to something specific for testing. List of IDsCOMMENT
LOWopen_spiel/python/examples/rrps_poprl/poprl_main.py128# Set back to None to use full population.COMMENT
LOWopen_spiel/python/games/team_dominoes.py181 # Check if all hands are of _HAND_SIZECOMMENT
LOWopen_spiel/python/games/team_dominoes.py209 # Check if a team has played all their tiles.COMMENT
LOWopen_spiel/scripts/install.sh328 # Set brew to use the specific python versionCOMMENT
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHopen_spiel/python/games/dynamic_routing_utils.py31# as requested by Open Spiel.COMMENT
HIGH…en_spiel/games/dynamic_routing/dynamic_routing_utils.h37// as requested by Open Spiel.COMMENT
AI Slop Vocabulary5 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMopen_spiel/normal_form_game.h30// also known as a one-shot game or strategic-form game. Essentially, allCOMMENT
MEDIUMopen_spiel/bots/roshambo/roshambo_bot.h48// results were remarkably robust, and increasing the match length to 10000COMMENT
LOWopen_spiel/python/games/pokerkit_wrapper.py1580 # easier to just use it rather than checking the relevant values forCOMMENT
MEDIUMopen_spiel/python/games/repeated_pokerkit_test.py755 # Definitely excessive, but triple checking this again just to be certain.COMMENT
LOWopen_spiel/scripts/install.sh62# Instead, just call project-root install.sh file:COMMENT
Excessive Try-Catch Wrapping7 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMopen_spiel/python/egt/alpharank.py531 print('Error: ', value_error, epsilon, min_epsilon)CODE
LOWopen_spiel/python/algorithms/generate_playthrough.py555 except Exception as e: # pylint: disable=broad-exceptCODE
MEDIUMopen_spiel/python/algorithms/lp_solver.py326 print(f"Something went wrong, as of {e}")CODE
LOWopen_spiel/python/algorithms/alpha_zero/alpha_zero.py171 except Exception as e:CODE
LOWopen_spiel/python/tests/games_sim_test.py114 except Exception: # pylint: disable=broad-exceptCODE
LOWopen_spiel/python/tests/test_installation.py43 except Exception as e: # pragma: no cover - diagnostic scriptCODE
MEDIUMopen_spiel/python/tests/games_crossword_test.py174 print(f"Error creating action struct: {e}")CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHopen_spiel/games/oh_hell/oh_hell.h37// number of tricks they bid. In this implementation, a player scores 1 pointCOMMENT
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOW__init__.py23__all__ = ["pyspiel"]CODE
LOW…spiel/python/examples/meta_cfr/sequential_games/cfr.py224def update_regrets(infostates: List[InfostateNode]) -> None:CODE
LOWopen_spiel/python/pytorch/boltzmann_dqn.py107 def update_prev_q_network(self) -> None:CODE
LOWopen_spiel/python/jax/opponent_shaping.py743 def update_params(self, state: TrainState, player_id: int) -> None:CODE
LOWopen_spiel/python/games/pokerkit_wrapper.py1434 def set_from(self, state, player) -> None:CODE
LOWopen_spiel/python/games/repeated_pokerkit.py1144 def set_from(self, state, player) -> None:CODE
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWopen_spiel/python/egt/heuristic_payoff_table.py494# Usage:COMMENT
LOWopen_spiel/scripts/argslib.sh29# Example usage:COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMopen_spiel/python/games/pokerkit_wrapper_test.py3072 # As discussed above, the extra forced check by universal_poker doesCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHopen_spiel/python/policy.py530 (the other player's policies will be undefined). Default value of `None`STRING