Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XR-stb/DQN_WUKONG
/ functions
Functions
227 in github.com/XR-stb/DQN_WUKONG
⨍
Functions
227
◇
Types & classes
40
↓ 45 callers
Method
debug
(self, message, *args)
log.py:48
↓ 28 callers
Method
get_status
(self)
window.py:113
↓ 15 callers
Method
add_variable
添加一个新的追踪变量到GUI。 :param var_name: 变量的名称,用于显示和更新 :param var_type: 变量的类型,'float' 或 'bool' :param column: 'left' 或 'righ
utils/display_game_info.py:109
↓ 15 callers
Function
convert_coordinates
(x1, y1, x2, y2)
window.py:352
↓ 12 callers
Method
info
(self, message, *args)
log.py:52
↓ 11 callers
Method
__init__
(self, sx, sy, ex, ey)
window.py:133
↓ 8 callers
Method
error
(self, message, *args)
log.py:57
↓ 8 callers
Method
update
(self)
window.py:42
↓ 5 callers
Method
stop
停止动作执行器
actions.py:289
↓ 4 callers
Method
__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/ppo.py:150
↓ 4 callers
Method
get_current_state
获取当前状态
process_handler.py:101
↓ 4 callers
Method
injured_index_penalty
(self, injured, injured_cnt)
judge.py:24
↓ 4 callers
Method
process_color
(self)
window.py:137
↓ 4 callers
Method
set_frame
(frame)
window.py:30
↓ 4 callers
Method
take_action
通过动作名称或索引执行动作,并设置动作完成后的回调
actions.py:302
↓ 4 callers
Method
update_all
()
window.py:46
↓ 3 callers
Method
Input
(self, structure)
keys.py:514
↓ 3 callers
Method
_format_message
(self, message, *args)
log.py:62
↓ 3 callers
Method
interrupt_action
打断当前正在执行的动作,并释放所有已按下的按键和鼠标按钮
actions.py:254
↓ 3 callers
Method
is_interruptible
判断给定动作是否可以被打断。 参数: action_name (str): 动作名称。 返回: bool: 如果动作可以被打断,返回 True;否则返回 False。
actions.py:337
↓ 3 callers
Method
load_model
(self)
models/ppo.py:443
↓ 3 callers
Method
sendKey
(self, key, flags)
keys.py:478
↓ 2 callers
Method
SendInput
(self, *inputs)
keys.py:506
↓ 2 callers
Method
_release_all_pressed
释放所有已按下的按键和鼠标按钮
actions.py:271
↓ 2 callers
Method
check_similarity
检查窗口区域内是否包含指定图像,并返回相似度。 参数: - template_image_path: 模板图像的路径 - threshold: 相似度阈值,默认为0.8 返回: - 如果相似度超过阈
window.py:64
↓ 2 callers
Method
clear_event_queues
清空事件队列
process_handler.py:111
↓ 2 callers
Method
directMouse
(self, dx = 0, dy = 0, buttons = 0)
keys.py:415
↓ 2 callers
Method
forward
Args: state: 形状为 (batch_size, state_dim) 的张量
models/ppo.py:90
↓ 2 callers
Method
get_all_status_keys
返回所有状态变量的键名
context.py:90
↓ 2 callers
Method
handle_episode_restart
处理重启逻辑
process_handler.py:222
↓ 2 callers
Method
pi
计算动作概率分布
models/ppo.py:105
↓ 2 callers
Function
restore_window
(window_title)
utils/change_window.py:48
↓ 2 callers
Function
set_window_topleft
()
utils/change_window.py:28
↓ 2 callers
Function
test_performance
(grab_func, num_frames=100, region=None)
bench/grab_bench.py:66
↓ 2 callers
Method
wait_for_finish
阻塞等待直到当前动作执行完成或超时。 timeout: 等待的最长时间(秒),为 None 时表示无限等待。
actions.py:328
↓ 1 callers
Method
HardwareInput
(self, message, parameter)
keys.py:532
↓ 1 callers
Method
Keyboard
(self, wVk, wScan, dwFlags=0)
keys.py:542
↓ 1 callers
Method
Mouse
(self, flags, x=0, y=0, data=0)
keys.py:538
↓ 1 callers
Method
MouseInput
(self, flags, x, y, data)
keys.py:524
↓ 1 callers
Method
__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/ddqn.py:41
↓ 1 callers
Method
__init__
(self, action_dim, context_dim)
models/ddqn_resnet.py:13
↓ 1 callers
Method
__init__
(self, state_dim, action_dim, context_dim, config, model_file)
models/dqn.py:42
↓ 1 callers
Method
_calculate_blood_advantage_reward
计算血量优势奖励
judge.py:30
↓ 1 callers
Method
_calculate_done_reward
计算对局结束时的奖励
judge.py:37
↓ 1 callers
Method
_check_skill_cooldown
检查技能冷却并计算奖励
judge.py:74
↓ 1 callers
Method
_delay
延迟一段时间
actions.py:236
↓ 1 callers
Method
_flatten_action_sequence
将嵌套的动作序列展平成单一列表
actions.py:81
↓ 1 callers
Method
_get_cnn_out_dim
(self)
models/ppo.py:64
↓ 1 callers
Method
_handle_action
处理单个动作
actions.py:107
↓ 1 callers
Method
_handle_dodge
处理闪避动作的奖励
judge.py:145
↓ 1 callers
Method
_handle_drink_potion
处理恢复血量动作的奖励
judge.py:134
↓ 1 callers
Method
_handle_emergency_events
处理紧急事件
process_handler.py:150
↓ 1 callers
Method
_handle_heavy_attack
处理重击动作的奖励
judge.py:166
↓ 1 callers
Method
_handle_light_attacks
处理轻攻击相关动作的奖励
judge.py:180
↓ 1 callers
Method
_handle_normal_events
处理普通事件
process_handler.py:186
↓ 1 callers
Method
_handle_q_found_event
处理q_found事件
process_handler.py:193
↓ 1 callers
Method
_handle_qieshou
处理切手动作的奖励
judge.py:157
↓ 1 callers
Method
_handle_skill_3
处理技能3的奖励
judge.py:186
↓ 1 callers
Method
_handle_special_actions
处理特殊动作的奖励
judge.py:103
↓ 1 callers
Method
_handle_stealth_charge
处理隐身蓄力攻击的奖励
judge.py:197
↓ 1 callers
Method
_initialize_agent
初始化Agent
process_handler.py:59
↓ 1 callers
Method
_load_config
加载配置文件
process_handler.py:54
↓ 1 callers
Method
_move_mouse
在 duration 时间内平滑地移动鼠标,总移动距离为 x_offset 和 y_offset
actions.py:179
↓ 1 callers
Method
_move_mouse_absolute
在 duration 时间内平滑地移动鼠标到绝对坐标 (target_x, target_y)
actions.py:208
↓ 1 callers
Method
_press_key
按下键盘按键并记录
actions.py:126
↓ 1 callers
Method
_press_mouse
按下鼠标按钮并记录
actions.py:148
↓ 1 callers
Method
_process_events
处理事件队列的奖励
judge.py:62
↓ 1 callers
Method
_release_key
释放键盘按键并从记录中移除
actions.py:137
↓ 1 callers
Method
_release_mouse
释放鼠标按钮并从记录中移除
actions.py:163
↓ 1 callers
Method
_run_action_sequence
执行一个完整的动作序列
actions.py:95
↓ 1 callers
Method
_run_training_episode
运行训练回合
process_handler.py:259
↓ 1 callers
Method
_setup_keyboard_listener
设置键盘监听器
process_handler.py:79
↓ 1 callers
Method
add_action
(self, action_sequence, action_finished_callback=None)
actions.py:54
↓ 1 callers
Method
add_reward
在每个 action 后调用,保存累积的奖励值。
tracker.py:26
↓ 1 callers
Function
calculate_running_average
计算累积平均奖励
train_data/show_reward_avg.py:8
↓ 1 callers
Function
capture_screen
(region=None)
utils/move_view.py:11
↓ 1 callers
Function
check_window_resolution_same
(weight, height)
utils/change_window.py:91
↓ 1 callers
Method
choose_action
选择动作
models/ppo.py:231
↓ 1 callers
Function
clear_console
()
utils/action_tool.py:21
↓ 1 callers
Method
compare_status
比较当前状态和之前状态,生成事件
context.py:148
↓ 1 callers
Method
create_action_enum
动态生成动作的枚举类型
actions.py:50
↓ 1 callers
Function
display_gui_elements
()
utils/display_game_info.py:42
↓ 1 callers
Method
end_episode
每局结束时调用,保存总奖励、Boss血量并重置累积奖励。
tracker.py:30
↓ 1 callers
Function
execute_action_by_num
(num)
utils/action_tool.py:44
↓ 1 callers
Method
extract_region
(self)
window.py:33
↓ 1 callers
Function
find_game_window_logo
(frame, template_path, threshold)
window.py:290
↓ 1 callers
Function
find_text_position
(image, text, lang='chi_sim')
utils/move_view.py:34
↓ 1 callers
Method
get_action_name
(self, index)
actions.py:299
↓ 1 callers
Method
get_action_size
(self)
actions.py:296
↓ 1 callers
Method
get_emergency_event_queue
(self)
context.py:281
↓ 1 callers
Method
get_features
(self, status)
context.py:260
↓ 1 callers
Method
get_features_len
(self)
context.py:278
↓ 1 callers
Method
get_frame_and_status
直接从共享内存和 read_index 读取 frame 和 status 信息
context.py:206
↓ 1 callers
Method
get_normal_event_queue
(self)
context.py:284
↓ 1 callers
Function
get_window_resolution
(window_title)
utils/change_window.py:75
↓ 1 callers
Method
handle_action_execution
处理动作执行和事件监控
process_handler.py:118
↓ 1 callers
Function
init_camera
(target_fps=60)
bench/grab_bench.py:45
↓ 1 callers
Method
is_color_red
通过中间一行的 H 通道检测是否偏红
window.py:175
↓ 1 callers
Method
is_running
检查当前是否有动作在执行
actions.py:324
↓ 1 callers
Function
is_window_active
(window_title)
utils/change_window.py:40
next →
1–100 of 227, ranked by callers