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
↓ 1 callers
Method
_process
Processes the current phase of the game
diplomacy/engine/game.py:2802
↓ 1 callers
Method
_reconnect
Reconnect.
diplomacy/client/connection.py:204
↓ 1 callers
Method
_register_to_send
Register given request context as a request to send as soon as possible. :param request_context: context of request to send.
diplomacy/client/connection.py:288
↓ 1 callers
Function
_removeUnitsFromBoard
()
ai_animation/src/units/create.ts:148
↓ 1 callers
Method
_remove_from_games
(gameID)
diplomacy/web/src/gui/pages/page.jsx:316
↓ 1 callers
Method
_resolve
Resolve the current phase :return: A list of strings for the results file explaining how the phase was resolved.
diplomacy/engine/game.py:4530
↓ 1 callers
Method
_resolve_moves
Resolves the list of orders
diplomacy/engine/game.py:3954
↓ 1 callers
Function
_score_game
(game_json: Path)
experiment_runner/analysis/summary.py:77
↓ 1 callers
Method
_send_post_request
Helper method to send a post request to the API endpoint
diplomacy/integration/webdiplomacy_net/api.py:271
↓ 1 callers
Method
_set_current_phase
Sets the phase text at the bottom right of the the map :param xml_map: The xml map being generated :param current_phase: The
diplomacy/engine/renderer.py:342
↓ 1 callers
Method
_set_note
Sets a note at the top left of the map :param xml_map: The xml map being generated :param note_1: The text to display on the
diplomacy/engine/renderer.py:357
↓ 1 callers
Method
_split
Build the subject split using it's _input_str
diplomacy/utils/splitter.py:56
↓ 1 callers
Method
_step
Compute a step (check and enqueue tasks to run now) in scheduler.
diplomacy/server/scheduler.py:230
↓ 1 callers
Method
_transfer_center
Transfers a supply center from a power to another :param from_power: The power instance from whom the supply center is transfered
diplomacy/engine/game.py:3096
↓ 1 callers
Method
_unbounce
Unbounce any powerful-enough move that can now take the spot being vacated by the dislodger. :param site: The site being attacked
diplomacy/engine/game.py:3929
↓ 1 callers
Function
_unit_head
(order: str)
analysis/validation.py:146
↓ 1 callers
Method
_update_adjust_orders
Updates order for Adjustment phase :param power: The power instance submitting the orders :param orders: The updated orders
diplomacy/engine/game.py:3539
↓ 1 callers
Method
_update_orders
Updates the orders of a power :param power: The power instance (or None if updating multiple instances) :param orders: The u
diplomacy/engine/game.py:3206
↓ 1 callers
Method
_update_retreat_orders
Updates order for Retreats phase :param power: The power instance submitting the orders :param orders: The updated orders
diplomacy/engine/game.py:3369
↓ 1 callers
Method
_valid_order
Determines if an order is valid :param power: The power submitting the order :param unit: The unit being affected by the ord
diplomacy/engine/game.py:2161
↓ 1 callers
Method
_validate_api_keys
Validate API keys at startup and issue warnings for missing keys
config.py:40
↓ 1 callers
Method
_validate_orders
Filter out invalid moves, fill missing with HOLD, else fallback. Returns a tuple: (validated_moves, invalid_moves_found)
ai_diplomacy/clients.py:346
↓ 1 callers
Method
_validate_status
Validates the status of the game object
diplomacy/engine/game.py:2639
↓ 1 callers
Method
_year_from_phase
Return the 4-digit year embedded in a phase name such as 'F1903M'.
analysis/statistical_game_analysis.py:1057
↓ 1 callers
Method
addGamesFound
(gamesToAdd)
diplomacy/web/src/gui/pages/page.jsx:228
↓ 1 callers
Function
addMessageToChat
(msg: MessageSchemaType, animateWords: boolean = false, onComplete: Function | null = null)
ai_animation/src/domElements/chatWindows.ts:180
↓ 1 callers
Function
addNextWord
()
ai_animation/src/components/chatBubble.ts:35
↓ 1 callers
Method
addOnClearedCenters
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:168
↓ 1 callers
Method
addOnClearedOrders
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:172
↓ 1 callers
Method
addOnClearedUnits
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:176
↓ 1 callers
Method
addOnGameMessageReceived
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:188
↓ 1 callers
Method
addOnGamePhaseUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:196
↓ 1 callers
Method
addOnGameProcessed
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:192
↓ 1 callers
Method
addOnGameStatusUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:200
↓ 1 callers
Method
addOnOmniscientUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:204
↓ 1 callers
Method
addOnPowerOrdersFlag
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:212
↓ 1 callers
Method
addOnPowerOrdersUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:208
↓ 1 callers
Method
addOnPowerVoteUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:216
↓ 1 callers
Method
addOnPowerWaitFlag
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:220
↓ 1 callers
Method
addOnPowersControllers
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:180
↓ 1 callers
Method
addOnVoteCountUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:224
↓ 1 callers
Method
addOnVoteUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:228
↓ 1 callers
Function
addToNewsBanner
* Appends text to the scrolling news banner. * If the banner is at its default text or empty, replace it entirely. * Otherwise, just append " | " +
ai_animation/src/components/newsBanner.ts:23
↓ 1 callers
Method
addUserGameOrders
(username, gameID, gamePhase, powerName, orders)
diplomacy/web/src/gui/utils/dipStorage.jsx:113
↓ 1 callers
Method
add_data
Add data with a non-null deadline. For null deadlines, use no_wait(). :param data: data to add :param nb_units_to_wait: time
diplomacy/server/scheduler.py:181
↓ 1 callers
Method
add_message
(self, phase_name: str, sender: str, recipient: str, message_content: str)
ai_diplomacy/game_history.py:107
↓ 1 callers
Method
add_notification_callback
Add a callback for a notification. :param notification_class: a notification class. See :mod:`diplomacy.communication.no
diplomacy/client/network_game.py:178
↓ 1 callers
Method
add_plan
(self, power_name: str, plan: str)
ai_diplomacy/game_history.py:34
↓ 1 callers
Method
add_plan
(self, phase_name: str, power_name: str, plan: str)
ai_diplomacy/game_history.py:101
↓ 1 callers
Method
alias
This function is used to replace multi-words with their acronyms :param word: The current list of words to try to shorten :r
diplomacy/engine/map.py:867
↓ 1 callers
Function
analyze_game
Analyze a single game using CSV for model-power-phase mappings
diplomacy_unified_analysis_final.py:109
↓ 1 callers
Method
analyze_game
Analyze the entire game for key moments with concurrent processing Args: max_phases: Maximum number of phases to analyze
analyze_game_moments.py:735
↓ 1 callers
Method
analyze_phase_and_update_state
Analyzes the outcome of the last phase and updates goals/relationships using the LLM.
ai_diplomacy/agent.py:948
↓ 1 callers
Function
animate
()
ai_animation/src/main.ts:141
↓ 1 callers
Function
animateHeadNod
(msg, playSoundEffect = true)
ai_animation/src/domElements/chatWindows.ts:254
↓ 1 callers
Method
assertOmniscientGame
()
diplomacy/web/src/diplomacy/engine/game.js:233
↓ 1 callers
Method
assertPlayerGame
(powerName)
diplomacy/web/src/diplomacy/engine/game.js:223
↓ 1 callers
Method
assert_master_token
Check if given token is a master token for given game data. Raise an exception on error. :param token: token :param server_g
diplomacy/server/server.py:869
↓ 1 callers
Function
assign_models_to_powers
Example usage: define which model each power uses. Return a dict: { power_name: model_id, ... } POWERS = ['AUSTRIA', 'ENGLAND', 'FRANCE',
ai_diplomacy/utils.py:58
↓ 1 callers
Function
atomic_write_json_async
Writes a dictionary to a JSON file atomically using async I/O.
ai_diplomacy/utils.py:583
↓ 1 callers
Function
attributes_to_string
Convert given HTML attributes ton an inline string. :param attributes: attributes to write :return: a string representing attributes
diplomacy/web/svg_to_react.py:252
↓ 1 callers
Method
authenticate
(username, password)
diplomacy/web/src/diplomacy/client/connection.js:343
↓ 1 callers
Method
bindCallbacks
(networkGame)
diplomacy/web/src/gui/pages/content_game.jsx:425
↓ 1 callers
Method
build
Builds a message from a stream and its declared length
diplomacy/daide/messages.py:64
↓ 1 callers
Method
buildArmyToString
(path)
diplomacy/web/src/gui/utils/order_building.js:129
↓ 1 callers
Method
buildFleetToString
(path)
diplomacy/web/src/gui/utils/order_building.js:134
↓ 1 callers
Method
buildOrder
(path)
diplomacy/web/src/gui/utils/order_building.js:67
↓ 1 callers
Function
build_cache
Computes a mapping from ix-to-power and ix-to-loc and vice-versa
diplomacy/integration/webdiplomacy_net/utils.py:56
↓ 1 callers
Method
build_cache
Builds a cache to speed up abuts and coasts lookup
diplomacy/engine/map.py:704
↓ 1 callers
Method
build_conversation_prompt
( self, game, board_state, power_name: str, possible_orders: Dict[str,
ai_diplomacy/clients.py:431
↓ 1 callers
Method
build_model
Return model associated to current class. You can either define model class field or override this function.
diplomacy/utils/jsonable.py:135
↓ 1 callers
Method
build_planning_prompt
( self, game, board_state, power_name: str, possible_orders: Dict[str,
ai_diplomacy/clients.py:402
↓ 1 callers
Function
calculatePhaseOrder
* Calculates chronological order number for a phase
ai_animation/src/types/moments.ts:152
↓ 1 callers
Method
callback
Called when request is effectively written on socket, and move the request from `request to send` to `request assumed sent`.
diplomacy/client/connection.py:529
↓ 1 callers
Function
camel_case_to_snake_case
Convert a string (expected to be in camel case) to snake case. :param name: string to convert. :return: snake case version of given
diplomacy/utils/common.py:109
↓ 1 callers
Method
can_still_process
Return True if this immediate task can still be processed for the first time. If False is returned, task is drop and never processed (not
diplomacy/server/scheduler.py:117
↓ 1 callers
Method
cannot_create_more_games
Return True if server can not accept new games.
diplomacy/server/server.py:879
↓ 1 callers
Method
cast
Return a copy of this game for given role (either observer role, omniscient role or a power role).
diplomacy/server/server_game.py:220
↓ 1 callers
Function
check_country
Helper - checks if a given country is in a list of supporters Args: supporters: The list of supporters to check
analysis/p1_make_longform_orders_data.py:335
↓ 1 callers
Method
check_if_lie_intentional
Determine if a lie was intentional based on diary content
analyze_game_moments.py:639
↓ 1 callers
Method
check_promise_against_orders
Check if a promise was kept by comparing against actual orders
analyze_game_moments.py:499
↓ 1 callers
Function
clamp
(value: number, min: number, max: number)
ai_animation/src/utils/timing.ts:56
↓ 1 callers
Method
clearAllCallbacks
()
diplomacy/web/src/diplomacy/client/network_game.js:46
↓ 1 callers
Function
clearNewsBanner
()
ai_animation/src/components/newsBanner.ts:14
↓ 1 callers
Method
clearVote
()
diplomacy/web/src/diplomacy/engine/game.js:258
↓ 1 callers
Method
clear_notification_callbacks
Remove all user callbacks for a notification. :param notification_class: a notification class
diplomacy/client/network_game.py:192
↓ 1 callers
Method
cloneAt
(pastPhase)
diplomacy/web/src/diplomacy/engine/game.js:392
↓ 1 callers
Method
close_connection
Close the connection with the client
diplomacy/daide/connection_handler.py:97
↓ 1 callers
Function
compact_extra
Compact extra dictionary so that it takes less place into final output string. :param extra: dictionary of extra data :type extra: d
diplomacy/web/svg_to_react.py:169
↓ 1 callers
Method
compareControlType
(a, b)
diplomacy/web/src/gui/utils/province.js:40
↓ 1 callers
Function
conduct_negotiations
Conducts a round-robin conversation among all non-eliminated powers. Each power can send up to 'max_rounds' messages, choosing between privat
ai_diplomacy/negotiations.py:22
↓ 1 callers
Method
connect
Connect to the DAIDE server :param game_port: the DAIDE game's port
diplomacy/daide/tests/test_daide_game.py:175
↓ 1 callers
Method
connect_user
Connect given username to given connection handler with a new generated token, and return token generated. :param username:
diplomacy/server/users.py:194
↓ 1 callers
Function
construct_order_generation_prompt
Constructs the final prompt for order generation. Args: system_prompt: The base system prompt for the LLM. game: The game object.
ai_diplomacy/prompt_constructor.py:152
↓ 1 callers
Method
consumeAsync
(valueConsumer)
diplomacy/web/src/diplomacy/utils/queue.js:61
↓ 1 callers
Method
convoyToString
(path)
diplomacy/web/src/gui/utils/order_building.js:114
↓ 1 callers
Method
copy
Return a copy of this priority dict. :rtype: PriorityDict
diplomacy/utils/priority_dict.py:92
↓ 1 callers
Method
copy
()
diplomacy/web/src/diplomacy/engine/power.js:82
↓ 1 callers
Method
countControlledPowers
()
diplomacy/web/src/diplomacy/engine/game.js:263
↓ 1 callers
Method
count_server_games
Return number of server games in server database.
diplomacy/server/server.py:525
← previous
next →
801–900 of 2,689, ranked by callers