Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CodeClash-ai/CodeClash
/ functions
Functions
1,100 in github.com/CodeClash-ai/CodeClash
⨍
Functions
1,100
◇
Types & classes
168
↳
Endpoints
14
↓ 490 callers
Method
get
Get cached value if it exists and hasn't expired
codeclash/viewer/app.py:115
↓ 111 callers
Method
execute
(self, action: str | dict, cwd: str = "", *, timeout: int | None = None)
codeclash/utils/environment.py:30
↓ 73 callers
Method
validate_code
Verify that the given agent can be run by the game. Args: agent: The agent to verify Returns: Boolean indica
codeclash/arenas/arena.py:316
↓ 68 callers
Function
mock_player_factory
Factory fixture for creating mock players.
tests/arenas/conftest.py:88
↓ 53 callers
Method
get_results
Determine the winner of the game based on the result output. Modifies the stats object in place. Args: agents: List of ag
codeclash/arenas/arena.py:298
↓ 25 callers
Function
assert_zero_exit_code
(result: dict, *, logger: logging.Logger | None = None)
codeclash/utils/environment.py:36
↓ 25 callers
Method
log_round
(self, round_num: int)
codeclash/arenas/arena.py:183
↓ 23 callers
Method
run
Given the observation / recap, update the codebase
codeclash/agents/player.py:140
↓ 20 callers
Method
close
(self)
codeclash/arenas/scml/runtime/run_scml.py:270
↓ 16 callers
Method
_parse_simulation_log
Parse a single simulation log to determine the winner. Args: log_path: Path to the log file sim_meta: Simulation meta
codeclash/arenas/battlecode24/battlecode24.py:254
↓ 16 callers
Method
format
(self, record: logging.LogRecord)
codeclash/utils/log.py:31
↓ 16 callers
Function
showModalWarning
(message)
codeclash/viewer/static/js/picker.js:176
↓ 15 callers
Method
_create_json_sim_file
Helper to create a JSON simulation result file.
tests/arenas/test_robotrumble.py:153
↓ 15 callers
Function
get_logger
Get logger. Use this instead of `logging.getLogger` to ensure that the logger is set up with the correct handlers.
codeclash/utils/log.py:105
↓ 13 callers
Function
escapeHtml
(text)
codeclash/viewer/static/js/trajectory.js:322
↓ 13 callers
Method
query
(self, messages: list[dict[str, str]], **kwargs)
codeclash/agents/mini_anthropic_model.py:184
↓ 12 callers
Method
get_path
Get value from nested dictionary using dot notation path Args: path: Dot-separated path like "config.tournament.rounds"
codeclash/viewer/app.py:222
↓ 11 callers
Method
_create_sim_file
Helper to create a simulation result file.
tests/arenas/test_battlesnake.py:162
↓ 10 callers
Method
_create_sim_log
Create a simulation log file. Args: results: List of (player_num, name, rank) tuples
tests/arenas/test_halite.py:149
↓ 10 callers
Method
_record_error
(self, event: str, error: str, *, invalid: bool = False)
codeclash/arenas/scml/runtime/run_scml.py:260
↓ 10 callers
Function
hideModalWarning
()
codeclash/viewer/static/js/picker.js:183
↓ 9 callers
Method
_create_sim_log
Create a simulation log file. Args: winner_key: "A" or "B" to indicate which player won is_coin_flip: If Tru
tests/arenas/test_battlecode25.py:124
↓ 9 callers
Method
bt_to_elo
Convert Bradley-Terry strength to Elo rating. Formula: R_i = R_0 + (β/ln(10)) * s_i where β = 400 (ELO_SLOPE), R_0 = 1200 (ELO_BASE)
codeclash/analysis/metrics/elo.py:338
↓ 8 callers
Method
_game_arg
(self, key: str)
codeclash/arenas/bomberland/bomberland.py:56
↓ 8 callers
Function
applyFilters
()
codeclash/viewer/static/js/picker.js:929
↓ 8 callers
Function
escapeHtml
(text)
codeclash/viewer/static/js/app.js:679
↓ 8 callers
Function
to_plain
(value)
codeclash/arenas/scml/runtime/run_scml.py:56
↓ 7 callers
Method
_create_sim_log
Helper to create a simulation log file.
tests/arenas/test_battlecode24.py:275
↓ 7 callers
Method
_game_arg
(self, key: str)
codeclash/arenas/scml/scml.py:40
↓ 7 callers
Function
getVisibleCheckedCheckboxes
()
codeclash/viewer/static/js/picker.js:187
↓ 7 callers
Function
get_name
(p)
codeclash/utils/generate_confs.py:105
↓ 7 callers
Function
is_running_in_aws_batch
Returns True if running in AWS Batch, False otherwise.
codeclash/utils/aws.py:9
↓ 6 callers
Method
_create_sim_log
Helper to create a simulation log file.
tests/arenas/test_battlecode23.py:262
↓ 6 callers
Method
_write_pgn
(self, file_path, white: str, black: str, result: str)
tests/arenas/test_chess.py:127
↓ 6 callers
Function
create_file_in_container
Create a file with given content on a Docker container. Uses a temporary file on the local filesystem for the transfer.
codeclash/utils/environment.py:164
↓ 6 callers
Function
filter_git_diff
Return a git diff with any file sections mentioning binary content removed.
codeclash/tournaments/utils/git_utils.py:6
↓ 6 callers
Function
is_game_folder
Check if a directory contains metadata.json and is therefore a game folder
codeclash/viewer/app.py:351
↓ 6 callers
Method
parse
Decode raw sim bytes into a :class:`ReplayData`. Input format is opaque.
codeclash/replay/base.py:93
↓ 6 callers
Method
run
Main execution function that runs all rounds.
codeclash/tournaments/pvp.py:86
↓ 6 callers
Function
saveFilters
()
codeclash/viewer/static/js/picker.js:1151
↓ 6 callers
Method
to_dict
(self)
codeclash/arenas/arena.py:60
↓ 5 callers
Function
_clone
(b)
codeclash/arenas/chess/replay.py:42
↓ 5 callers
Method
_create_txt_sim_file
Helper to create a TXT simulation result file.
tests/arenas/test_robotrumble.py:159
↓ 5 callers
Method
_game_arg
(self, key: str)
codeclash/arenas/cyborg/cyborg.py:39
↓ 5 callers
Function
_white
(p: str)
codeclash/arenas/chess/replay.py:38
↓ 5 callers
Function
atomic_write
Write text to file atomically to prevent corruption on interruption.
codeclash/utils/atomic_write.py:4
↓ 5 callers
Method
decide
(self, observation: dict[str, Any])
codeclash/arenas/scml/runtime/run_scml.py:285
↓ 5 callers
Method
execute_round
Subclasses implement their game-specific logic here. This is the low level implementation, you probably want to use run_round instead, which
codeclash/arenas/arena.py:308
↓ 5 callers
Function
expected_score
Calculate expected score for player A against player B.
codeclash/analysis/bootstrap/bootstrap.py:19
↓ 5 callers
Method
fit
Fit Bradley-Terry model.
codeclash/analysis/metrics/elo.py:399
↓ 5 callers
Method
get_environment
Get docker container ID with the game code installed.
codeclash/arenas/arena.py:186
↓ 5 callers
Function
offer_to_plain
(offer)
codeclash/arenas/scml/runtime/run_scml.py:87
↓ 5 callers
Function
updateClearFiltersButton
()
codeclash/viewer/static/js/picker.js:1126
↓ 4 callers
Method
_base_observation
(self, event: str, negotiator_id: str | None = None, state=None)
codeclash/arenas/scml/runtime/run_scml.py:335
↓ 4 callers
Method
_build_job_id_to_folder_mapping
Build mapping from AWS Batch job ID to log folder path and round info
codeclash/viewer/app_aws.py:161
↓ 4 callers
Method
_create_player_log
Create a player log file with connection info.
tests/arenas/test_huskybench.py:113
↓ 4 callers
Method
_create_results_file
Create a results file. Args: results: List of (rank, bot_name, total_score) tuples
tests/arenas/test_robocode.py:152
↓ 4 callers
Method
_get_round_tag_name
Get git tag name for the version of the codebase at the given round.
codeclash/agents/player.py:184
↓ 4 callers
Method
_sigmoid
(self, x: np.ndarray)
codeclash/analysis/metrics/elo.py:334
↓ 4 callers
Method
_write_pairings
(self, round_dir, pairings)
tests/arenas/test_chess.py:123
↓ 4 callers
Method
close
(self)
codeclash/arenas/cyborg/runtime/run_cyborg.py:165
↓ 4 callers
Function
copy_to_container
Copy a file or directory from the local filesystem to a Docker container. The copy operation is recursive for directories. Be extremely
codeclash/utils/environment.py:102
↓ 4 callers
Function
find_all_game_folders
Find all game folders by locating metadata.json files Uses parallel loading to speed up metadata.json reading for many game folders. Results
codeclash/viewer/app.py:450
↓ 4 callers
Function
get_arena
(config: dict, **kwargs)
codeclash/arenas/__init__.py:46
↓ 4 callers
Function
get_scores
(stats: dict)
codeclash/analysis/metrics/elo.py:1236
↓ 4 callers
Function
pos_of
(unit)
codeclash/arenas/bomberland/runtime/run_bomberland.py:153
↓ 4 callers
Method
reset_and_apply_patch
Clean all uncommitted changes. If base_commit is provided, reset to that commit. Then apply the patch to the codebase.
codeclash/agents/player.py:147
↓ 4 callers
Function
resolve_includes
Pre-process YAML content to resolve all !include directives. This will take the yaml content as a string and return the same string with all !
codeclash/utils/yaml_utils.py:5
↓ 4 callers
Method
run_round
Run a single round of the game with the given agents. Returns the log output, result output, and winner name. All bookkeeping should
codeclash/arenas/arena.py:252
↓ 4 callers
Function
safe_class_name
(player_name: str)
codeclash/arenas/scml/runtime/run_scml.py:25
↓ 4 callers
Function
updateDateFilterDisplay
()
codeclash/viewer/static/js/picker.js:1083
↓ 4 callers
Function
updateModelFilterDisplay
()
codeclash/viewer/static/js/picker.js:1013
↓ 4 callers
Function
updateRunsStatus
()
codeclash/viewer/static/js/picker.js:127
↓ 4 callers
Function
updateTocVisibility
()
codeclash/viewer/static/js/app.js:380
↓ 4 callers
Function
update_elo
Update Elo rating based on game outcome. actual: 1.0 for win, 0.5 for draw, 0.0 for loss k: K-factor, typically 32 for regular players,
codeclash/analysis/bootstrap/bootstrap.py:24
↓ 3 callers
Method
_add_stacked_bar_labels
Add percentage labels inside stacked bars. Args: ax: The matplotlib axis stacked_values: List of lists, where each in
codeclash/analysis/llm_as_judge/grounding_validation_triple_plot.py:97
↓ 3 callers
Method
_add_total_bar_labels
Add total value labels at the end of bars. Args: ax: The matplotlib axis totals: List of total values for each bar
codeclash/analysis/llm_as_judge/grounding_validation_triple_plot.py:126
↓ 3 callers
Function
_arena_from_name
Derive the arena from a tournament folder name. e.g. ``PvpTournament.RobotRumble.r1.s1.p2.flail.luisa.260702175500`` -> ``RobotRumble``.
codeclash/replay/__init__.py:96
↓ 3 callers
Method
_create_round_log_dir
Helper to create round log directory.
tests/arenas/test_battlecode23.py:256
↓ 3 callers
Method
_create_round_log_dir
Helper to create round log directory.
tests/arenas/test_battlecode24.py:269
↓ 3 callers
Method
_create_sim_log
Create simulation log files (one per agent). Args: round_dir: Directory to create log files in scores: List
tests/arenas/test_corewar.py:108
↓ 3 callers
Method
_fit_on_matrix
(self, matchups: dict[tuple[str, str], list[float]])
codeclash/analysis/metrics/elo.py:761
↓ 3 callers
Method
_get_messages
(self, instance: Instance)
codeclash/analysis/llm_as_judge/big_questions.py:163
↓ 3 callers
Method
_get_metadata
Get cached metadata or load it if not cached
codeclash/viewer/app.py:563
↓ 3 callers
Method
_get_round_diff
Read diff data from changes_r{round}.json file, fallback to metadata.
codeclash/tournaments/single_player.py:69
↓ 3 callers
Function
_header
(pgn: str, key: str)
codeclash/arenas/chess/replay.py:205
↓ 3 callers
Method
_html
(self, page: str, status: int = 200)
codeclash/replay/serve.py:77
↓ 3 callers
Function
_round_num
(name: str)
codeclash/replay/base.py:109
↓ 3 callers
Method
_save
(self)
codeclash/tournaments/pvp.py:160
↓ 3 callers
Method
_save_response
(self, target_path: Path, response_data: dict[str, Any], instance: Instance)
codeclash/analysis/llm_as_judge/big_questions.py:192
↓ 3 callers
Method
_should_skip
(self, target_path: Path, instance: Instance)
codeclash/analysis/llm_as_judge/big_questions.py:175
↓ 3 callers
Function
_sim_index
Best-effort sim index from a filename: the last integer in its stem (``sim_18`` -> 18, ``round_1`` -> 1), else 0. ``discover_games`` de-duplicates
codeclash/replay/base.py:102
↓ 3 callers
Function
add_file_handler
Add a file handler to the logger with standard formatting. Returns: The FileHandler that was added (for later cleanup).
codeclash/utils/log.py:68
↓ 3 callers
Method
build
(self, log_dir: Path)
codeclash/analysis/metrics/elo.py:214
↓ 3 callers
Function
clean_config
(config_path: str)
codeclash/utils/generate_confs.py:92
↓ 3 callers
Method
evaluate_bulk
Evaluate multiple instances with optional parallel processing. Args: instances: List of instances to evaluate n_worke
codeclash/analysis/llm_as_judge/big_questions.py:204
↓ 3 callers
Function
fit
Fit AR(p) on logit(scores) by conditional Gaussian MLE (CSS). scores: (T, R) p: AR order (default 1) Returns: (gammas_hat: (p,), mus
codeclash/analysis/bootstrap/analyze_round_correlations.py:59
↓ 3 callers
Function
get_config
(rounds: int, simulations: int, arena: CodeArena, players: list[dict], prompt_func=prompt_game_desc)
codeclash/utils/generate_confs.py:70
↓ 3 callers
Function
get_instances
(input_folder: Path)
codeclash/analysis/llm_as_judge/utils.py:94
↓ 3 callers
Method
get_lm_name_self_opponent
(self)
codeclash/analysis/llm_as_judge/utils.py:49
next →
1–100 of 1,100, ranked by callers