MCPcopy Create free account

hub / github.com/LYiHub/liars-bar-llm / functions

Functions69 in github.com/LYiHub/liars-bar-llm

↓ 9 callersMethodget_current_round
获取当前轮次
game_record.py:315
↓ 6 callersMethod_read_file
读取文件内容
player.py:31
↓ 4 callersMethodchat
与LLM交互 Args: messages: 消息列表 model: 使用的LLM模型 Returns: tuple: (content, reasoning_
llm_client.py:13
↓ 4 callersMethodto_dict
(self)
game_record.py:43
↓ 3 callersMethodget_latest_round_actions
获取最新轮次的操作信息
game_record.py:324
↓ 3 callersMethodget_latest_round_info
获取最新轮次基础信息
game_record.py:319
↓ 3 callersMethodprint_status
打印玩家状态
player.py:40
↓ 3 callersMethodrecord_challenge
记录质疑信息
game_record.py:294
↓ 3 callersMethodstart_game
启动游戏主循环
game.py:391
↓ 2 callersMethodauto_save
自动保存当前游戏记录到文件
game_record.py:353
↓ 2 callersMethodcheck_other_players_no_cards
检查是否所有其他存活玩家都没有手牌
game.py:173
↓ 2 callersMethodchoose_target_card
随机选择目标牌
game.py:50
↓ 2 callersMethoddeal_cards
发牌并清空旧手牌
game.py:37
↓ 2 callersMethodfind_next_player_with_cards
返回下一个存活且有手牌的玩家索引
game.py:95
↓ 2 callersMethodget_last_action
获取最后一次出牌记录
game_record.py:105
↓ 2 callersMethodis_valid_play
判断出牌是否符合目标牌规则: 每张牌必须为目标牌或 Joker
game.py:88
↓ 2 callersMethodperform_penalty
执行射击惩罚,并根据结果更新游戏状态和记录 Args: player: 需要执行惩罚的玩家
game.py:104
↓ 2 callersMethodrecord_play
记录玩家的出牌行为
game_record.py:279
↓ 2 callersMethodrecord_shooting
记录射击结果
game_record.py:302
↓ 2 callersMethodreset_round
重置当前小局
game.py:130
↓ 2 callersMethodstart_round_record
开始新的回合,并在 `GameRecord` 里记录信息
game.py:55
↓ 1 callersMethod_create_deck
创建并洗牌牌组
game.py:31
↓ 1 callersMethodadd_play_action
添加出牌记录
game_record.py:101
↓ 1 callersFunctionanalyze_game_records
(folder_path)
game_analyze.py:5
↓ 1 callersMethodcheck_victory
检查胜利条件(仅剩一名存活玩家时),并记录胜利者 Returns: bool: 游戏是否结束
game.py:156
↓ 1 callersMethodchoose_cards_to_play
玩家选择出牌 Args: round_base_info: 轮次基础信息 round_action_info: 轮次操作信息 play_decision_info: 出牌决策信
player.py:57
↓ 1 callersFunctionconvert_game_record_to_chinese_text
将游戏记录转换为中文可读风格文本
json_convert.py:4
↓ 1 callersMethoddecide_challenge
玩家决定是否对上一位玩家的出牌进行质疑 Args: round_base_info: 轮次基础信息 round_action_info: 轮次操作信息 challenge_d
player.py:128
↓ 1 callersFunctionextract_matchups
从游戏数据中提取所有玩家间的详细对决记录 参数: game_data: 完整的游戏数据字典 game_id: 游戏标识符 返回: 包含所有配对对决记录的字典
player_matchup_analyze.py:67
↓ 1 callersMethodfinish_game
记录胜利者并保存最终结果
game_record.py:310
↓ 1 callersFunctionformat_challenge_event
将单次对决事件格式化为可读文本,包含更多细节 参数: history_item: 包含对决信息的字典 round_data: 当前轮次的完整数据 player_states: 所有玩家的初始状态 game_id: 游戏
player_matchup_analyze.py:6
↓ 1 callersFunctiongenerate_game_id
生成包含时间信息的游戏ID
game_record.py:7
↓ 1 callersMethodget_challenge_decision_info
获取最新轮次质疑决策相关信息
game_record.py:347
↓ 1 callersMethodget_latest_play_behavior
获取最新轮次中最新玩家的出牌表现
game_record.py:329
↓ 1 callersMethodget_latest_round_result
获取最新轮次的射击结果
game_record.py:336
↓ 1 callersMethodget_play_decision_info
获取最新轮次出牌决策相关信息
game_record.py:341
↓ 1 callersMethodhandle_challenge
处理玩家质疑环节 Args: current_player: 当前玩家(被质疑者) next_player: 下一个玩家(质疑者) played_cards: 被质疑者打出的牌
game.py:221
↓ 1 callersMethodhandle_play_cards
处理玩家出牌环节 Args: current_player: 当前玩家 next_player: 下一个玩家 Returns: Lis
game.py:180
↓ 1 callersMethodhandle_reflection
处理所有存活玩家的反思过程 在每轮结束时调用,让玩家对其他玩家的行为进行反思和评估
game.py:331
↓ 1 callersMethodhandle_system_challenge
处理系统自动质疑的情况 当其他所有存活玩家都没有手牌时,系统自动对当前玩家进行质疑 Args: current_player: 当前玩家(最后一个有手牌的玩家)
game.py:283
↓ 1 callersMethodinit_opinions
初始化对其他玩家的看法 Args: other_players: 其他玩家列表
player.py:45
↓ 1 callersFunctionparse_arguments
解析命令行参数
multi_game_runner.py:27
↓ 1 callersMethodplay_round
执行一轮游戏逻辑
game.py:360
↓ 1 callersFunctionprint_statistics
(stats, win_rates, game_count, player_names)
game_analyze.py:121
↓ 1 callersFunctionprocess_all_json_files
处理指定文件夹中的所有JSON文件,并合并相同玩家对的对决记录 参数: input_dir: 输入文件夹路径(包含JSON文件) output_dir: 输出文件夹路径
player_matchup_analyze.py:135
↓ 1 callersFunctionprocess_game_records
处理目录中的所有游戏记录 JSON 文件,生成可读风格的 TXT 文件到指定输出目录
json_convert.py:107
↓ 1 callersMethodprocess_penalty
处理惩罚
player.py:245
↓ 1 callersMethodreflect
玩家在轮次结束后对其他存活玩家进行反思,更新对他们的印象 Args: alive_players: 还存活的玩家名称列表 round_base_info: 轮次基础信息 rou
player.py:194
↓ 1 callersMethodrun_games
运行指定数量的游戏
multi_game_runner.py:16
↓ 1 callersFunctionsave_matchups_to_files
将所有游戏的对决记录合并保存到单独的文件中 参数: all_matchups: 包含所有游戏所有配对对决记录的字典 output_dir: 输出文件夹路径
player_matchup_analyze.py:112
↓ 1 callersMethodset_shooting_result
设置射击结果
game_record.py:109
↓ 1 callersMethodstart_round
开始新的一轮游戏
game_record.py:267
↓ 1 callersMethodto_dict
(self)
game_record.py:255
↓ 1 callersMethodupdate_challenge
更新质疑信息
game_record.py:58
Method__init__
初始化玩家 Args: name: 玩家名称 model_name: 使用的LLM模型名称
player.py:13
Method__init__
初始化LLM客户端
llm_client.py:6
Method__init__
(self)
game_record.py:244
Method__init__
初始化多局游戏运行器 Args: player_configs: 玩家配置列表 num_games: 要运行的游戏局数
multi_game_runner.py:6
Method__init__
初始化游戏 Args: player_configs: 包含玩家配置的列表,每个配置是一个字典,包含 name 和 model 字段
game.py:7
Methodget_challenge_decision_info
获取当前轮次质疑决策相关信息 Args: self_player: 当前玩家 interacting_player: 上家玩家 Returns: str: 包含双方枪状态和当前玩
game_record.py:224
Methodget_latest_play_behavior
获取最新玩家的出牌表现 Returns: str: 格式化的出牌行为描述
game_record.py:166
Methodget_latest_round_actions
输入当前玩家,返回该轮次的操作信息 Args: current_player (str): 当前玩家名称 include_latest (bool): 是否包含最新一次操作,默认为 True
game_record.py:120
Methodget_latest_round_info
返回最新轮次的基础信息
game_record.py:113
Methodget_latest_round_result
返回最新的射击结果 Args: current_player (str): 当前玩家名称 Returns: str: 格式化的射击结果文本
game_record.py:184
Methodget_play_decision_info
获取当前轮次出牌决策相关信息 Args: self_player: 当前玩家 interacting_player: 下家玩家 Returns: str: 包含双方枪状态和当前玩
game_record.py:207
Methodstart_game
初始化游戏,记录玩家信息
game_record.py:263
Methodto_dict
(self)
game_record.py:20
Methodto_dict
(self)
game_record.py:71
Methodto_dict
(self)
game_record.py:89