MCPcopy Create free account

hub / github.com/XR-stb/DQN_WUKONG / functions

Functions227 in github.com/XR-stb/DQN_WUKONG

↓ 45 callersMethoddebug
(self, message, *args)
log.py:48
↓ 28 callersMethodget_status
(self)
window.py:113
↓ 15 callersMethodadd_variable
添加一个新的追踪变量到GUI。 :param var_name: 变量的名称,用于显示和更新 :param var_type: 变量的类型,'float' 或 'bool' :param column: 'left' 或 'righ
utils/display_game_info.py:109
↓ 15 callersFunctionconvert_coordinates
(x1, y1, x2, y2)
window.py:352
↓ 12 callersMethodinfo
(self, message, *args)
log.py:52
↓ 11 callersMethod__init__
(self, sx, sy, ex, ey)
window.py:133
↓ 8 callersMethoderror
(self, message, *args)
log.py:57
↓ 8 callersMethodupdate
(self)
window.py:42
↓ 5 callersMethodstop
停止动作执行器
actions.py:289
↓ 4 callersMethod__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/ppo.py:150
↓ 4 callersMethodget_current_state
获取当前状态
process_handler.py:101
↓ 4 callersMethodinjured_index_penalty
(self, injured, injured_cnt)
judge.py:24
↓ 4 callersMethodprocess_color
(self)
window.py:137
↓ 4 callersMethodset_frame
(frame)
window.py:30
↓ 4 callersMethodtake_action
通过动作名称或索引执行动作,并设置动作完成后的回调
actions.py:302
↓ 4 callersMethodupdate_all
()
window.py:46
↓ 3 callersMethodInput
(self, structure)
keys.py:514
↓ 3 callersMethod_format_message
(self, message, *args)
log.py:62
↓ 3 callersMethodinterrupt_action
打断当前正在执行的动作,并释放所有已按下的按键和鼠标按钮
actions.py:254
↓ 3 callersMethodis_interruptible
判断给定动作是否可以被打断。 参数: action_name (str): 动作名称。 返回: bool: 如果动作可以被打断,返回 True;否则返回 False。
actions.py:337
↓ 3 callersMethodload_model
(self)
models/ppo.py:443
↓ 3 callersMethodsendKey
(self, key, flags)
keys.py:478
↓ 2 callersMethodSendInput
(self, *inputs)
keys.py:506
↓ 2 callersMethod_release_all_pressed
释放所有已按下的按键和鼠标按钮
actions.py:271
↓ 2 callersMethodcheck_similarity
检查窗口区域内是否包含指定图像,并返回相似度。 参数: - template_image_path: 模板图像的路径 - threshold: 相似度阈值,默认为0.8 返回: - 如果相似度超过阈
window.py:64
↓ 2 callersMethodclear_event_queues
清空事件队列
process_handler.py:111
↓ 2 callersMethoddirectMouse
(self, dx = 0, dy = 0, buttons = 0)
keys.py:415
↓ 2 callersMethodforward
Args: state: 形状为 (batch_size, state_dim) 的张量
models/ppo.py:90
↓ 2 callersMethodget_all_status_keys
返回所有状态变量的键名
context.py:90
↓ 2 callersMethodhandle_episode_restart
处理重启逻辑
process_handler.py:222
↓ 2 callersMethodpi
计算动作概率分布
models/ppo.py:105
↓ 2 callersFunctionrestore_window
(window_title)
utils/change_window.py:48
↓ 2 callersFunctionset_window_topleft
()
utils/change_window.py:28
↓ 2 callersFunctiontest_performance
(grab_func, num_frames=100, region=None)
bench/grab_bench.py:66
↓ 2 callersMethodwait_for_finish
阻塞等待直到当前动作执行完成或超时。 timeout: 等待的最长时间(秒),为 None 时表示无限等待。
actions.py:328
↓ 1 callersMethodHardwareInput
(self, message, parameter)
keys.py:532
↓ 1 callersMethodKeyboard
(self, wVk, wScan, dwFlags=0)
keys.py:542
↓ 1 callersMethodMouse
(self, flags, x=0, y=0, data=0)
keys.py:538
↓ 1 callersMethodMouseInput
(self, flags, x, y, data)
keys.py:524
↓ 1 callersMethod__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/ddqn.py:41
↓ 1 callersMethod__init__
(self, action_dim, context_dim)
models/ddqn_resnet.py:13
↓ 1 callersMethod__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/dqn.py:42
↓ 1 callersMethod_calculate_blood_advantage_reward
计算血量优势奖励
judge.py:30
↓ 1 callersMethod_calculate_done_reward
计算对局结束时的奖励
judge.py:37
↓ 1 callersMethod_check_skill_cooldown
检查技能冷却并计算奖励
judge.py:74
↓ 1 callersMethod_delay
延迟一段时间
actions.py:236
↓ 1 callersMethod_flatten_action_sequence
将嵌套的动作序列展平成单一列表
actions.py:81
↓ 1 callersMethod_get_cnn_out_dim
(self)
models/ppo.py:64
↓ 1 callersMethod_handle_action
处理单个动作
actions.py:107
↓ 1 callersMethod_handle_dodge
处理闪避动作的奖励
judge.py:145
↓ 1 callersMethod_handle_drink_potion
处理恢复血量动作的奖励
judge.py:134
↓ 1 callersMethod_handle_emergency_events
处理紧急事件
process_handler.py:150
↓ 1 callersMethod_handle_heavy_attack
处理重击动作的奖励
judge.py:166
↓ 1 callersMethod_handle_light_attacks
处理轻攻击相关动作的奖励
judge.py:180
↓ 1 callersMethod_handle_normal_events
处理普通事件
process_handler.py:186
↓ 1 callersMethod_handle_q_found_event
处理q_found事件
process_handler.py:193
↓ 1 callersMethod_handle_qieshou
处理切手动作的奖励
judge.py:157
↓ 1 callersMethod_handle_skill_3
处理技能3的奖励
judge.py:186
↓ 1 callersMethod_handle_special_actions
处理特殊动作的奖励
judge.py:103
↓ 1 callersMethod_handle_stealth_charge
处理隐身蓄力攻击的奖励
judge.py:197
↓ 1 callersMethod_initialize_agent
初始化Agent
process_handler.py:59
↓ 1 callersMethod_load_config
加载配置文件
process_handler.py:54
↓ 1 callersMethod_move_mouse
在 duration 时间内平滑地移动鼠标,总移动距离为 x_offset 和 y_offset
actions.py:179
↓ 1 callersMethod_move_mouse_absolute
在 duration 时间内平滑地移动鼠标到绝对坐标 (target_x, target_y)
actions.py:208
↓ 1 callersMethod_press_key
按下键盘按键并记录
actions.py:126
↓ 1 callersMethod_press_mouse
按下鼠标按钮并记录
actions.py:148
↓ 1 callersMethod_process_events
处理事件队列的奖励
judge.py:62
↓ 1 callersMethod_release_key
释放键盘按键并从记录中移除
actions.py:137
↓ 1 callersMethod_release_mouse
释放鼠标按钮并从记录中移除
actions.py:163
↓ 1 callersMethod_run_action_sequence
执行一个完整的动作序列
actions.py:95
↓ 1 callersMethod_run_training_episode
运行训练回合
process_handler.py:259
↓ 1 callersMethod_setup_keyboard_listener
设置键盘监听器
process_handler.py:79
↓ 1 callersMethodadd_action
(self, action_sequence, action_finished_callback=None)
actions.py:54
↓ 1 callersMethodadd_reward
在每个 action 后调用,保存累积的奖励值。
tracker.py:26
↓ 1 callersFunctioncalculate_running_average
计算累积平均奖励
train_data/show_reward_avg.py:8
↓ 1 callersFunctioncapture_screen
(region=None)
utils/move_view.py:11
↓ 1 callersFunctioncheck_window_resolution_same
(weight, height)
utils/change_window.py:91
↓ 1 callersMethodchoose_action
选择动作
models/ppo.py:231
↓ 1 callersFunctionclear_console
()
utils/action_tool.py:21
↓ 1 callersMethodcompare_status
比较当前状态和之前状态,生成事件
context.py:148
↓ 1 callersMethodcreate_action_enum
动态生成动作的枚举类型
actions.py:50
↓ 1 callersFunctiondisplay_gui_elements
()
utils/display_game_info.py:42
↓ 1 callersMethodend_episode
每局结束时调用,保存总奖励、Boss血量并重置累积奖励。
tracker.py:30
↓ 1 callersFunctionexecute_action_by_num
(num)
utils/action_tool.py:44
↓ 1 callersMethodextract_region
(self)
window.py:33
↓ 1 callersFunctionfind_game_window_logo
(frame, template_path, threshold)
window.py:290
↓ 1 callersFunctionfind_text_position
(image, text, lang='chi_sim')
utils/move_view.py:34
↓ 1 callersMethodget_action_name
(self, index)
actions.py:299
↓ 1 callersMethodget_action_size
(self)
actions.py:296
↓ 1 callersMethodget_emergency_event_queue
(self)
context.py:281
↓ 1 callersMethodget_features
(self, status)
context.py:260
↓ 1 callersMethodget_features_len
(self)
context.py:278
↓ 1 callersMethodget_frame_and_status
直接从共享内存和 read_index 读取 frame 和 status 信息
context.py:206
↓ 1 callersMethodget_normal_event_queue
(self)
context.py:284
↓ 1 callersFunctionget_window_resolution
(window_title)
utils/change_window.py:75
↓ 1 callersMethodhandle_action_execution
处理动作执行和事件监控
process_handler.py:118
↓ 1 callersFunctioninit_camera
(target_fps=60)
bench/grab_bench.py:45
↓ 1 callersMethodis_color_red
通过中间一行的 H 通道检测是否偏红
window.py:175
↓ 1 callersMethodis_running
检查当前是否有动作在执行
actions.py:324
↓ 1 callersFunctionis_window_active
(window_title)
utils/change_window.py:40
next →1–100 of 227, ranked by callers