MCPcopy Create free account

hub / github.com/GoodStartLabs/AI_Diplomacy / functions

Functions2,689 in github.com/GoodStartLabs/AI_Diplomacy

↓ 4 callersMethodcreateColLabel
(htmlFor, title)
diplomacy/web/src/gui/components/forms.jsx:103
↓ 4 callersMethodcreateLabel
(htmFor, title, className)
diplomacy/web/src/gui/components/forms.jsx:99
↓ 4 callersMethodcreateOnSubmitCallback
(component, callback, resetState)
diplomacy/web/src/gui/components/forms.jsx:34
↓ 4 callersMethodcreateSubmit
(title, large, onSubmit)
diplomacy/web/src/gui/components/forms.jsx:62
↓ 4 callersMethoddialog
* open a dialog box * @param {DialogBuilder} builder - a callback to generate dialog GUI. Will be executed with a `onClose` callback * param
diplomacy/web/src/gui/pages/page.jsx:98
↓ 4 callersFunctiondisplayPhase
(skipMessages = false)
ai_animation/src/phase.ts:165
↓ 4 callersMethoddoes_not_wait
Return True if the game does not wait anything to process its current phase. The game is not waiting is all **controlled** powers have de
diplomacy/engine/game.py:546
↓ 4 callersMethodfirst_key
Get the lowest key from the dict.
diplomacy/utils/sorted_dict.py:118
↓ 4 callersMethodfirst_value
Get the value associated to lowest key in the dict.
diplomacy/utils/sorted_dict.py:122
↓ 4 callersMethodforceUpdate
()
diplomacy/web/src/gui/pages/content_game.jsx:230
↓ 4 callersFunctiongather_possible_orders
Returns a dictionary mapping each orderable location to the list of valid orders.
ai_diplomacy/utils.py:122
↓ 4 callersMethodget
(key)
diplomacy/web/src/gui/utils/power_view.jsx:62
↓ 4 callersMethodgetAllPossibleOrders
(parameters, game)
diplomacy/web/src/diplomacy/client/channel.js:163
↓ 4 callersMethodgetPasswordID
()
diplomacy/web/src/gui/forms/join_form.jsx:38
↓ 4 callersMethodgetPowerNameID
()
diplomacy/web/src/gui/forms/join_form.jsx:34
↓ 4 callersMethodgetServerOrders
()
diplomacy/web/src/diplomacy/engine/game.js:427
↓ 4 callersMethodget_class_name
Returns the class name in snake_case.
diplomacy/utils/network_data.py:56
↓ 4 callersMethodget_dummy_power_names
Return sequence of not eliminated dummy power names.
diplomacy/engine/game.py:583
↓ 4 callersFunctionget_file_md5
Calculates a file MD5 hash :param file_path: The file path :return: The computed md5 hash
diplomacy/utils/convoy_paths.py:177
↓ 4 callersMethodget_latest_timestamp
Return timestamp of latest data saved into this game (either current state, archived state or message). :return: a timestamp
diplomacy/engine/game.py:622
↓ 4 callersMethodget_messages
Return a filtered dict of current messages for given output game role. See method filter_messages() about parameters.
diplomacy/server/server_game.py:127
↓ 4 callersMethodget_model
Return model associated to current class, and cache it for future uses, to avoid multiple rendering of model for each class derived from
diplomacy/utils/jsonable.py:142
↓ 4 callersMethodget_observer_addresses
Generate addresses (couples [power name, token]) of observers of this game.
diplomacy/server/server_game.py:267
↓ 4 callersMethodget_phase_data
Return a GamePhaseData object representing current game.
diplomacy/engine/game.py:1575
↓ 4 callersMethodget_phase_from_history
Return a game phase data corresponding to given phase from phase history.
diplomacy/engine/game.py:722
↓ 4 callersFunctionhandler
Raises a timeout
diplomacy/daide/tests/test_daide_game.py:52
↓ 4 callersMethodhas_expected_controls_count
Return True if game has expected number of map powers to be controlled. If True, the game can start (if not yet started).
diplomacy/engine/game.py:560
↓ 4 callersMethodhas_username
Return True if users have given username.
diplomacy/server/users.py:74
↓ 4 callersMethodintersection
Return coordinates of the intersection of (OM) with equilateral triangle, with M the point with coordinates (x_m, y_m). Only the intersec
diplomacy/utils/equilateral_triangle.py:134
↓ 4 callersMethodisObserverGame
()
diplomacy/web/src/diplomacy/engine/game.js:300
↓ 4 callersMethodisWater
()
diplomacy/web/src/gui/utils/province.js:114
↓ 4 callersFunctionis_dictionary
Check if given variable is a dictionary-like object. :param dict_to_check: Dictionary to check. :return: Indicates if the object is
diplomacy/utils/common.py:75
↓ 4 callersMethodis_dummy
Return True if given power name is not currently controlled.
diplomacy/engine/game.py:542
↓ 4 callersMethodis_observer_game
Return True if this game is an observer game.
diplomacy/engine/game.py:513
↓ 4 callersMethodis_server_game
Return True if this game is a server game.
diplomacy/engine/game.py:521
↓ 4 callersMethodis_server_power
(Network Method) Return True if this power is a server power.
diplomacy/engine/power.py:344
↓ 4 callersMethodis_valid_password
Return True if given password matches user hashed password.
diplomacy/server/user.py:35
↓ 4 callersMethodkeys
Make sure keys() iterates on keys based on their priority.
diplomacy/utils/priority_dict.py:99
↓ 4 callersMethodlastValue
()
diplomacy/web/src/diplomacy/utils/sorted_dict.js:96
↓ 4 callersFunctionlog_llm_response
Appends a raw LLM response to a CSV log file.
ai_diplomacy/utils.py:347
↓ 4 callersMethodonSelectLocation
(possibleLocations, powerName, orderType, orderPath)
diplomacy/web/src/gui/pages/content_game.jsx:268
↓ 4 callersMethodonSelectVia
(location, powerName, orderPath)
diplomacy/web/src/gui/pages/content_game.jsx:283
↓ 4 callersMethodpop_next_resp_notif
Pop the next response or notifcation from a DAIDE communications list :return: The next response or notifcation along with the updated l
diplomacy/daide/tests/test_daide_game.py:152
↓ 4 callersMethodprocess
Process current game phase and move forward to next phase. :return: a triple containing: - previous game state (before
diplomacy/server/server_game.py:462
↓ 4 callersFunctionprocess_standard_game_inputs
Read in a game folder and return the overview, lmvs_data, and all_responses Args: path_to_folder: Path to the game folder. Must
analysis/analysis_helpers.py:24
↓ 4 callersMethodreloadDeadlineTimer
(networkGame)
diplomacy/web/src/gui/pages/content_game.jsx:323
↓ 4 callersMethodsetController
(controller, controlType)
diplomacy/web/src/gui/utils/province.js:52
↓ 4 callersMethodsetPossibleOrders
(possibleOrders)
diplomacy/web/src/diplomacy/engine/game.js:486
↓ 4 callersMethodsetResult
(result)
diplomacy/web/src/diplomacy/utils/future.js:36
↓ 4 callersMethodstop_daide_server
Stop one or all DAIDE TCP server :param game_id: game id of the DAIDE server. If None, all servers will be stopped :type gam
diplomacy/server/server.py:910
↓ 4 callersMethodtoDict
()
diplomacy/web/src/diplomacy/utils/sorted_dict.js:110
↓ 4 callersFunctionto_json_string
Converts to a JSON string, without escaping the '/' characters
diplomacy/web/svg_to_react.py:382
↓ 4 callersFunctionunit_dict_to_str
Converts a unit from the dictionary format to the string format e.g. ``{'unitType': 'Army', 'terrID': 6, 'countryId': 1, 'retreating': 'No'}`
diplomacy/integration/webdiplomacy_net/game.py:35
↓ 4 callersFunctionupdateMomentStatus
()
ai_animation/src/debug/showRandomMoment.ts:49
↓ 4 callersMethoduser_is_omniscient
Return True if given username is omniscient for given game data. :param username: username :param server_game: game data
diplomacy/server/server.py:790
↓ 4 callersMethodvalidate
(self, element)
diplomacy/utils/parsing.py:370
↓ 4 callersMethodwrite_message
Write a message into the stream
diplomacy/daide/connection_handler.py:139
↓ 4 callersFunctionxScale
(index: number)
ai_animation/src/components/rotatingDisplay.ts:226
↓ 3 callersMethod__disconnect
(error)
diplomacy/web/src/gui/pages/page.jsx:140
↓ 3 callersMethod__get_engine_to_display
(initialEngine)
diplomacy/web/src/gui/pages/content_game.jsx:1035
↓ 3 callersMethod__line_OM
(x_M, y_M)
diplomacy/web/src/gui/maps/common/equilateralTriangle.js:20
↓ 3 callersMethod__line_om
Returns the slope and the intersect of the line between O and M :return: a, b - respectively the slope and the intercept of the line OM
diplomacy/utils/equilateral_triangle.py:56
↓ 3 callersMethod_build_limit
Determines the maximum number of builds a power can do in an adjustment phase Note: - This function assumes that one unit c
diplomacy/engine/game.py:2981
↓ 3 callersFunction_context
(game)
tests/test_possible_order_context.py:21
↓ 3 callersMethod_cut_support
See if the order made by the unit cuts a support. If so, cut it. :param unit: The unit who is attacking (and cutting support)
diplomacy/engine/game.py:3874
↓ 3 callersMethod_enqueue
Put a task in queue of tasks to process now.
diplomacy/server/scheduler.py:153
↓ 3 callersMethod_extract_json_from_text_async
Async wrapper for _extract_json_from_text that runs CPU-intensive parsing in a thread pool.
ai_diplomacy/agent.py:103
↓ 3 callersMethod_get_keys_interval
Get a couple of internal key positions (index of key_from, index of key_to) allowing to easily retrieve values in closed interval [index
diplomacy/utils/sorted_dict.py:210
↓ 3 callersMethod_phase_abbr
Constructs a 5 character representation (S1901M) from a phase (SPRING 1901 MOVEMENT) :param phase: The full phase (e.g. SPRING 1901 MOVE
diplomacy/engine/game.py:3127
↓ 3 callersMethod_send_get_request
Helper method to send a get request to the API endpoint
diplomacy/integration/webdiplomacy_net/api.py:259
↓ 3 callersFunction_split_move
Return ('A BUD', 'TRI') from 'A BUD - TRI' (validated move only).
ai_diplomacy/possible_order_context.py:505
↓ 3 callersMethodadd
Add given game. :param game: a NetworkGame object. :type game: diplomacy.client.network_game.NetworkGame
diplomacy/client/game_instances_set.py:63
↓ 3 callersMethodaddToMyGames
(game)
diplomacy/web/src/gui/pages/page.jsx:326
↓ 3 callersMethodaddUserGame
(username, gameID)
diplomacy/web/src/gui/utils/dipStorage.jsx:104
↓ 3 callersMethodadd_omniscient_token
Set given token as omniscient token.
diplomacy/server/server_game.py:324
↓ 3 callersMethodanalyze_turn
Analyze a single turn for key moments
analyze_game_moments.py:356
↓ 3 callersFunctionanimateMessageWords
(message: string, contentSpan: HTMLElement, messagesContainer: HTMLElement, onComplete: Function | null)
ai_animation/src/components/chatBubble.ts:20
↓ 3 callersMethodas_omniscient_game
Return an omniscient game data object copy of this game.
diplomacy/server/server_game.py:188
↓ 3 callersMethodassert_token
Check if given token is associated to an user, check if token is still valid, and link token to given connection handler. If any step fai
diplomacy/server/server.py:845
↓ 3 callersMethodbackup_now
Save backup of server data and loaded games immediately. :param force: if True, force to save server data and all loaded games
diplomacy/server/server.py:386
↓ 3 callersFunctionbfs_shortest_path
Performs BFS to find the shortest path from start_loc to a target satisfying is_target_func.
ai_diplomacy/possible_order_context.py:68
↓ 3 callersMethodbuild_caches
Rebuilds the various caches
diplomacy/engine/game.py:1499
↓ 3 callersFunctionbuild_diplomacy_graph
Return graph[PROV]['ARMY'|'FLEET'] = list of 3-letter neighbour provinces. Works for dual-coast provinces by interrogating `abuts()` directly
ai_diplomacy/possible_order_context.py:18
↓ 3 callersMethodclear
()
diplomacy/web/src/diplomacy/utils/sorted_dict.js:33
↓ 3 callersMethodclearScheduleTimeout
()
diplomacy/web/src/gui/pages/content_game.jsx:305
↓ 3 callersFunctionconnect
Connect to given hostname and port. :param hostname: a hostname :param port: a port :return: a Connection object connected.
diplomacy/client/connection.py:38
↓ 3 callersMethodcontrol
Control given power name with given username via given token.
diplomacy/server/server_game.py:351
↓ 3 callersMethoddisconnectGame
(gameID)
diplomacy/web/src/gui/pages/page.jsx:280
↓ 3 callersMethoddraw
Force a draw for this game, set status as COMPLETED and finish the game. :param winners: (optional) either None (all powers remaining to
diplomacy/engine/game.py:756
↓ 3 callersMethodextendPhaseHistory
(phaseData)
diplomacy/web/src/diplomacy/engine/game.js:201
↓ 3 callersMethodextend_phase_history
Add data from a game phase to game history. :param game_phase_data: a GamePhaseData object. :type game_phase_data: GamePhase
diplomacy/engine/game.py:735
↓ 3 callersFunctionfind_convoy_path
Finds a convoy path from src to dest :param src: The source location (e.g. 'BRE') :param dest: The destination location (e.g. 'LON')
diplomacy/integration/webdiplomacy_net/orders.py:50
↓ 3 callersMethodforce_game_processing
Add a game to scheduler to be processed as soon as possible. Use this method instead of schedule_game() to explicitly add games with null
diplomacy/server/server.py:746
↓ 3 callersFunctionformat_moves_dict
(title, moves_dict)
ai_diplomacy/narrative.py:140
↓ 3 callersMethodfrom_stream
Builds a message from the stream :param stream: An opened Tornado stream. :type stream: tornado.iostream.BaseIOStream
diplomacy/daide/messages.py:70
↓ 3 callersMethodfrom_string
Builds the clause from a string :param string: The string to use to build the clause :param on_error: The action to take whe
diplomacy/daide/clauses.py:477
↓ 3 callersMethodgame_can_start
Return True if server game can start. A game can start if all followings conditions are satisfied: - Game has not yet starte
diplomacy/server/server_game.py:114
↓ 3 callersFunctiongetCurrentPhaseName
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:187
↓ 3 callersFunctiongetMapComponent
(mapName)
diplomacy/web/src/gui/pages/content_game.jsx:90
↓ 3 callersMethodgetMapInfo
()
diplomacy/web/src/gui/pages/content_game.jsx:301
← previousnext →301–400 of 2,689, ranked by callers