MCPcopy Create free account

hub / github.com/GoodStartLabs/AI_Diplomacy / functions

Functions2,689 in github.com/GoodStartLabs/AI_Diplomacy

↓ 1 callersMethod_process
Processes the current phase of the game
diplomacy/engine/game.py:2802
↓ 1 callersMethod_reconnect
Reconnect.
diplomacy/client/connection.py:204
↓ 1 callersMethod_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 callersFunction_removeUnitsFromBoard
()
ai_animation/src/units/create.ts:148
↓ 1 callersMethod_remove_from_games
(gameID)
diplomacy/web/src/gui/pages/page.jsx:316
↓ 1 callersMethod_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 callersMethod_resolve_moves
Resolves the list of orders
diplomacy/engine/game.py:3954
↓ 1 callersFunction_score_game
(game_json: Path)
experiment_runner/analysis/summary.py:77
↓ 1 callersMethod_send_post_request
Helper method to send a post request to the API endpoint
diplomacy/integration/webdiplomacy_net/api.py:271
↓ 1 callersMethod_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 callersMethod_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 callersMethod_split
Build the subject split using it's _input_str
diplomacy/utils/splitter.py:56
↓ 1 callersMethod_step
Compute a step (check and enqueue tasks to run now) in scheduler.
diplomacy/server/scheduler.py:230
↓ 1 callersMethod_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 callersMethod_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 callersFunction_unit_head
(order: str)
analysis/validation.py:146
↓ 1 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_validate_api_keys
Validate API keys at startup and issue warnings for missing keys
config.py:40
↓ 1 callersMethod_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 callersMethod_validate_status
Validates the status of the game object
diplomacy/engine/game.py:2639
↓ 1 callersMethod_year_from_phase
Return the 4-digit year embedded in a phase name such as 'F1903M'.
analysis/statistical_game_analysis.py:1057
↓ 1 callersMethodaddGamesFound
(gamesToAdd)
diplomacy/web/src/gui/pages/page.jsx:228
↓ 1 callersFunctionaddMessageToChat
(msg: MessageSchemaType, animateWords: boolean = false, onComplete: Function | null = null)
ai_animation/src/domElements/chatWindows.ts:180
↓ 1 callersFunctionaddNextWord
()
ai_animation/src/components/chatBubble.ts:35
↓ 1 callersMethodaddOnClearedCenters
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:168
↓ 1 callersMethodaddOnClearedOrders
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:172
↓ 1 callersMethodaddOnClearedUnits
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:176
↓ 1 callersMethodaddOnGameMessageReceived
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:188
↓ 1 callersMethodaddOnGamePhaseUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:196
↓ 1 callersMethodaddOnGameProcessed
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:192
↓ 1 callersMethodaddOnGameStatusUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:200
↓ 1 callersMethodaddOnOmniscientUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:204
↓ 1 callersMethodaddOnPowerOrdersFlag
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:212
↓ 1 callersMethodaddOnPowerOrdersUpdate
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:208
↓ 1 callersMethodaddOnPowerVoteUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:216
↓ 1 callersMethodaddOnPowerWaitFlag
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:220
↓ 1 callersMethodaddOnPowersControllers
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:180
↓ 1 callersMethodaddOnVoteCountUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:224
↓ 1 callersMethodaddOnVoteUpdated
(callback)
diplomacy/web/src/diplomacy/client/network_game.js:228
↓ 1 callersFunctionaddToNewsBanner
* 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 callersMethodaddUserGameOrders
(username, gameID, gamePhase, powerName, orders)
diplomacy/web/src/gui/utils/dipStorage.jsx:113
↓ 1 callersMethodadd_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 callersMethodadd_message
(self, phase_name: str, sender: str, recipient: str, message_content: str)
ai_diplomacy/game_history.py:107
↓ 1 callersMethodadd_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 callersMethodadd_plan
(self, power_name: str, plan: str)
ai_diplomacy/game_history.py:34
↓ 1 callersMethodadd_plan
(self, phase_name: str, power_name: str, plan: str)
ai_diplomacy/game_history.py:101
↓ 1 callersMethodalias
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 callersFunctionanalyze_game
Analyze a single game using CSV for model-power-phase mappings
diplomacy_unified_analysis_final.py:109
↓ 1 callersMethodanalyze_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 callersMethodanalyze_phase_and_update_state
Analyzes the outcome of the last phase and updates goals/relationships using the LLM.
ai_diplomacy/agent.py:948
↓ 1 callersFunctionanimate
()
ai_animation/src/main.ts:141
↓ 1 callersFunctionanimateHeadNod
(msg, playSoundEffect = true)
ai_animation/src/domElements/chatWindows.ts:254
↓ 1 callersMethodassertOmniscientGame
()
diplomacy/web/src/diplomacy/engine/game.js:233
↓ 1 callersMethodassertPlayerGame
(powerName)
diplomacy/web/src/diplomacy/engine/game.js:223
↓ 1 callersMethodassert_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 callersFunctionassign_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 callersFunctionatomic_write_json_async
Writes a dictionary to a JSON file atomically using async I/O.
ai_diplomacy/utils.py:583
↓ 1 callersFunctionattributes_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 callersMethodauthenticate
(username, password)
diplomacy/web/src/diplomacy/client/connection.js:343
↓ 1 callersMethodbindCallbacks
(networkGame)
diplomacy/web/src/gui/pages/content_game.jsx:425
↓ 1 callersMethodbuild
Builds a message from a stream and its declared length
diplomacy/daide/messages.py:64
↓ 1 callersMethodbuildArmyToString
(path)
diplomacy/web/src/gui/utils/order_building.js:129
↓ 1 callersMethodbuildFleetToString
(path)
diplomacy/web/src/gui/utils/order_building.js:134
↓ 1 callersMethodbuildOrder
(path)
diplomacy/web/src/gui/utils/order_building.js:67
↓ 1 callersFunctionbuild_cache
Computes a mapping from ix-to-power and ix-to-loc and vice-versa
diplomacy/integration/webdiplomacy_net/utils.py:56
↓ 1 callersMethodbuild_cache
Builds a cache to speed up abuts and coasts lookup
diplomacy/engine/map.py:704
↓ 1 callersMethodbuild_conversation_prompt
( self, game, board_state, power_name: str, possible_orders: Dict[str,
ai_diplomacy/clients.py:431
↓ 1 callersMethodbuild_model
Return model associated to current class. You can either define model class field or override this function.
diplomacy/utils/jsonable.py:135
↓ 1 callersMethodbuild_planning_prompt
( self, game, board_state, power_name: str, possible_orders: Dict[str,
ai_diplomacy/clients.py:402
↓ 1 callersFunctioncalculatePhaseOrder
* Calculates chronological order number for a phase
ai_animation/src/types/moments.ts:152
↓ 1 callersMethodcallback
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 callersFunctioncamel_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 callersMethodcan_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 callersMethodcannot_create_more_games
Return True if server can not accept new games.
diplomacy/server/server.py:879
↓ 1 callersMethodcast
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 callersFunctioncheck_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 callersMethodcheck_if_lie_intentional
Determine if a lie was intentional based on diary content
analyze_game_moments.py:639
↓ 1 callersMethodcheck_promise_against_orders
Check if a promise was kept by comparing against actual orders
analyze_game_moments.py:499
↓ 1 callersFunctionclamp
(value: number, min: number, max: number)
ai_animation/src/utils/timing.ts:56
↓ 1 callersMethodclearAllCallbacks
()
diplomacy/web/src/diplomacy/client/network_game.js:46
↓ 1 callersFunctionclearNewsBanner
()
ai_animation/src/components/newsBanner.ts:14
↓ 1 callersMethodclearVote
()
diplomacy/web/src/diplomacy/engine/game.js:258
↓ 1 callersMethodclear_notification_callbacks
Remove all user callbacks for a notification. :param notification_class: a notification class
diplomacy/client/network_game.py:192
↓ 1 callersMethodcloneAt
(pastPhase)
diplomacy/web/src/diplomacy/engine/game.js:392
↓ 1 callersMethodclose_connection
Close the connection with the client
diplomacy/daide/connection_handler.py:97
↓ 1 callersFunctioncompact_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 callersMethodcompareControlType
(a, b)
diplomacy/web/src/gui/utils/province.js:40
↓ 1 callersFunctionconduct_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 callersMethodconnect
Connect to the DAIDE server :param game_port: the DAIDE game's port
diplomacy/daide/tests/test_daide_game.py:175
↓ 1 callersMethodconnect_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 callersFunctionconstruct_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 callersMethodconsumeAsync
(valueConsumer)
diplomacy/web/src/diplomacy/utils/queue.js:61
↓ 1 callersMethodconvoyToString
(path)
diplomacy/web/src/gui/utils/order_building.js:114
↓ 1 callersMethodcopy
Return a copy of this priority dict. :rtype: PriorityDict
diplomacy/utils/priority_dict.py:92
↓ 1 callersMethodcopy
()
diplomacy/web/src/diplomacy/engine/power.js:82
↓ 1 callersMethodcountControlledPowers
()
diplomacy/web/src/diplomacy/engine/game.js:263
↓ 1 callersMethodcount_server_games
Return number of server games in server database.
diplomacy/server/server.py:525
← previousnext →801–900 of 2,689, ranked by callers