Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GoodStartLabs/AI_Diplomacy
/ functions
Functions
2,689 in github.com/GoodStartLabs/AI_Diplomacy
⨍
Functions
2,689
◇
Types & classes
474
↓ 3 callers
Method
getMessageChannels
(role, all)
diplomacy/web/src/diplomacy/engine/game.js:450
↓ 3 callers
Method
getRelatedPower
()
diplomacy/web/src/diplomacy/engine/game.js:288
↓ 3 callers
Function
get_backup_filename
Return a backup filename from given filename (given filename with a special suffix).
diplomacy/server/server.py:107
↓ 3 callers
Function
get_board_state
(board_state: dict, game: Game)
ai_diplomacy/utils.py:616
↓ 3 callers
Method
get_message_history
Return a filtered dict of whole message history for given game role.
diplomacy/server/server_game.py:133
↓ 3 callers
Method
get_messages_this_round
(self, power_name: str, current_phase_name: str)
ai_diplomacy/game_history.py:394
↓ 3 callers
Method
get_next_key
Return smallest key greater then given key, or None if not exists.
diplomacy/utils/sorted_dict.py:206
↓ 3 callers
Method
get_power_addresses
Generate addresses (couples [power name, token]) of user controlling given power name.
diplomacy/server/server_game.py:287
↓ 3 callers
Method
get_previous_key
Return greatest key lower than given key, or None if not exists.
diplomacy/utils/sorted_dict.py:202
↓ 3 callers
Method
get_user
Returns user linked to username
diplomacy/server/users.py:122
↓ 3 callers
Method
has_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 callers
Method
has_player_token
Return True if game has given player token.
diplomacy/server/server_game.py:311
↓ 3 callers
Method
initState
()
diplomacy/web/src/gui/forms/power_order_creation_form.jsx:56
↓ 3 callers
Function
initUnits
(phaseIndex: number)
ai_animation/src/units/create.ts:174
↓ 3 callers
Method
initialize
Initialize the analyzer with game data and model client
analyze_game_moments.py:80
↓ 3 callers
Method
isOmniscientGame
()
diplomacy/web/src/diplomacy/engine/game.js:304
↓ 3 callers
Method
is_controlled_by
(Network Method) Return True if this power is controlled by given username.
diplomacy/engine/power.py:384
↓ 3 callers
Method
is_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 callers
Method
is_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 callers
Method
items
Makes sure items() values are priority values instead of heap entries.
diplomacy/utils/priority_dict.py:107
↓ 3 callers
Method
load_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 callers
Function
make_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 callers
Function
make_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 callers
Function
make_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 callers
Method
move_forward
Move to next expected phase.
diplomacy/tests/network/test_real_game.py:130
↓ 3 callers
Method
new_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 callers
Method
notifiedNetworkGame
(networkGame, notification)
diplomacy/web/src/gui/pages/content_game.jsx:352
↓ 3 callers
Method
notify_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 callers
Method
notify_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 callers
Method
notify_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 callers
Function
parsePhase
(phaseName: string)
ai_animation/src/types/moments.ts:127
↓ 3 callers
Method
rebuild_hash
Completely recalculate the Zobrist hash :return: The updated hash value
diplomacy/engine/game.py:1505
↓ 3 callers
Method
remove
Remove game instance associated to given game role.
diplomacy/client/game_instances_set.py:55
↓ 3 callers
Method
remove
(parameters)
diplomacy/web/src/diplomacy/client/network_game.js:126
↓ 3 callers
Method
remove_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 callers
Method
schedule_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 callers
Method
send
Send a request. :param request: request object. :param for_game: (optional) NetworkGame object (required for game requests).
diplomacy/client/connection.py:296
↓ 3 callers
Method
send
(request, game = null)
diplomacy/web/src/diplomacy/client/connection.js:337
↓ 3 callers
Method
setOrders
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:179
↓ 3 callers
Method
setWait
(wait, parameters)
diplomacy/web/src/diplomacy/client/network_game.js:106
↓ 3 callers
Method
set_system_prompt
Allows updating the system prompt after initialization.
ai_diplomacy/clients.py:60
↓ 3 callers
Function
simplify_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 callers
Function
sineWave
( frequency: number, elapsedTime: number, amplitude: number = 1, offset: number = 0 )
ai_animation/src/utils/timing.ts:23
↓ 3 callers
Function
sortTable
* Sort the table by the specified column
ai_animation/src/domElements/standingsBoard.ts:282
↓ 3 callers
Method
start_game
Start given server game. :param server_game: server game :type server_game: ServerGame
diplomacy/server/server.py:755
↓ 3 callers
Method
start_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 callers
Function
stopGamePlayback
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:34
↓ 3 callers
Method
to_string
Returning the string representation of the response
diplomacy/daide/notifications.py:45
↓ 3 callers
Method
to_type
(self, json_value)
diplomacy/utils/parsing.py:259
↓ 3 callers
Method
toggle
* Toggles the debug panel expansion
ai_animation/src/debug/debugMenu.ts:80
↓ 3 callers
Function
togglePlayback
(explicitSet: boolean | undefined = undefined)
ai_animation/src/phase.ts:73
↓ 3 callers
Function
updateLeaderboard
()
ai_animation/src/components/leaderboard.ts:17
↓ 3 callers
Function
updatePhaseOptions
* Updates the phase options in the select dropdown
ai_animation/src/debug/phaseJump.ts:103
↓ 3 callers
Method
updateTools
()
ai_animation/src/debug/debugMenu.ts:188
↓ 3 callers
Method
validate
(self, element)
diplomacy/utils/parsing.py:331
↓ 3 callers
Function
waitForGameReady
(page: Page, timeout = 15000)
ai_animation/tests/e2e/test-helpers.ts:6
↓ 2 callers
Method
__connect
(logger)
diplomacy/web/src/diplomacy/client/connection.js:295
↓ 2 callers
Method
__form_phases
(pastPhases, phaseIndex)
diplomacy/web/src/gui/pages/content_game.jsx:1055
↓ 2 callers
Method
__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 callers
Method
__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 callers
Method
__next_value
()
diplomacy/web/src/diplomacy/utils/queue.js:37
↓ 2 callers
Method
__set_controller
(controller, controlType)
diplomacy/web/src/gui/utils/province.js:45
↓ 2 callers
Method
__sort_games
(games)
diplomacy/web/src/gui/pages/page.jsx:66
↓ 2 callers
Method
__write_request
(requestContext)
diplomacy/web/src/diplomacy/client/connection.js:304
↓ 2 callers
Function
_add_experiment_flags
(p: argparse.ArgumentParser)
experiment_runner.py:43
↓ 2 callers
Function
_add_lm_game_flags
(p: argparse.ArgumentParser)
experiment_runner.py:130
↓ 2 callers
Method
_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 callers
Method
_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 callers
Function
_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 callers
Function
_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 callers
Function
_base_ter
(u: str)
analysis/validation.py:155
↓ 2 callers
Function
_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 callers
Function
_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 callers
Method
_build_unit_owner_cache
Builds the unit_owner cache
diplomacy/engine/game.py:3609
↓ 2 callers
Method
_calculate_relationship_similarity
Calculate similarity between two relationship dictionaries.
analysis/statistical_game_analysis.py:988
↓ 2 callers
Method
_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 callers
Method
_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 callers
Method
_clean_json_text
Clean common JSON formatting issues from LLM responses.
ai_diplomacy/agent.py:327
↓ 2 callers
Method
_clear_history
Clear all game history fields.
diplomacy/engine/game.py:4545
↓ 2 callers
Method
_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 callers
Method
_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 callers
Function
_discover_csvs
(individual_dir: Path, pattern: str)
experiment_runner/analysis/statistical_game_analysis.py:61
↓ 2 callers
Function
_entry_year
(entry: str)
ai_diplomacy/diary_logic.py:81
↓ 2 callers
Method
_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 callers
Function
_fmt_row
(label: str, r: Dict, width: int, ci_label: str)
experiment_runner/analysis/compare_stats.py:241
↓ 2 callers
Function
_friendly_supports_for
Return supports (from any of our units) that aid <target_order>.
ai_diplomacy/possible_order_context.py:883
↓ 2 callers
Function
_generate_rich_order_context_movement
Produce the <Territory …> blocks *exactly* as before for movement phases.
ai_diplomacy/possible_order_context.py:659
↓ 2 callers
Method
_get_model_for_power
Get the model used for a specific power.
analysis/statistical_game_analysis.py:961
↓ 2 callers
Method
_get_previous_phase_data
Get the phase data for the phase before the current one.
analysis/statistical_game_analysis.py:980
↓ 2 callers
Method
_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 callers
Method
_id
(id)
diplomacy/web/src/gui/utils/province.js:118
↓ 2 callers
Method
_is_failure_status
Check if status indicates failure.
analysis/statistical_game_analysis.py:1377
↓ 2 callers
Function
_is_hold_order
(order: str)
ai_diplomacy/possible_order_context.py:484
↓ 2 callers
Function
_is_simple_move
(order: str)
ai_diplomacy/possible_order_context.py:493
↓ 2 callers
Method
_is_success_status
Check if status indicates success.
analysis/statistical_game_analysis.py:1382
↓ 2 callers
Method
_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 callers
Method
_load_csv_as_dicts
Load CSV file as list of dictionaries.
analysis/statistical_game_analysis.py:1167
↓ 2 callers
Function
_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 callers
Function
_load_phase
(exp: Path)
experiment_runner/analysis/compare_stats.py:270
↓ 2 callers
Method
_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
← previous
next →
401–500 of 2,689, ranked by callers