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
↓ 2 callers
Function
handleClose
()
ai_animation/src/components/victoryModal.ts:315
↓ 2 callers
Method
has_data
Return True if given data is associated to any task.
diplomacy/server/scheduler.py:159
↓ 2 callers
Method
has_game_id
Return True if server database contains such game ID.
diplomacy/server/server.py:616
↓ 2 callers
Method
has_messages_to_receive
Return True if messages list still contains messages to receive.
diplomacy/tests/network/test_real_game.py:82
↓ 2 callers
Method
hide
()
ai_animation/src/debug/eventQueueDisplay.ts:218
↓ 2 callers
Function
hideStandingsBoard
()
ai_animation/src/domElements/standingsBoard.ts:325
↓ 2 callers
Function
highlightProvince
(provinceName: string)
ai_animation/src/debug/provinceHighlight.ts:22
↓ 2 callers
Method
initState
()
diplomacy/web/src/gui/forms/message_form.jsx:28
↓ 2 callers
Method
initState
()
diplomacy/web/src/gui/forms/connection_form.jsx:44
↓ 2 callers
Method
intersection
(x_M, y_M)
diplomacy/web/src/gui/maps/common/equilateralTriangle.js:76
↓ 2 callers
Function
isGamePlaying
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:73
↓ 2 callers
Method
isRealTime
()
diplomacy/web/src/diplomacy/engine/game.js:308
↓ 2 callers
Function
isTwoPowerConversationOpen
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:160
↓ 2 callers
Function
is_adjacent_for_convoy
Checks if two locations are adjacent (for convoy purposes) - If loc_1 and loc_2 are water, loc_1 and loc_2 must be adjacent - If loc
diplomacy/integration/webdiplomacy_net/orders.py:19
↓ 2 callers
Function
is_port_opened
Checks if the specified port is opened :param port: The port to check :param hostname: The hostname to check, defaults to '127.0.0.1
diplomacy/server/server.py:90
↓ 2 callers
Method
is_power
Return True if game level is power.
diplomacy/server/request_manager_utils.py:77
↓ 2 callers
Function
is_sequence
Check if given variable is a sequence-like object. Note that strings and dictionary-like objects will not be considered as sequences.
diplomacy/utils/common.py:96
↓ 2 callers
Method
is_valid_password
Return True if given plain password matches registration password.
diplomacy/engine/game.py:525
↓ 2 callers
Method
keyFromIndex
(index)
diplomacy/web/src/diplomacy/utils/sorted_dict.js:78
↓ 2 callers
Method
key_from_index
Return key matching given position in sorted dict, or None for invalid position.
diplomacy/utils/sorted_dict.py:198
↓ 2 callers
Method
leaveGame
(gameID)
diplomacy/web/src/gui/pages/page.jsx:239
↓ 2 callers
Function
loadFileFromServer
(filePath: string)
ai_animation/src/gameState.ts:63
↓ 2 callers
Function
load_json_from_disk
Return a JSON dictionary loaded from given filename. If JSON parsing fail for given filename, try to load JSON dictionary for a backup file
diplomacy/server/server.py:118
↓ 2 callers
Method
log_state
(self, prefix="")
ai_diplomacy/agent.py:944
↓ 2 callers
Function
measureVictoryTiming
( page: Page, maxWaitTime = 60000 )
ai_animation/tests/e2e/test-helpers.ts:96
↓ 2 callers
Function
minify
Minifyies a Javascript / CSS file
diplomacy/web/svg_to_react.py:387
↓ 2 callers
Method
moveToString
(path)
diplomacy/web/src/gui/utils/order_building.js:97
↓ 2 callers
Method
newGame
(received_game)
diplomacy/web/src/diplomacy/client/request_future_context.js:45
↓ 2 callers
Method
new_game
Create, store (in associated connection) and return a new network game wrapping given game data. Returned game is already in appropriate
diplomacy/client/response_managers.py:64
↓ 2 callers
Function
nextPhase
()
ai_animation/src/phase.ts:137
↓ 2 callers
Function
normalize_order
(order: str)
ai_diplomacy/utils.py:252
↓ 2 callers
Method
onChange
(newState)
diplomacy/web/src/gui/forms/connection_form.jsx:59
↓ 2 callers
Method
onChangePastPhaseIndex
(increment)
diplomacy/web/src/gui/pages/content_game.jsx:809
↓ 2 callers
Function
parse_order_to_bytes
Builds an order clause from a byte array :param phase_type: The game phase :param order_split: An instance of diplomacy.utils.subjec
diplomacy/daide/clauses.py:652
↓ 2 callers
Method
phase_sort_key
Create a sortable key for diplomacy phases like 'S1901M', 'F1901M', etc.
analyze_game_moments.py:813
↓ 2 callers
Function
play_phase
Play a phase for a user game: #. Send messages #. wait for messages to receive #. send current orders. :param game:
diplomacy/tests/network/test_real_game.py:414
↓ 2 callers
Method
pop_next_request
Pop the next request from a DAIDE communications list :return: The next request along with the updated list of communications
diplomacy/daide/tests/test_daide_game.py:129
↓ 2 callers
Function
posterior_samples
(data)
experiment_runner/analysis/compare_stats.py:141
↓ 2 callers
Method
power_has_token
Return True if given power has given player token. :param power_name: name of power to check. :param token: token to look fo
diplomacy/server/server_game.py:315
↓ 2 callers
Method
promote_moderator
Allow given username to be a moderator of this game.
diplomacy/server/server_game.py:403
↓ 2 callers
Method
register_dummy_power_names
Update internal registry of dummy power names waiting for orders for given server games. :param server_game: server game to check
diplomacy/server/server.py:557
↓ 2 callers
Method
reloadPowerServerOrders
* Reset local orders and replace them with current server orders for given power. * @param {string} powerName - name of power to update
diplomacy/web/src/gui/pages/content_game.jsx:592
↓ 2 callers
Method
removeChannel
()
diplomacy/web/src/diplomacy/client/request_future_context.js:54
↓ 2 callers
Method
remove_admin
Remove given username from administrators.
diplomacy/server/users.py:135
↓ 2 callers
Method
remove_channel
Remove associated channel (inferred from request token) from associated connection.
diplomacy/client/response_managers.py:77
↓ 2 callers
Method
remove_connection
Remove given connection handler. Return tokens associated to this connection handler, or None if connection handler is unknow
diplomacy/server/users.py:172
↓ 2 callers
Method
remove_observer_token
Remove given observer token.
diplomacy/server/server_game.py:363
↓ 2 callers
Method
remove_omniscient_token
Remove given omniscient token.
diplomacy/server/server_game.py:367
↓ 2 callers
Method
remove_sub
Remove values associated to keys between key_from and key_to (both bounds included). See sub() doc about key_from and key_to.
diplomacy/utils/sorted_dict.py:184
↓ 2 callers
Method
render
Renders the current game and returns its image representation :param incl_orders: Optional. Flag to indicate we also want to render ord
diplomacy/engine/game.py:1338
↓ 2 callers
Function
renderStandingsTable
* Render the standings table with current data and sort options
ai_animation/src/domElements/standingsBoard.ts:155
↓ 2 callers
Method
reversed_values
Get an iterator to the values in the dict in reversed order or keys.
diplomacy/utils/sorted_dict.py:146
↓ 2 callers
Function
run
Real test function called for a given case data. Load a server (with optional given server kwargs), call function main(case_data) as
diplomacy/tests/network/test_real_game.py:583
↓ 2 callers
Function
save_json_on_disk
Save given JSON dictionary into given filename and back-up previous file version if exists.
diplomacy/server/server.py:111
↓ 2 callers
Method
save_json_results
Save all moments as JSON for further analysis
analyze_game_moments.py:1218
↓ 2 callers
Method
send_request
Sends a request :param request: the request to send
diplomacy/daide/tests/test_daide_game.py:187
↓ 2 callers
Method
setConnectionHostname
(hostname)
diplomacy/web/src/gui/utils/dipStorage.jsx:86
↓ 2 callers
Method
setConnectionPort
(port)
diplomacy/web/src/gui/utils/dipStorage.jsx:92
↓ 2 callers
Method
setConnectionUsername
(username)
diplomacy/web/src/gui/utils/dipStorage.jsx:80
↓ 2 callers
Method
setState
(state)
diplomacy/web/src/diplomacy/engine/game.js:326
↓ 2 callers
Method
setStatus
(status)
diplomacy/web/src/diplomacy/engine/game.js:366
↓ 2 callers
Method
set_orders
Submit orders
diplomacy/tests/test_datc_no_expand.py:30
↓ 2 callers
Method
show
()
ai_animation/src/debug/eventQueueDisplay.ts:211
↓ 2 callers
Function
showStandingsBoard
()
ai_animation/src/domElements/standingsBoard.ts:316
↓ 2 callers
Function
speakSummary
* Call ElevenLabs TTS to speak the summary out loud. * Returns a promise that resolves only after the audio finishes playing (or fails). * Truncates
ai_animation/src/speech.ts:87
↓ 2 callers
Function
startGamePlayback
(page: Page)
ai_animation/tests/e2e/test-helpers.ts:26
↓ 2 callers
Method
stop
()
diplomacy/web/src/diplomacy/client/connection.js:189
↓ 2 callers
Function
stopCurrentFlash
* Stops the current flash animation and restores the original color
ai_animation/src/debug/provinceHighlight.ts:112
↓ 2 callers
Method
stop_loop_on_callback_error
Modify exception handler method of given IO loop so that IO loop stops and raises as soon as an exception is thrown from a callback.
diplomacy/utils/common.py:288
↓ 2 callers
Method
syncDone
()
diplomacy/web/src/diplomacy/client/connection.js:91
↓ 2 callers
Method
sync_done
Final reconnection work. Remove obsolete game requests and send remaining requests.
diplomacy/client/connection.py:475
↓ 2 callers
Method
to_json
(self, raw_value)
diplomacy/utils/parsing.py:263
↓ 2 callers
Method
to_json
(self, raw_value)
diplomacy/utils/parsing.py:387
↓ 2 callers
Method
to_norm_string
Returns a normalized order string
diplomacy/integration/webdiplomacy_net/orders.py:661
↓ 2 callers
Method
to_type
(self, json_value)
diplomacy/utils/parsing.py:306
↓ 2 callers
Function
transfer_special_tokens
Transfer tokens of given username from an observation role to the opposite in given server game, and notify all user tokens about observation
diplomacy/server/request_manager_utils.py:244
↓ 2 callers
Method
updateDisplay
()
ai_animation/src/debug/eventQueueDisplay.ts:187
↓ 2 callers
Function
updateGameIdDisplay
()
ai_animation/src/domElements.ts:50
↓ 2 callers
Method
updateMyGames
(gamesToAdd)
diplomacy/web/src/gui/pages/page.jsx:197
↓ 2 callers
Function
updateNextMomentDisplay
()
ai_animation/src/debug/nextMoment.ts:41
↓ 2 callers
Method
validate
(self, element)
diplomacy/utils/parsing.py:250
↓ 2 callers
Method
validate_resp_notifs
Validate that expected response / notifications are received regardless of the order :param expected_resp_notifs: the response / notific
diplomacy/daide/tests/test_daide_game.py:197
↓ 2 callers
Method
values
Makes sure values() iterates on priority values (instead of heap entries) from smallest to highest.
diplomacy/utils/priority_dict.py:103
↓ 2 callers
Function
variants
(code: str)
ai_diplomacy/possible_order_context.py:34
↓ 2 callers
Function
verify_current_phase
Check and play current phase. :param game: a NetWork game object. :type game: NetworkGame
diplomacy/tests/network/test_real_game.py:452
↓ 2 callers
Method
write_message
Sends the given message to the client of this Web Socket.
diplomacy/server/connection_handler.py:86
↓ 2 callers
Method
write_request
Write a request into internal connection object. :param request_context: context of request to send. :type request_context:
diplomacy/client/connection.py:312
↓ 1 callers
Method
__add_retreat
(unit, power_name)
diplomacy/web/src/gui/utils/map_data.js:71
↓ 1 callers
Method
__add_unit
(unit, power_name)
diplomacy/web/src/gui/utils/map_data.js:62
↓ 1 callers
Method
__getattribute__
Override to check for empty API keys at access time
config.py:55
↓ 1 callers
Method
__init__
Constructor :param string: the string to split
diplomacy/utils/splitter.py:62
↓ 1 callers
Method
__init__
Initialize a dict parser type with expected key type, val type, and optional dict builder. :param key_type: The expected key type. Must
diplomacy/utils/parsing.py:394
↓ 1 callers
Method
__init__
(self, **kwargs)
diplomacy/server/user.py:30
↓ 1 callers
Method
__init__
Initialize a task. :param data: data to process. :param deadline: Deadline object. :type deadline: _Deadline
diplomacy/server/scheduler.py:71
↓ 1 callers
Method
__intersection_with_AB
(x_M, y_M)
diplomacy/web/src/gui/maps/common/equilateralTriangle.js:26
↓ 1 callers
Method
__intersection_with_AC
(x_M, y_M)
diplomacy/web/src/gui/maps/common/equilateralTriangle.js:43
↓ 1 callers
Method
__intersection_with_BC
(x_M, y_M)
diplomacy/web/src/gui/maps/common/equilateralTriangle.js:60
↓ 1 callers
Method
__iter__
Iterator over all keys based on their priority.
diplomacy/utils/priority_dict.py:64
↓ 1 callers
Method
__on_error
(error)
diplomacy/web/src/diplomacy/client/connection.js:136
↓ 1 callers
Method
_abuts
Determines if a order for unit_type from unit_loc to other_loc is adjacent **Note**: This method is used to generate the abuts_cache
diplomacy/engine/map.py:1152
← previous
next →
601–700 of 2,689, ranked by callers