MCPcopy Create free account

hub / github.com/GoodStartLabs/AI_Diplomacy / functions

Functions2,689 in github.com/GoodStartLabs/AI_Diplomacy

↓ 3 callersMethodgetMessageChannels
(role, all)
diplomacy/web/src/diplomacy/engine/game.js:450
↓ 3 callersMethodgetRelatedPower
()
diplomacy/web/src/diplomacy/engine/game.js:288
↓ 3 callersFunctionget_backup_filename
Return a backup filename from given filename (given filename with a special suffix).
diplomacy/server/server.py:107
↓ 3 callersFunctionget_board_state
(board_state: dict, game: Game)
ai_diplomacy/utils.py:616
↓ 3 callersMethodget_message_history
Return a filtered dict of whole message history for given game role.
diplomacy/server/server_game.py:133
↓ 3 callersMethodget_messages_this_round
(self, power_name: str, current_phase_name: str)
ai_diplomacy/game_history.py:394
↓ 3 callersMethodget_next_key
Return smallest key greater then given key, or None if not exists.
diplomacy/utils/sorted_dict.py:206
↓ 3 callersMethodget_power_addresses
Generate addresses (couples [power name, token]) of user controlling given power name.
diplomacy/server/server_game.py:287
↓ 3 callersMethodget_previous_key
Return greatest key lower than given key, or None if not exists.
diplomacy/utils/sorted_dict.py:202
↓ 3 callersMethodget_user
Returns user linked to username
diplomacy/server/users.py:122
↓ 3 callersMethodhas_draw_vote
Return True if all controlled non-eliminated powers have voted YES to draw game at current phase.
diplomacy/engine/game.py:888
↓ 3 callersMethodhas_player_token
Return True if game has given player token.
diplomacy/server/server_game.py:311
↓ 3 callersMethodinitState
()
diplomacy/web/src/gui/forms/power_order_creation_form.jsx:56
↓ 3 callersFunctioninitUnits
(phaseIndex: number)
ai_animation/src/units/create.ts:174
↓ 3 callersMethodinitialize
Initialize the analyzer with game data and model client
analyze_game_moments.py:80
↓ 3 callersMethodisOmniscientGame
()
diplomacy/web/src/diplomacy/engine/game.js:304
↓ 3 callersMethodis_controlled_by
(Network Method) Return True if this power is controlled by given username.
diplomacy/engine/power.py:384
↓ 3 callersMethodis_dummy
Indicates if the power is a dummy :return: Boolean flag to indicate if the power is a dummy
diplomacy/engine/power.py:298
↓ 3 callersMethodis_fixed_state_unchanged
Check if actual state matches saved fixed state, if game is used as context of a with-block. :param log_error: Boolean that indicates to
diplomacy/engine/game.py:496
↓ 3 callersMethoditems
Makes sure items() values are priority values instead of heap entries.
diplomacy/utils/priority_dict.py:107
↓ 3 callersMethodload_game
Return a game matching given game ID from server database. Raise an exception if such game does not exists. If such game is
diplomacy/server/server.py:623
↓ 3 callersFunctionmake_conversation_data
Make conversation data from diplomacy game logs. Args: country_to_model: A Series mapping country names to model names l
analysis/p2_make_convo_data.py:30
↓ 3 callersFunctionmake_longform_order_data
Makes a dataframe with a row for each order given by every power, in every phase (see module docstring for more details). Args:
analysis/p1_make_longform_orders_data.py:71
↓ 3 callersFunctionmake_phase_data
takes country-to-model mapping, game state (lmvs_data), conversations, and orders, and returns a dataframe with one row per (power, phase).
analysis/p3_make_phase_data.py:94
↓ 3 callersMethodmove_forward
Move to next expected phase.
diplomacy/tests/network/test_real_game.py:130
↓ 3 callersMethodnew_system_message
Create a system message (immediately dated) to be sent by server and add it to message history. To be used only by server game.
diplomacy/server/server_game.py:142
↓ 3 callersMethodnotifiedNetworkGame
(networkGame, notification)
diplomacy/web/src/gui/pages/content_game.jsx:352
↓ 3 callersMethodnotify_game_processed
Notify all game tokens about a game phase update (game processing). :param server_game: game to notify :param previous_phase
diplomacy/server/notifier.py:122
↓ 3 callersMethodnotify_game_status
Notify all game tokens about current game status. :param server_game: game to notify :type server_game: diplomacy.server.ser
diplomacy/server/notifier.py:186
↓ 3 callersMethodnotify_power_wait_flag
Notify all power tokens about new wait flag for given power. :param server_game: game to notify :param power: power to notif
diplomacy/server/notifier.py:280
↓ 3 callersFunctionparsePhase
(phaseName: string)
ai_animation/src/types/moments.ts:127
↓ 3 callersMethodrebuild_hash
Completely recalculate the Zobrist hash :return: The updated hash value
diplomacy/engine/game.py:1505
↓ 3 callersMethodremove
Remove game instance associated to given game role.
diplomacy/client/game_instances_set.py:55
↓ 3 callersMethodremove
(parameters)
diplomacy/web/src/diplomacy/client/network_game.js:126
↓ 3 callersMethodremove_token
Disconnect given token from related user and loaded games. Stop related games if needed, e.g. if a game does not have anymore expected nu
diplomacy/server/server.py:834
↓ 3 callersMethodschedule_game
Add a game to scheduler only if game has a deadline and is not already scheduled. To add games without deadline, use force_game_processin
diplomacy/server/server.py:725
↓ 3 callersMethodsend
Send a request. :param request: request object. :param for_game: (optional) NetworkGame object (required for game requests).
diplomacy/client/connection.py:296
↓ 3 callersMethodsend
(request, game = null)
diplomacy/web/src/diplomacy/client/connection.js:337
↓ 3 callersMethodsetOrders
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:179
↓ 3 callersMethodsetWait
(wait, parameters)
diplomacy/web/src/diplomacy/client/network_game.js:106
↓ 3 callersMethodset_system_prompt
Allows updating the system prompt after initialization.
ai_diplomacy/clients.py:60
↓ 3 callersFunctionsimplify_svg
Simplifies and optimizes SVG content by: 1. Removing unnecessary metadata, comments, and hidden elements. 2. Simplifying paths and shapes
experiments/svg_optimizer.py:20
↓ 3 callersFunctionsineWave
( frequency: number, elapsedTime: number, amplitude: number = 1, offset: number = 0 )
ai_animation/src/utils/timing.ts:23
↓ 3 callersFunctionsortTable
* Sort the table by the specified column
ai_animation/src/domElements/standingsBoard.ts:282
↓ 3 callersMethodstart_game
Start given server game. :param server_game: server game :type server_game: ServerGame
diplomacy/server/server.py:755
↓ 3 callersMethodstart_new_daide_server
Start a new DAIDE TCP server to handle DAIDE clients connections :param game_id: game id to pass to the DAIDE server :param
diplomacy/server/server.py:887
↓ 3 callersFunctionstopGamePlayback
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:34
↓ 3 callersMethodto_string
Returning the string representation of the response
diplomacy/daide/notifications.py:45
↓ 3 callersMethodto_type
(self, json_value)
diplomacy/utils/parsing.py:259
↓ 3 callersMethodtoggle
* Toggles the debug panel expansion
ai_animation/src/debug/debugMenu.ts:80
↓ 3 callersFunctiontogglePlayback
(explicitSet: boolean | undefined = undefined)
ai_animation/src/phase.ts:73
↓ 3 callersFunctionupdateLeaderboard
()
ai_animation/src/components/leaderboard.ts:17
↓ 3 callersFunctionupdatePhaseOptions
* Updates the phase options in the select dropdown
ai_animation/src/debug/phaseJump.ts:103
↓ 3 callersMethodupdateTools
()
ai_animation/src/debug/debugMenu.ts:188
↓ 3 callersMethodvalidate
(self, element)
diplomacy/utils/parsing.py:331
↓ 3 callersFunctionwaitForGameReady
(page: Page, timeout = 15000)
ai_animation/tests/e2e/test-helpers.ts:6
↓ 2 callersMethod__connect
(logger)
diplomacy/web/src/diplomacy/client/connection.js:295
↓ 2 callersMethod__form_phases
(pastPhases, phaseIndex)
diplomacy/web/src/gui/pages/content_game.jsx:1055
↓ 2 callersMethod__init__
Build a MapError :param code: int code of the error :param message: human readable string message associated to the error
diplomacy/utils/errors.py:32
↓ 2 callersMethod__new__
New function - Retrieving object from cache if possible :param name: Name of the map to load :param use_cache: Boolean flag
diplomacy/engine/map.py:119
↓ 2 callersMethod__next_value
()
diplomacy/web/src/diplomacy/utils/queue.js:37
↓ 2 callersMethod__set_controller
(controller, controlType)
diplomacy/web/src/gui/utils/province.js:45
↓ 2 callersMethod__sort_games
(games)
diplomacy/web/src/gui/pages/page.jsx:66
↓ 2 callersMethod__write_request
(requestContext)
diplomacy/web/src/diplomacy/client/connection.js:304
↓ 2 callersFunction_add_experiment_flags
(p: argparse.ArgumentParser)
experiment_runner.py:43
↓ 2 callersFunction_add_lm_game_flags
(p: argparse.ArgumentParser)
experiment_runner.py:130
↓ 2 callersMethod_add_order
Adds an order for a power :param power: The power instance issuing the order :param word: The order (e.g. ['A', 'PAR', '-', '
diplomacy/engine/game.py:3138
↓ 2 callersMethod_add_unit
Adds a unit to the map :param xml_map: The xml map being generated :param unit: The unit to add (e.g. 'A PAR') :
diplomacy/engine/renderer.py:265
↓ 2 callersFunction_all_support_examples
Return *every* order of the form 'A/F XYZ S <mover> - <dest>' issued by our other units. Order of return is input order.
ai_diplomacy/possible_order_context.py:516
↓ 2 callersFunction_all_support_hold_examples
Return every order of the form 'A/F XYZ S <holder>' that supports <holder> to HOLD, excluding the holding unit itself.
ai_diplomacy/possible_order_context.py:538
↓ 2 callersFunction_base_ter
(u: str)
analysis/validation.py:155
↓ 2 callersFunction_build_active_notifications
Build the list of notifications corresponding to an active game state :param current_phase: the current phase :param powers: the lis
diplomacy/daide/notification_managers.py:29
↓ 2 callersFunction_build_completed_notifications
Build the list of notifications corresponding to a completed game state :param server_users: the instance of `diplomacy.server.users` of the
diplomacy/daide/notification_managers.py:54
↓ 2 callersMethod_build_unit_owner_cache
Builds the unit_owner cache
diplomacy/engine/game.py:3609
↓ 2 callersMethod_calculate_relationship_similarity
Calculate similarity between two relationship dictionaries.
analysis/statistical_game_analysis.py:988
↓ 2 callersMethod_calculate_victory_score
Calculates the score to determine win for each power :return: A dict containing the score for each power (e.g. {'FRANCE': 10, 'ENGLAND':
diplomacy/engine/game.py:3000
↓ 2 callersMethod_check_disruptions
Determines convoy disruptions. :param may_convoy: Contains the dictionary of all convoys that have a chance to succeed (
diplomacy/engine/game.py:3714
↓ 2 callersMethod_clean_json_text
Clean common JSON formatting issues from LLM responses.
ai_diplomacy/agent.py:327
↓ 2 callersMethod_clear_history
Clear all game history fields.
diplomacy/engine/game.py:4545
↓ 2 callersMethod_connect
Create (force) a tornado websocket connection. Try NB_CONNECTION_ATTEMPTS attempts, waiting for ATTEMPT_DELAY_SECONDS seconds between 2 a
diplomacy/client/connection.py:164
↓ 2 callersMethod_detect_paradox
Paradox detection algorithm. Start at starting node and move chain to see if node if performing paradox action :param starti
diplomacy/engine/game.py:3684
↓ 2 callersFunction_discover_csvs
(individual_dir: Path, pattern: str)
experiment_runner/analysis/statistical_game_analysis.py:61
↓ 2 callersFunction_entry_year
(entry: str)
ai_diplomacy/diary_logic.py:81
↓ 2 callersMethod_finish
Indicates that a game is finished and has been won by 'victors' :param victors: The list of victors (e.g. ['FRANCE', 'GERMANY'])
diplomacy/engine/game.py:3111
↓ 2 callersFunction_fmt_row
(label: str, r: Dict, width: int, ci_label: str)
experiment_runner/analysis/compare_stats.py:241
↓ 2 callersFunction_friendly_supports_for
Return supports (from any of our units) that aid <target_order>.
ai_diplomacy/possible_order_context.py:883
↓ 2 callersFunction_generate_rich_order_context_movement
Produce the <Territory …> blocks *exactly* as before for movement phases.
ai_diplomacy/possible_order_context.py:659
↓ 2 callersMethod_get_model_for_power
Get the model used for a specific power.
analysis/statistical_game_analysis.py:961
↓ 2 callersMethod_get_previous_phase_data
Get the phase data for the phase before the current one.
analysis/statistical_game_analysis.py:980
↓ 2 callersMethod_get_server_data_filename
Return path to server data file name (server.json, making sure that data folder exists. Raises an exception if data folder does not exist
diplomacy/server/server.py:315
↓ 2 callersMethod_id
(id)
diplomacy/web/src/gui/utils/province.js:118
↓ 2 callersMethod_is_failure_status
Check if status indicates failure.
analysis/statistical_game_analysis.py:1377
↓ 2 callersFunction_is_hold_order
(order: str)
ai_diplomacy/possible_order_context.py:484
↓ 2 callersFunction_is_simple_move
(order: str)
ai_diplomacy/possible_order_context.py:493
↓ 2 callersMethod_is_success_status
Check if status indicates success.
analysis/statistical_game_analysis.py:1382
↓ 2 callersMethod_issue_move_order
Issues a move order :param xml_map: The xml map being generated :param src_loc: The location where the unit is moving from (
diplomacy/engine/renderer.py:471
↓ 2 callersMethod_load_csv_as_dicts
Load CSV file as list of dictionaries.
analysis/statistical_game_analysis.py:1167
↓ 2 callersFunction_load_games
Return a DataFrame with one row per (game_id, power_name) containing all numeric columns from *_game_analysis.csv plus these derived columns:
experiment_runner/analysis/compare_stats.py:82
↓ 2 callersFunction_load_phase
(exp: Path)
experiment_runner/analysis/compare_stats.py:270
↓ 2 callersMethod_move_to_start_phase
Moves to the map's start phase :return: Nothing, but sets the self.phase and self.phase_type settings
diplomacy/engine/game.py:2860
← previousnext →401–500 of 2,689, ranked by callers