MCPcopy Create free account

hub / github.com/GoodStartLabs/AI_Diplomacy / functions

Functions2,689 in github.com/GoodStartLabs/AI_Diplomacy

↓ 2 callersMethod_no_effect
Removes a unit from the combat list of an attack site :param unit: The unit attacking the site (e.g. ['A PAR', []]) :param s
diplomacy/engine/game.py:3915
↓ 2 callersFunction_norm
(p: str)
ai_diplomacy/utils.py:570
↓ 2 callersFunction_norm_power
Trim & uppercase for reliable comparisons.
ai_diplomacy/possible_order_context.py:488
↓ 2 callersFunction_numeric_columns
(df: pd.DataFrame, extra_exclude: set[str] | None = None)
experiment_runner/analysis/statistical_game_analysis.py:65
↓ 2 callersFunction_numeric_columns
(df: pd.DataFrame)
experiment_runner/analysis/compare_stats.py:77
↓ 2 callersMethod_parse_negotiation_messages
Parse negotiation messages from raw LLM response.
analysis/statistical_game_analysis.py:933
↓ 2 callersFunction_plot_phase_level
Plots aggregated phase metrics. If *title_suffix* is supplied it is appended to each chart title — handy for per-run plots.
experiment_runner/analysis/statistical_game_analysis.py:378
↓ 2 callersMethod_post_remove
(gameID)
diplomacy/web/src/gui/pages/page.jsx:254
↓ 2 callersFunction_province_type_display
Return 'LAND', 'COAST', or 'WATER' for the 3-letter province code. Falls back to 'UNKNOWN' only if nothing matches.
ai_diplomacy/possible_order_context.py:563
↓ 2 callersMethod_remove_from_my_games
(gameID)
diplomacy/web/src/gui/pages/page.jsx:305
↓ 2 callersMethod_save_game_csv
Save game-level features to CSV.
analysis/statistical_game_analysis.py:1259
↓ 2 callersMethod_save_phase_csv
Save phase-level features to CSV.
analysis/statistical_game_analysis.py:1176
↓ 2 callersMethod_set_influence
Sets the influence on the map :param xml_map: The xml map being generated :param loc: The province being influenced (e.g. 'P
diplomacy/engine/renderer.py:295
↓ 2 callersMethod_strengths
This function sets self.combat to a dictionary of dictionaries, specifying each potential destination for every piece, with the strengths
diplomacy/engine/game.py:3650
↓ 2 callersFunction_sub_hash_password
Hash long password to allow bcrypt to handle password longer than 72 characters. Module private method. :param password: password to
diplomacy/utils/common.py:40
↓ 2 callersFunction_unit_type
(u: str)
analysis/validation.py:160
↓ 2 callersFunction_validate_country
(c: str)
analysis/validation.py:104
↓ 2 callersFunction_validate_place
(code: str, info: ValidationInfo, allow_coast: bool = True)
analysis/validation.py:111
↓ 2 callersFunction_validate_unit
(u: str, info: ValidationInfo)
analysis/validation.py:125
↓ 2 callersFunction_welch
(a: np.ndarray, b: np.ndarray, alpha: float)
experiment_runner/analysis/compare_stats.py:168
↓ 2 callersFunction_write_summary_output
(output_file_path, analysis_data, is_debug_output)
experiments/analyze_rl_json.py:288
↓ 2 callersMethodaddMessage
(message)
diplomacy/web/src/diplomacy/engine/game.js:212
↓ 2 callersMethodadd_admin
Set given username as administrator. Related user must exists in this Users object.
diplomacy/server/users.py:130
↓ 2 callersMethodadd_message
(self, sender: str, recipient: str, content: str)
ai_diplomacy/game_history.py:37
↓ 2 callersMethodadd_new_game
Add a new game data on server in memory and perform any addition processing. This does not save the game on disk. :type serv
diplomacy/server/server.py:659
↓ 2 callersMethodadd_observer_token
Set given token as observer token.
diplomacy/server/server_game.py:332
↓ 2 callersMethodadd_phase
(self, phase_name: str)
ai_diplomacy/game_history.py:86
↓ 2 callersFunctionadd_to_cache
Lazy generates convoys paths for a map and adds it to the disk cache :param map_name: The name of the map :param max_convoy_length:
diplomacy/utils/convoy_paths.py:189
↓ 2 callersMethodadd_user
Add a new user with given username and hashed password. See diplomacy.utils.common.hash_password() for hashing purposes.
diplomacy/server/users.py:147
↓ 2 callersFunctionadvanceGameManually
( page: Page, maxClicks = 50, trackConversations = false )
ai_animation/tests/e2e/test-helpers.ts:211
↓ 2 callersMethodanalyze_folder
Analyze a single results folder and generate CSV outputs. Args: folder_path: Path to results folder containing l
analysis/statistical_game_analysis.py:103
↓ 2 callersMethodanalyze_multiple_folders
Analyze multiple results folders and combine outputs. Args: parent_folder: Path containing multiple results fold
analysis/statistical_game_analysis.py:187
↓ 2 callersMethodas_observer_game
Return an observer game data object copy of this game.
diplomacy/server/server_game.py:203
↓ 2 callersMethodassert_admin_token
Check if given token is an admin token. Raise an exception on error.
diplomacy/server/server.py:864
↓ 2 callersFunctionassert_no_common_keys
Check that dictionaries does not share keys. :param dict1: dict :param dict2: dict
diplomacy/utils/common.py:134
↓ 2 callersMethodattach_connection_handler
Associate given token with given connection handler if token is known. If there is a previous connection handler associated to given toke
diplomacy/server/users.py:215
↓ 2 callersFunctionbuildFancyArrow
(length: number, colorDeter: string)
ai_animation/src/units/animate.ts:18
↓ 2 callersFunctioncheck_location_influence
Helper - checks who owns a location at a given phase. Uses the `turn_actions` dataframe from overall context. Args:
analysis/p1_make_longform_orders_data.py:158
↓ 2 callersMethodclearCenters
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:183
↓ 2 callersMethodclearOrderBuildingPath
()
diplomacy/web/src/gui/pages/content_game.jsx:242
↓ 2 callersMethodclearOrders
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:187
↓ 2 callersMethodclearOrders
(powerName)
diplomacy/web/src/diplomacy/engine/game.js:245
↓ 2 callersMethodclearUnits
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:191
↓ 2 callersMethodclearUserGameOrders
(username, gameID, powerName)
diplomacy/web/src/gui/utils/dipStorage.jsx:130
↓ 2 callersFunctioncloseVictoryModal
()
ai_animation/src/components/victoryModal.ts:48
↓ 2 callersMethodcompact
Compacts a full sentence into a list of short words :param phrase: The full sentence to compact (e.g. 'England: Fleet Western Mediterran
diplomacy/engine/map.py:845
↓ 2 callersMethodconnect
(logger)
diplomacy/web/src/diplomacy/client/connection.js:332
↓ 2 callersFunctionconvert_csv_to_rl_json
Converts a CSV file of LLM responses into a JSON format suitable for RL fine-tuning. Args: csv_file_path (str): The absolute path to
experiments/csv_to_rl_json.py:18
↓ 2 callersMethodcount_connections
Return number of registered connection handlers.
diplomacy/server/users.py:110
↓ 2 callersMethodcount_voted
Return the count of controlled powers who already voted for a draw for current phase.
diplomacy/engine/game.py:897
↓ 2 callersFunctioncreateAnimationsForNextPhase
(phaseIdx: number)
ai_animation/src/units/animate.ts:275
↓ 2 callersFunctioncreateChatWindow
(power, isGlobal = false)
ai_animation/src/domElements/chatWindows.ts:50
↓ 2 callersMethodcreateCheckbox
(id, title, value, onChange)
diplomacy/web/src/gui/components/forms.jsx:74
↓ 2 callersFunctioncreateDiaryBox
* Creates a diary box for displaying power-specific thoughts and context
ai_animation/src/components/momentModal.ts:309
↓ 2 callersFunctioncreateMessageElement
* Creates a message element for display
ai_animation/src/components/momentModal.ts:489
↓ 2 callersFunctioncreateMoveAnimation
(unitMesh: THREE.Group, orderDestination: ProvinceENUM)
ai_animation/src/units/animate.ts:108
↓ 2 callersMethodcreateSelectOptions
(values, none)
diplomacy/web/src/gui/components/forms.jsx:107
↓ 2 callersFunctioncreateUnitMesh
(unitData: UnitData)
ai_animation/src/units/create.ts:125
↓ 2 callersMethoddeleteGame
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:217
↓ 2 callersMethoddelete_game
Delete local game instances corresponding to game ID in associated request.
diplomacy/client/response_managers.py:81
↓ 2 callersMethoddelete_game
Delete given game from server (both from memory and disk) and perform any post-deletion processing. :param server_game: game
diplomacy/server/server.py:702
↓ 2 callersFunctiondisplayFinalPhase
()
ai_animation/src/phase.ts:248
↓ 2 callersFunctionenableInstantMode
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:375
↓ 2 callersMethodexecute_phase
Execute a single communications phase :param game_id: The game id of the current game :param channels: A dictionary of power
diplomacy/daide/tests/test_daide_game.py:219
↓ 2 callersFunctionextract_orders_from_llm_response
Extracts a list of order strings from various formats of llm_response_content. Handles direct lists, JSON strings, and strings with embedded
experiments/analyze_rl_json.py:30
↓ 2 callersMethodfilter_tokens
Remove from this game any token not matching given filter function (if filter_function(token) is False).
diplomacy/server/server_game.py:453
↓ 2 callersMethodfilter_usernames
Remove each omniscient username, moderator username and player controller that does not match given filter function (if filter_function(u
diplomacy/server/server_game.py:421
↓ 2 callersFunctionfind_owner_of_unit
Helper - finds the owner of a unit at a given phase. Operating on the `turn_actions` dataframe from overall context. Args:
analysis/p1_make_longform_orders_data.py:212
↓ 2 callersFunctionfrom_saved_game_format
Rebuilds a :class:`diplomacy.engine.game.Game` object from the saved game (python :class:`Dict`) saved_game is the dictionary. It can be buil
diplomacy/utils/export.py:71
↓ 2 callersMethodgenerate_report
Generate a markdown report of key moments
analyze_game_moments.py:923
↓ 2 callersFunctiongenerate_rich_order_context_xml
Generates a strategic overview context string. Details units and SCs for power_name, including possible orders and simplified adjacencies for
ai_diplomacy/possible_order_context.py:366
↓ 2 callersFunctiongenerate_token
Generate a token with 2 * n_bytes characters (n_bytes bytes encoded in hexadecimal).
diplomacy/utils/common.py:71
↓ 2 callersMethodget
(role)
diplomacy/web/src/diplomacy/client/game_instance_set.js:34
↓ 2 callersMethodgetChannel
()
diplomacy/web/src/diplomacy/client/request_future_context.js:35
↓ 2 callersMethodgetController
()
diplomacy/web/src/diplomacy/engine/power.js:46
↓ 2 callersFunctiongetCurrentGameId
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:62
↓ 2 callersMethodgetCurrentPowerName
* Get name of current power selected on the game page. * @returns {null|string}
diplomacy/web/src/gui/pages/content_game.jsx:528
↓ 2 callersFunctiongetEligibleMoments
* Gets all moments that involve at least 2 powers and have conversations between them * @returns Array of moments eligible for conversation display
ai_animation/src/debug/showRandomMoment.ts:70
↓ 2 callersMethodgetGame
(gameID)
diplomacy/web/src/gui/pages/page.jsx:214
↓ 2 callersMethodgetGames
()
diplomacy/web/src/diplomacy/client/game_instance_set.js:26
↓ 2 callersMethodgetGamesInfo
(parameters)
diplomacy/web/src/diplomacy/client/channel.js:103
↓ 2 callersMethodgetOccupied
(powerName)
diplomacy/web/src/gui/utils/province.js:88
↓ 2 callersMethodgetPhaseType
()
diplomacy/web/src/diplomacy/engine/game.js:415
↓ 2 callersMethodgetRetreated
(powerName)
diplomacy/web/src/gui/utils/province.js:101
↓ 2 callersFunctiongetTimeInSeconds
()
ai_animation/src/utils/timing.ts:45
↓ 2 callersFunctionget_absolute_path
Return absolute path of given directory. If given directory is None, return absolute path of current directory.
diplomacy/server/server.py:101
↓ 2 callersMethodget_connection_handler
Return connection handler associated to given token, or None if no handler currently associated.
diplomacy/server/users.py:126
↓ 2 callersMethodget_controllers
Return a dictionary mapping each power name to its current controller name.
diplomacy/engine/game.py:604
↓ 2 callersMethodget_controllers_timestamps
Return a dictionary mapping each power name to its controller timestamp.
diplomacy/engine/game.py:608
↓ 2 callersMethodget_games
Return a sequence of stored game instances.
diplomacy/client/game_instances_set.py:43
↓ 2 callersMethodget_ignored_messages_by_power
Identifies which powers are not responding to messages from sender_name. Returns a dict mapping power names to their ignored messages
ai_diplomacy/game_history.py:458
↓ 2 callersMethodget_map
Return map power names for given map name.
diplomacy/server/server.py:883
↓ 2 callersFunctionget_nearest_enemy_units
Finds up to N nearest enemy units, sorted by path length.
ai_diplomacy/possible_order_context.py:176
↓ 2 callersMethodget_order_history_for_prompt
( self, game: "Game", power_name: str, current_phase_name: str, num_mo
ai_diplomacy/game_history.py:146
↓ 2 callersMethodget_orders
1) Builds the prompt with conversation context if available 2) Calls LLM 3) Parses JSON block
ai_diplomacy/clients.py:75
↓ 2 callersMethodget_power_related_messages
Return expected messages for given power name.
diplomacy/tests/network/test_real_game.py:63
↓ 2 callersMethodget_related_power_names
Return list of power names controlled by the controlled of given power name.
diplomacy/server/server_game.py:66
↓ 2 callersFunctionget_special_models
Define models for special purposes like phase summaries and formatting. These can be overridden via environment variables: - AI_DIPLOMAC
ai_diplomacy/utils.py:98
↓ 2 callersMethodget_tokens
Return a sequence of tokens associated to given username.
diplomacy/server/users.py:114
↓ 2 callersFunctionhandleClose
()
ai_animation/src/components/momentModal.ts:453
← previousnext →501–600 of 2,689, ranked by callers