Path of Exile Deep-Learning AI 项目教程
poeai Path of Exile Deep-Learning AI 项目地址: https://gitcode.com/gh_mirrors/po/poeai
1. 项目目录结构及介绍
nogilnick/poeai/
├── TFModel/
│ └── (预训练的TensorFlow模型)
├── Bot.py
├── BotDebugger.py
├── Const.py
├── LICENSE
├── Main.py
├── MovementMap.py
├── ProjMap.py
├── README.md
├── ScreenViewer.py
└── TargetingSystem.py
目录结构介绍
- TFModel/: 包含预训练的TensorFlow模型文件。
- Bot.py: 包含主机器人循环的类。
- BotDebugger.py: 用于调试主程序的类。
- Const.py: 包含常量定义的文件。
- LICENSE: 项目的MIT许可证文件。
- Main.py: 程序的入口点。
- MovementMap.py: 维护机器人内部世界表示的类,包含一个将3D位置映射到标签(如开放、障碍、物品等)的字典。
- ProjMap.py: 处理基于Path of Exile的投影矩阵从3D到2D坐标转换的类。
- README.md: 项目的README文件,包含项目的基本信息和使用说明。
- ScreenViewer.py: 使用Windows API从屏幕抓取图像数据的代码。
- TargetingSystem.py: 用于分类游戏图像数据的类,用于识别障碍、敌人、物品和闪电传送(用于移动)。
2. 项目启动文件介绍
Main.py
Main.py
是项目的启动文件,负责初始化和启动整个机器人系统。它包含了程序的主入口点,调用其他模块来实现机器人的功能。
# Main.py
from Bot import Bot
from BotDebugger import BotDebugger
from MovementMap import MovementMap
from ProjMap import ProjMap
from ScreenViewer import ScreenViewer
from TargetingSystem import TargetingSystem
def main():
# 初始化各个模块
bot = Bot()
bot_debugger = BotDebugger()
movement_map = MovementMap()
proj_map = ProjMap()
screen_viewer = ScreenViewer()
targeting_system = TargetingSystem()
# 启动机器人循环
bot.run()
if __name__ == "__main__":
main()
3. 项目的配置文件介绍
Const.py
Const.py
文件包含了项目的常量定义,这些常量用于配置机器人的行为和参数。
# Const.py
# 游戏窗口的分辨率
GAME_WINDOW_WIDTH = 1920
GAME_WINDOW_HEIGHT = 1080
# 机器人移动速度
MOVEMENT_SPEED = 5
# 其他常量定义...
通过修改 Const.py
文件中的常量,可以调整机器人的行为和性能。
以上是基于 nogilnick/poeai
项目的教程,涵盖了项目的目录结构、启动文件和配置文件的介绍。希望这些内容能帮助你更好地理解和使用该项目。
poeai Path of Exile Deep-Learning AI 项目地址: https://gitcode.com/gh_mirrors/po/poeai