MCPcopy Create free account

hub / github.com/carlini/chess-llm / functions

Functions290 in github.com/carlini/chess-llm

↓ 81 callersFunctionset_config_default
Fill a specific config key with the default value if it is missing. :param config: The bot's config. :param sections: The sections that
lichess-bot/config.py:106
↓ 31 callersFunctionseconds
Create a timedelta duration in seconds.
lichess-bot/timer.py:22
↓ 22 callersFunctionmsec
Create a timedelta duration in milliseconds.
lichess-bot/timer.py:7
↓ 19 callersFunctionto_seconds
Return a bare number representing the length of the duration in seconds.
lichess-bot/timer.py:27
↓ 13 callersFunctionconfig_assert
Raise an exception if an assertion is false.
lichess-bot/config.py:82
↓ 12 callersMethodsend_message
Send the message to the chat.
lichess-bot/conversation.py:86
↓ 11 callersMethodis_expired
Check if a timer is expired.
lichess-bot/timer.py:85
↓ 10 callersMethodapi_post
Send a POST to lichess.org. :param endpoint_name: The name of the endpoint. :param template_args: The values that go in the
lichess-bot/lichess.py:191
↓ 10 callersMethoditems
:return: All the key-value pairs in this config.
lichess-bot/config.py:56
↓ 10 callersMethodtime_since_reset
How much time has passed.
lichess-bot/timer.py:93
↓ 9 callersMethodsend_reply
Send the reply to the chat. :param line: Information about the original message that we reply to. :param reply: The reply to
lichess-bot/conversation.py:76
↓ 8 callersMethoddecline_due_to
Get the reason lichess-bot declined an incoming challenge. :param requirement_met: Whether a requirement is met. :param decl
lichess-bot/model.py:80
↓ 7 callersMethodonline_book_get
Get an external move from online sources (chessdb or lichess.org).
lichess-bot/lichess.py:362
↓ 7 callersMethodurl
Get the url of the game.
lichess-bot/model.py:175
↓ 6 callersFunctioncheck_config_section
Check the validity of a config section. :param config: The config section. :param data_name: The key to check its value. :param data
lichess-bot/config.py:88
↓ 6 callersMethodlookup
Get the value of a key. :param name: The key to get its value. :return: `Configuration` if the value is a `dict` else return
lichess-bot/config.py:46
↓ 6 callersMethodshow_earliest_challenge_time
Show the earliest that the next challenge will be created.
lichess-bot/matchmaking.py:245
↓ 5 callersMethodapi_get
Send a GET to lichess.org. :param endpoint_name: The name of the endpoint. :param template_args: The values that go in the u
lichess-bot/lichess.py:116
↓ 5 callersFunctionpiecewise_function
Return a value according to a position argument. This function is meant to replace if-elif-else blocks that turn ranges into discrete values
lichess-bot/engine_wrapper.py:1234
↓ 5 callersMethodreset
Reset the timer.
lichess-bot/timer.py:89
↓ 5 callersFunctionscore_to_wdl
(score: int)
lichess-bot/engine_wrapper.py:1020
↓ 5 callersFunctionsec_str
Return a string with the duration value in whole number seconds.
lichess-bot/timer.py:32
↓ 4 callersFunctionchange_value_to_list
Change a single value to a list. e.g. 60 becomes [60]. Used to maintain backwards compatibility. :param config: The bot's config. :param
lichess-bot/config.py:131
↓ 4 callersFunctionget_greeting
Get the greeting to send to the chat.
lichess-bot/lichess-bot.py:663
↓ 4 callersMethodis_abortable
Whether the game can be aborted.
lichess-bot/model.py:194
↓ 4 callersFunctionis_game_over
Check whether the game is over.
lichess-bot/lichess-bot.py:731
↓ 4 callersFunctionrun_bot
Start lichess-bot.
lichess-bot/test_bot/test_bot.py:172
↓ 4 callersFunctionto_msec
Return a bare number representing the length of the duration in milliseconds.
lichess-bot/timer.py:12
↓ 3 callersMethodadd_to_block_list
Add a bot to the blocklist.
lichess-bot/matchmaking.py:256
↓ 3 callersMethodapi_get_json
Send a GET to the lichess.org endpoints that return a JSON. :param endpoint_name: The name of the endpoint. :param template_
lichess-bot/lichess.py:142
↓ 3 callersFunctiondays
Create a timedelta duration in minutes.
lichess-bot/timer.py:47
↓ 3 callersMethodget_best_move
(self, board, num_tokens=None, conversation=None)
chessllm.py:76
↓ 3 callersFunctionget_game_file_path
Return the path of the file where the game record will be written.
lichess-bot/lichess-bot.py:894
↓ 3 callersFunctionlog_proc_count
Log the number of active games and their IDs. :param change: Either "Freed", "Used", or "Queued". :param active_games: A set containing
lichess-bot/lichess-bot.py:259
↓ 3 callersFunctionlogging_configurer
Configure the logger. :param level: The logging level. Either `logging.INFO` or `logging.DEBUG`. :param filename: The filename to write
lichess-bot/lichess-bot.py:130
↓ 3 callersMethodscore
Give a rating estimate to the opponent.
lichess-bot/model.py:113
↓ 3 callersFunctionstart_game_thread
Start a game thread.
lichess-bot/lichess-bot.py:472
↓ 3 callersFunctionversion_numeric
(version_str: str)
lichess-bot/lichess-bot.py:1031
↓ 2 callersMethod__init__
Communicate with UCI engines. :param commands: The engine path and commands to send to the engine. e.g. ["engines/engine.exe", "--op
lichess-bot/engine_wrapper.py:446
↓ 2 callersMethodabort
Aborts a game.
lichess-bot/lichess.py:287
↓ 2 callersMethodadd_challenge_filter
Prevent creating another challenge when an opponent has decline a challenge. :param username: The name of the opponent.
lichess-bot/matchmaking.py:264
↓ 2 callersMethodapi_get_raw
Send a GET to lichess.org that returns plain text (UTF-8). :param endpoint_name: The name of the endpoint. :param template_a
lichess-bot/lichess.py:170
↓ 2 callersMethodchallenge
Challenge an opponent. :param active_games: The games that the bot is playing. :param challenge_queue: The queue contain
lichess-bot/matchmaking.py:222
↓ 2 callersFunctiondownload_and_decompress
(url)
generate_pgn_puzzles.py:27
↓ 2 callersMethodget_ongoing_games
Get the bot's ongoing games.
lichess-bot/lichess.py:320
↓ 2 callersMethodget_path_template
Get the path template given the endpoint name. Will raise an exception if the path template is rate limited. :param endpoint_name: T
lichess-bot/lichess.py:225
↓ 2 callersMethodget_profile
Get the bot's profile (e.g. username).
lichess-bot/lichess.py:314
↓ 2 callersMethodget_random_config_value
Choose a random value from `choices` if the parameter value in the config is `random`.
lichess-bot/matchmaking.py:217
↓ 2 callersMethodget_stats
Get the stats returned by the engine. :param for_chat: Whether the stats will be sent to the game chat, which has a 140 character li
lichess-bot/engine_wrapper.py:344
↓ 2 callersFunctionis_engine_move
Check whether it is the engine's turn.
lichess-bot/lichess-bot.py:726
↓ 2 callersFunctionis_new_rate_limit
Check if the status code is 429, which means that we are rate limited.
lichess-bot/lichess.py:51
↓ 2 callersMethoditer_lines
Send the game events to lichess-bot.
lichess-bot/test_bot/lichess.py:28
↓ 2 callersFunctionlog_config
Log the config to make debugging easier. :param CONFIG: The bot's config.
lichess-bot/config.py:251
↓ 2 callersMethodmake_request
(self, content, num_tokens)
chessllm.py:121
↓ 2 callersFunctionminutes
Create a timedelta duration in minutes.
lichess-bot/timer.py:37
↓ 2 callersFunctionmsec_str
Return a string with the duration value in whole number milliseconds.
lichess-bot/timer.py:17
↓ 2 callersMethodping
Tell the bot when to abort, terminate, and disconnect from a game. :param abort_in: How many seconds to wait before aborting.
lichess-bot/model.py:200
↓ 2 callersMethodquit
Close the engine.
lichess-bot/engine_wrapper.py:437
↓ 2 callersFunctionscore_syzygy_moves
Score all the moves using syzygy egtbs.
lichess-bot/engine_wrapper.py:1275
↓ 2 callersFunctionscore_to_dtz
(score: int)
lichess-bot/engine_wrapper.py:1026
↓ 2 callersMethodset_rate_limit_delay
Set a delay to a path template if it was rate limited. :param path_template: The path template. :param delay_time: How long
lichess-bot/lichess.py:238
↓ 2 callersMethodset_user_agent
Set the user agent for communication with lichess.org.
lichess-bot/lichess.py:333
↓ 2 callersMethodshort_url
Get the short url of the game.
lichess-bot/model.py:179
↓ 2 callersMethodshould_accept_challenge
Whether a bot is likely to accept a challenge to a game. :param username: The name of the opponent. :param game_aspect:
lichess-bot/matchmaking.py:275
↓ 2 callersFunctionthread_logging_configurer
Configure the game logger.
lichess-bot/lichess-bot.py:192
↓ 2 callersMethodtime_until_expiration
How much time is left until it expires.
lichess-bot/timer.py:97
↓ 2 callersMethodto_readable_value
Change a value to a more human-readable format.
lichess-bot/engine_wrapper.py:329
↓ 2 callersFunctionversion_str
(version: list[int])
lichess-bot/lichess-bot.py:1039
↓ 1 callersMethod__str__
Get a string representation of `Challenge`.
lichess-bot/model.py:125
↓ 1 callersMethod__str__
Get a string representation of `Game`.
lichess-bot/model.py:253
↓ 1 callersMethod__str__
Get a string representation of `Player`.
lichess-bot/model.py:274
↓ 1 callersMethodaccept_challenge
Accept a challenge.
lichess-bot/lichess.py:299
↓ 1 callersFunctionaccept_challenges
Accept a challenge.
lichess-bot/lichess-bot.py:427
↓ 1 callersMethodaccepted_challenge
Set the challenge id to an empty string, if the challenge was accepted. Otherwise, we would attempt to cancel the challenge later
lichess-bot/matchmaking.py:285
↓ 1 callersMethodadd_comment
Store the move's comments. :param move: The move. Contains the comments in `move.info`. :param board: The current position.
lichess-bot/engine_wrapper.py:273
↓ 1 callersMethodadd_go_commands
Add extra commands to send to the engine. For example, to search for 1000 nodes or up to depth 10.
lichess-bot/engine_wrapper.py:177
↓ 1 callersMethodapi_get_list
Send a GET to the lichess.org endpoints that return a list containing JSON. :param endpoint_name: The name of the endpoint.
lichess-bot/lichess.py:156
↓ 1 callersMethodcancel
Cancel a challenge.
lichess-bot/lichess.py:358
↓ 1 callersMethodchat
Send a message to the chat. :param game_id: The id of the game. :param room: The room (either chat or spectator room).
lichess-bot/lichess.py:270
↓ 1 callersFunctioncheck_for_draw_offer
Check if the bot was offered a draw.
lichess-bot/engine_wrapper.py:652
↓ 1 callersFunctioncheck_in_on_correspondence_games
Start correspondence games.
lichess-bot/lichess-bot.py:393
↓ 1 callersFunctioncheck_online_status
Check if lichess.org thinks the bot is online or not. If it isn't, we restart it.
lichess-bot/lichess-bot.py:445
↓ 1 callersFunctioncheck_python_version
Raise a warning or an exception if the version isn't supported or is deprecated.
lichess-bot/lichess-bot.py:1029
↓ 1 callersMethodchoose_opponent
Choose an opponent.
lichess-bot/matchmaking.py:149
↓ 1 callersMethodcommand
Reacts to the specific commands in the chat. :param line: Information about the message. :param cmd: The command to react to
lichess-bot/conversation.py:46
↓ 1 callersMethodcomment_for_board_index
Get the engine comments for a specific move. :param index: The move number. :return: The move comments.
lichess-bot/engine_wrapper.py:256
↓ 1 callersMethodcomment_index
Get the index of a move for use in `comment_for_board_index`. :param move_stack_index: The move number. :return: The index o
lichess-bot/engine_wrapper.py:244
↓ 1 callersFunctionconvert_pgn_to_game
(pgn_moves)
generate_pgn_puzzles.py:69
↓ 1 callersFunctionconvert_pgn_to_game
(pgn_moves)
puzzle_solver.py:23
↓ 1 callersMethodcreate_challenge
Create a challenge.
lichess-bot/matchmaking.py:84
↓ 1 callersMethoddecline_challenge
Decline a challenge.
lichess-bot/lichess.py:303
↓ 1 callersMethoddeclined_challenge
Handle a challenge that was declined by the opponent. Depends on whether `FilterType` is `NONE`, `COARSE`, or `FINE`.
lichess-bot/matchmaking.py:294
↓ 1 callersFunctiondownload_lc0
Download Leela Chess Zero 0.29.0.
lichess-bot/test_bot/test_bot.py:48
↓ 1 callersFunctiondownload_sf
Download Stockfish 15.
lichess-bot/test_bot/test_bot.py:29
↓ 1 callersFunctiondownload_sjeng
Download Sjeng.
lichess-bot/test_bot/test_bot.py:60
↓ 1 callersFunctiondtm_to_gaviota_wdl
Convert DTM scores to gaviota WDL scores.
lichess-bot/engine_wrapper.py:1190
↓ 1 callersFunctiondtm_to_wdl
Convert DTM scores to syzygy WDL scores.
lichess-bot/engine_wrapper.py:1195
↓ 1 callersFunctiondtz_to_wdl
Convert DTZ scores to syzygy WDL scores.
lichess-bot/engine_wrapper.py:1128
↓ 1 callersFunctionenough_time_to_queue
Check whether the correspondence must be started now or if it can wait.
lichess-bot/lichess-bot.py:519
↓ 1 callersFunctionfake_think_time
Calculate how much time we should wait for fake_think_time.
lichess-bot/lichess-bot.py:679
next →1–100 of 290, ranked by callers