[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-glample--Arnold":3,"tool-glample--Arnold":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",151918,2,"2026-04-12T11:33:05",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":80,"difficulty_score":94,"env_os":95,"env_gpu":96,"env_ram":97,"env_deps":98,"category_tags":106,"github_topics":108,"view_count":32,"oss_zip_url":80,"oss_zip_packed_at":80,"status":17,"created_at":117,"updated_at":118,"faqs":119,"releases":150},6974,"glample\u002FArnold","Arnold","Arnold - DOOM Agent","Arnold 是一个基于 PyTorch 开发的开源项目，旨在复现并扩展曾在 2017 年 ViZDoom AI 竞赛中夺冠的第一人称射击游戏智能体。它让计算机学会在经典的《毁灭战士》（DOOM）环境中自主观察、决策并执行移动、瞄准和攻击等复杂操作，是研究深度强化学习在视觉感知与动作控制结合领域的经典范例。\n\n对于希望深入探索游戏 AI 或强化学习算法的研究人员和开发者而言，Arnold 提供了极佳的实践平台。它不仅包含了完整的训练源代码和 17 张精选地图，还直接提供了 5 个预训练模型，用户无需从头训练即可直观体验或与这些高水平 AI 对战。\n\nArnold 的技术亮点在于其灵活的可配置性。用户可以通过调整屏幕分辨率、是否使用灰度图像、历史帧数量等参数来改变输入状态，同时支持 DQN 与 DRQN（循环神经网络）等多种网络架构切换。此外，它还允许自定义智能体的动作组合（如移动、转身、攻击的组合策略）及辅助任务预测，非常适合用于验证不同强化学习策略在复杂动态环境中的有效性。无论是用于学术实验还是算法教学，Arnold 都是一个功能完备且易于上手的工具。","# Arnold\n\nArnold is a PyTorch implementation of the agent presented in *Playing FPS Games with Deep Reinforcement Learning* (https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.05521), and that won the 2017 edition of the [*ViZDoom AI Competition*](http:\u002F\u002Fvizdoom.cs.put.edu.pl\u002Fcompetition-cig-2017).\n\n![example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fglample_Arnold_readme_ae3ef39ada37.gif) \n\n### This repository contains:\n- The source code to train DOOM agents\n- A package with 17 selected maps that can be used for training and evaluation\n- 5 pretrained models that you can visualize and play against, including the ones that won the ViZDoom competition\n\n\n## Installation\n\n#### Dependencies\nArnold was tested successfully on Mac OS and Linux distributions. You will need:\n- Python 2\u002F3 with NumPy and OpenCV\n- PyTorch\n- ViZDoom\n\nFollow the instructions on https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom to install ViZDoom. Be sure that you can run `import vizdoom` in Python from any directory. To do so, you can either install the library with `pip`, or compile it, then move it to the `site-packages` directory of your Python installation, as explained here: https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom\u002Fblob\u002Fmaster\u002Fdoc\u002FQuickstart.md.\n\n\n## Code structure\n\n    .\n    ├── pretrained                    # Examples of pretrained models\n    ├── resources\n        ├── freedoom2.wad             # DOOM resources file (containing all textures)\n        └── scenarios                 # Folder containing all scenarios\n            ├── full_deathmatch.wad   # Scenario containing all deathmatch maps\n            ├── health_gathering.wad  # Simple test scenario\n            └── ...\n    ├── src                           # Source files\n        ├── doom                      # Game interaction \u002F API \u002F scenarios\n        ├── model                     # DQN \u002F DRQN implementations\n        └── trainer                   # Folder containing training scripts\n    ├── arnold.py                     # Main file\n    └── README.md\n\n\n## Scenarios \u002F Maps\n\n## Train a model\n\nThere are many parameters you can tune to train a model.\n\n\n```bash\npython arnold.py\n\n## General parameters about the game\n--freedoom \"true\"                # use freedoom resources\n--height 60                      # screen height\n--width 108                      # screen width\n--gray \"false\"                   # use grayscale screen\n--use_screen_buffer \"true\"       # use the screen buffer (what the player sees)\n--use_depth_buffer \"false\"       # use the depth buffer\n--labels_mapping \"\"              # use extra feature maps for specific objects\n--game_features \"target,enemy\"   # game features prediction (auxiliary tasks)\n--render_hud \"false\"             # render the HUD (status bar in the bottom of the screen)\n--render_crosshair \"true\"        # render crosshair (targeting aid in the center of the screen)\n--render_weapon \"true\"           # render weapon\n--hist_size 4                    # history size\n--frame_skip 4                   # frame skip (1 = keep every frame)\n\n## Agent allowed actions\n--action_combinations \"attack+move_lr;turn_lr;move_fb\"  # agent allowed actions\n--freelook \"false\"               # allow the agent to look up and down\n--speed \"on\"                     # make the agent run\n--crouch \"off\"                   # make the agent crouch\n\n## Training parameters\n--batch_size 32                  # batch size\n--replay_memory_size 1000000     # maximum number of frames in the replay memory\n--start_decay 0                  # epsilon decay iteration start\n--stop_decay 1000000             # epsilon decay iteration end\n--final_decay 0.1                # final epsilon value\n--gamma 0.99                     # discount factor gamma\n--dueling_network \"false\"        # use a dueling architecture\n--clip_delta 1.0                 # clip the delta loss\n--update_frequency 4             # DQN update frequency\n--dropout 0.5                    # dropout on CNN output layer\n--optimizer \"rmsprop,lr=0.0002\"  # network optimizer\n\n## Network architecture\n--network_type \"dqn_rnn\"         # network type (dqn_ff \u002F dqn_rnn)\n--recurrence \"lstm\"              # recurrent network type (rnn \u002F gru \u002F lstm)\n--n_rec_layers 1                 # number of layers in the recurrent network\n--n_rec_updates 5                # number of updates by sample\n--remember 1                     # remember all frames during evaluation\n--use_bn \"off\"                   # use BatchNorm when processing the screen\n--variable_dim \"32\"              # game variables embeddings dimension\n--bucket_size \"[10, 1]\"          # bucket game variables (typically health \u002F ammo)\n--hidden_dim 512                 # hidden layers dimension\n\n## Scenario parameters (these parameters will differ based on the scenario)\n--scenario \"deathmatch\"          # scenario\n--wad \"full_deathmatch\"          # WAD file (scenario file)\n--map_ids_train \"2,3,4,5\"        # maps to train the model\n--map_ids_test \"6,7,8\"           # maps to test the model\n--n_bots 8                       # number of enemy bots\n--randomize_textures \"true\"      # randomize walls \u002F floors \u002F ceils textures during training\n--init_bots_health 20            # reduce initial life of enemy bots (helps a lot when using pistol)\n\n## Various\n--exp_name new_train             # experiment name\n--dump_freq 200000               # periodically dump the model\n--gpu_id -1                      # GPU ID (-1 to run on CPU)\n```\n\nOnce your agent is trained, you can visualize it by running the same command, and using the following extra arguments:\n```bash\n--visualize 1                    # visualize the model (render the screen)\n--evaluate 1                     # evaluate the agent\n--manual_control 1               # manually make the agent turn about when it gets stuck\n--reload PATH                    # path where the trained agent was saved\n```\n\n\nHere are some examples of training commands for 3 different scenarios:\n\n#### Defend the center\n\nIn this scenario the agent is in the middle of a circular map. Monsters are regularly appearing on the sides and are walking towards the agent. The agent is given a pistol and limited ammo, and must turn around and kill the monsters before they reach it. The following command trains a standard DQN, that should reach the optimal performance of 56 frags (the number of bullets in the pistol) in about 4 million steps:\n\n```bash\npython arnold.py --scenario defend_the_center --action_combinations \"turn_lr+attack\" --frame_skip 2\n```\n\n#### Health gathering\n\nIn this scenario the agent is walking on lava, and is losing health points at each time step. The agent has to move and collect as many health pack as possible in order to survive. The objective is to survive the longest possible time.\n\n```bash\npython arnold.py --scenario health_gathering --action_combinations \"move_fb;turn_lr\" --frame_skip 5\n```\n\nThis scenario is very easy and the model quickly reaches the maximum survival time of 2 minutes (35 * 120 = 4200 frames). The scenario also provides a `supreme` mode, in which the map is more complicated and where the health packs are much harder to collect:\n\n```bash\npython arnold.py --scenario health_gathering --action_combinations \"move_fb;turn_lr\" --frame_skip 5 --supreme 1\n```\n\nIn this scenario, the agent takes about 1.5 million steps to reach the maximum survival time (but often dies before the end).\n\n#### Deathmatch\n\nIn this scenario, the agent is trained to fight against the built-in bots of the game. Here is a command to train the agent using game features prediction (as described in [1]), and a DRQN:\n\n```bash\npython arnold.py --scenario deathmatch --wad deathmatch_rockets --n_bots 8 \\\n--action_combinations \"move_fb;move_lr;turn_lr;attack\" --frame_skip 4 \\\n--game_features \"enemy\" --network_type dqn_rnn --recurrence lstm --n_rec_updates 5\n```\n\n\n## Pretrained models\n\n#### Defend the center \u002F Health gathering\n\nWe provide a pretrained model for each of these scenarios. You can visualize them by running:\n\n```bash\n.\u002Frun.sh defend_the_center\n```\n\nor\n\n```bash\n.\u002Frun.sh health_gathering\n```\n\n#### Visual Doom AI Competition 2017\n\nWe release the two agents submitted to the first and second tracks of the ViZDoom AI 2017 Competition. You can visualize them playing against the built-in bots using the following commands:\n\n##### Track 1 - Arnold vs 10 built-in AI bots\n```bash\n.\u002Frun.sh track1 --n_bots 10\n```\n\n##### Track 2 - Arnold vs 10 built-in AI bots - Map 2\n```bash\n.\u002Frun.sh track2 --n_bots 10 --map_id 2\n```\n\n##### Track 2 - 4 Arnold playing against each other - Map 3\n```bash\n.\u002Frun.sh track2 --n_bots 0 --map_id 3 --n_agents 4\n```\n\nWe also trained an agent on a single map, using a same weapon (the SuperShotgun). This agent is extremely difficult to beat.\n\n##### Shotgun - 4 Arnold playing against each other\n```bash\n.\u002Frun.sh shotgun --n_bots 0 --n_agents 4\n```\n\n##### Shotgun - 3 Arnold playing against each other + 1 human player (to play against the agent)\n```bash\n.\u002Frun.sh shotgun --n_bots 0 --n_agents 3 --human_player 1\n```\n\n\n## References\n\nIf you found this code useful, please consider citing:\n\n[1] G. Lample\\* and D.S. Chaplot\\*, [*Playing FPS Games with Deep Reinforcement Learning*](https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.05521)\n```\n@inproceedings{lample2017playing,\n  title={Playing FPS Games with Deep Reinforcement Learning.},\n  author={Lample, Guillaume and Chaplot, Devendra Singh},\n  booktitle={Proceedings of AAAI},\n  year={2017}\n}\n```\n\n\n[2] D.S. Chaplot\\* and G. Lample\\*, [*Arnold: An Autonomous Agent to Play FPS Games*](http:\u002F\u002Fwww.cs.cmu.edu\u002F~dchaplot\u002Fpapers\u002Farnold_aaai17.pdf)\n```\n@inproceedings{chaplot2017arnold,\n  title={Arnold: An Autonomous Agent to Play FPS Games.},\n  author={Chaplot, Devendra Singh and Lample, Guillaume},\n  booktitle={Proceedings of AAAI},\n  year={2017},\n  Note={Best Demo award}\n}\n```\n\n## Acknowledgements\nWe acknowledge the developers of [*ViZDoom*](http:\u002F\u002Fvizdoom.cs.put.edu.pl\u002F) for constant help and support during the development of this project. Some of the maps and wad files have been borrowed from the ViZDoom [*git repository*](https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom). We also thank the members of the [*ZDoom*](https:\u002F\u002Fforum.zdoom.org\u002F) community for their help with the Action Code Scripts (ACS).\n","# Arnold\n\nArnold 是《使用深度强化学习玩 FPS 游戏》（https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.05521）中提出的智能体的 PyTorch 实现，该智能体在 2017 年的 [*ViZDoom AI 竞赛*](http:\u002F\u002Fvizdoom.cs.put.edu.pl\u002Fcompetition-cig-2017) 中获胜。\n\n![example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fglample_Arnold_readme_ae3ef39ada37.gif) \n\n### 本仓库包含：\n- 训练 DOOM 智能体的源代码\n- 包含 17 张精选地图的软件包，可用于训练和评估\n- 5 个预训练模型，你可以对其进行可视化并与其对战，其中包括在 ViZDoom 竞赛中获胜的模型\n\n\n## 安装\n\n#### 依赖项\nArnold 已在 Mac OS 和 Linux 发行版上成功测试。你需要：\n- Python 2\u002F3，以及 NumPy 和 OpenCV\n- PyTorch\n- ViZDoom\n\n请按照 https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom 上的说明安装 ViZDoom。确保你可以在任何目录下通过 Python 运行 `import vizdoom`。为此，你可以使用 `pip` 安装该库，或者先编译它，再将其移动到你的 Python 安装的 `site-packages` 目录中，具体方法请参阅：https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom\u002Fblob\u002Fmaster\u002Fdoc\u002FQuickstart.md.\n\n\n## 代码结构\n\n    .\n    ├── pretrained                    # 预训练模型示例\n    ├── resources\n        ├── freedoom2.wad             # DOOM 资源文件（包含所有纹理）\n        └── scenarios                 # 包含所有场景的文件夹\n            ├── full_deathmatch.wad   # 包含所有死斗地图的场景\n            ├── health_gathering.wad  # 简单的测试场景\n            └── ...\n    ├── src                           # 源文件\n        ├── doom                      # 游戏交互 \u002F API \u002F 场景\n        ├── model                     # DQN \u002F DRQN 实现\n        └── trainer                   # 包含训练脚本的文件夹\n    ├── arnold.py                     # 主文件\n    └── README.md\n\n\n## 场景 \u002F 地图\n\n## 训练模型\n\n有许多参数可以调整来训练模型。\n\n\n```bash\npython arnold.py\n\n## 游戏相关通用参数\n--freedoom \"true\"                # 使用 freedoom 资源\n--height 60                      # 屏幕高度\n--width 108                      # 屏幕宽度\n--gray \"false\"                   # 使用灰度屏幕\n--use_screen_buffer \"true\"       # 使用屏幕缓冲区（玩家所见内容）\n--use_depth_buffer \"false\"       # 使用深度缓冲区\n--labels_mapping \"\"              # 对特定物体使用额外特征图\n--game_features \"target,enemy\"   # 预测游戏特征（辅助任务）\n--render_hud \"false\"             # 不渲染 HUD（屏幕底部的状态栏）\n--render_crosshair \"true\"        # 渲染十字准星（屏幕中心的瞄准辅助）\n--render_weapon \"true\"           # 渲染武器\n--hist_size 4                    # 历史帧数\n--frame_skip 4                   # 帧跳过（1 = 保留每一帧）\n\n## 智能体可执行的动作\n--action_combinations \"attack+move_lr;turn_lr;move_fb\"  # 智能体可执行的动作\n--freelook \"false\"               # 允许智能体上下视角\n--speed \"on\"                     # 使智能体奔跑\n--crouch \"off\"                   # 使智能体蹲下\n\n## 训练参数\n--batch_size 32                  # 批量大小\n--replay_memory_size 1000000     # 经验回放缓存的最大容量\n--start_decay 0                  # ε-贪心策略衰减的起始迭代\n--stop_decay 1000000             # ε-贪心策略衰减的结束迭代\n--final_decay 0.1                # 最终的 ε 值\n--gamma 0.99                     # 折扣因子 γ\n--dueling_network \"false\"        # 使用 Dueling 架构\n--clip_delta 1.0                 # 截断损失值\n--update_frequency 4             # DQN 更新频率\n--dropout 0.5                    # CNN 输出层的 Dropout\n--optimizer \"rmsprop,lr=0.0002\"  # 网络优化器\n\n## 网络架构\n--network_type \"dqn_rnn\"         # 网络类型（dqn_ff \u002F dqn_rnn）\n--recurrence \"lstm\"              # 循环网络类型（rnn \u002F gru \u002F lstm）\n--n_rec_layers 1                 # 循环网络的层数\n--n_rec_updates 5                # 每个样本的更新次数\n--remember 1                     # 在评估时记住所有帧\n--use_bn \"off\"                   # 处理屏幕时使用 BatchNorm\n--variable_dim \"32\"              # 游戏变量嵌入维度\n--bucket_size \"[10, 1]\"          # 将游戏变量分桶（通常为生命值\u002F弹药）\n--hidden_dim 512                 # 隐藏层维度\n\n## 场景参数（这些参数会因场景而异）\n--scenario \"deathmatch\"          # 场景\n--wad \"full_deathmatch\"          # WAD 文件（场景文件）\n--map_ids_train \"2,3,4,5\"        # 用于训练模型的地图\n--map_ids_test \"6,7,8\"           # 用于测试模型的地图\n--n_bots 8                       # 敌方机器人数量\n--randomize_textures \"true\"      # 训练时随机化墙壁\u002F地板\u002F天花板的纹理\n--init_bots_health 20            # 降低敌方机器人的初始生命值（使用手枪时非常有帮助）\n\n## 各种选项\n--exp_name new_train             # 实验名称\n--dump_freq 200000               # 定期保存模型\n--gpu_id -1                      # GPU ID（-1 表示在 CPU 上运行）\n```\n\n当您的智能体训练完成后，可以通过运行相同的命令，并添加以下额外参数来对其进行可视化：\n```bash\n--visualize 1                    # 可视化模型（渲染屏幕）\n--evaluate 1                     # 对智能体进行评估\n--manual_control 1               # 当智能体陷入困境时，手动控制其转向\n--reload PATH                    # 训练好的智能体保存路径\n```\n\n\n以下是针对三种不同场景的训练命令示例：\n\n#### 守护中心\n\n在这个场景中，智能体位于圆形地图的中央。怪物会定期从两侧出现，并向智能体移动。智能体配备一把手枪和有限的弹药，必须及时转身并击杀靠近的怪物。以下命令将训练一个标准的 DQN 模型，该模型应在约 400 万步内达到最优表现，即击杀 56 个怪物（与手枪弹夹容量相同）：\n\n```bash\npython arnold.py --scenario defend_the_center --action_combinations \"turn_lr+attack\" --frame_skip 2\n```\n\n#### 补给收集\n\n在这个场景中，智能体行走在熔岩之上，每一步都会损失生命值。智能体需要不断移动并尽可能多地收集补给包以维持生存。目标是尽可能延长存活时间。\n\n```bash\npython arnold.py --scenario health_gathering --action_combinations \"move_fb;turn_lr\" --frame_skip 5\n```\n\n此场景非常简单，模型很快就能达到最长存活时间——2 分钟（35 * 120 = 4200 帧）。此外，该场景还提供了一个“至尊”模式，地图更加复杂，补给包也更难收集：\n\n```bash\npython arnold.py --scenario health_gathering --action_combinations \"move_fb;turn_lr\" --frame_skip 5 --supreme 1\n```\n\n在这一模式下，智能体大约需要 150 万步才能达到最长存活时间（但通常会在结束前死亡）。\n\n#### 死斗模式\n\n在此场景中，智能体被训练为与游戏内置的机器人对战。以下是一个使用游戏特征预测（如文献 [1] 所述）和 DRQN 网络训练智能体的命令：\n\n```bash\npython arnold.py --scenario deathmatch --wad deathmatch_rockets --n_bots 8 \\\n--action_combinations \"move_fb;move_lr;turn_lr;attack\" --frame_skip 4 \\\n--game_features \"enemy\" --network_type dqn_rnn --recurrence lstm --n_rec_updates 5\n```\n\n\n## 预训练模型\n\n#### 守护中心 \u002F 补给收集\n\n我们为这两个场景分别提供了预训练模型。您可以通过以下命令进行可视化：\n\n```bash\n.\u002Frun.sh defend_the_center\n```\n\n或\n\n```bash\n.\u002Frun.sh health_gathering\n```\n\n#### Visual Doom AI 竞赛 2017\n\n我们发布了提交至 ViZDoom AI 2017 竞赛第一赛道和第二赛道的两个智能体。您可以通过以下命令观看它们与内置机器人对战的场景：\n\n##### 第一赛道——Arnold 对战 10 个内置 AI 机器人\n```bash\n.\u002Frun.sh track1 --n_bots 10\n```\n\n##### 第二赛道——Arnold 对战 10 个内置 AI 机器人——地图 2\n```bash\n.\u002Frun.sh track2 --n_bots 10 --map_id 2\n```\n\n##### 第二赛道——4 个 Arnold 相互对战——地图 3\n```bash\n.\u002Frun.sh track2 --n_bots 0 --map_id 3 --n_agents 4\n```\n\n我们还基于单一地图、使用同一种武器（超级霰弹枪）训练了一个智能体。这个智能体极其难以击败。\n\n##### 散弹枪——4 个 Arnold 相互对战\n```bash\n.\u002Frun.sh shotgun --n_bots 0 --n_agents 4\n```\n\n##### 散弹枪——3 个 Arnold 相互对战 + 1 名人类玩家（用于与智能体对战）\n```bash\n.\u002Frun.sh shotgun --n_bots 0 --n_agents 3 --human_player 1\n```\n\n\n## 参考文献\n\n如果您觉得本代码有用，请考虑引用：\n\n[1] G. Lample* 和 D.S. Chaplot*, [*使用深度强化学习玩 FPS 游戏*](https:\u002F\u002Farxiv.org\u002Fabs\u002F1609.05521)\n```\n@inproceedings{lample2017playing,\n  title={Playing FPS Games with Deep Reinforcement Learning.},\n  author={Lample, Guillaume and Chaplot, Devendra Singh},\n  booktitle={Proceedings of AAAI},\n  year={2017}\n}\n```\n\n\n[2] D.S. Chaplot* 和 G. Lample*, [*Arnold：一款用于玩 FPS 游戏的自主智能体*](http:\u002F\u002Fwww.cs.cmu.edu\u002F~dchaplot\u002Fpapers\u002Farnold_aaai17.pdf)\n```\n@inproceedings{chaplot2017arnold,\n  title={Arnold: An Autonomous Agent to Play FPS Games.},\n  author={Chaplot, Devendra Singh and Lample, Guillaume},\n  booktitle={Proceedings of AAAI},\n  year={2017},\n  Note={最佳演示奖}\n}\n```\n\n\n## 致谢\n我们感谢 [*ViZDoom*](http:\u002F\u002Fvizdoom.cs.put.edu.pl\u002F) 的开发者在本项目开发过程中提供的持续帮助和支持。部分地图和 WAD 文件借用了 ViZDoom 的 [*Git 仓库*](https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom)。同时，我们也感谢 [*ZDoom*](https:\u002F\u002Fforum.zdoom.org\u002F) 社区成员在 Action Code Scripts (ACS) 方面给予的帮助。","# Arnold 快速上手指南\n\nArnold 是一个基于 PyTorch 的强化学习项目，实现了在《毁灭战士》（DOOM）环境中进行第一人称射击（FPS）游戏的智能体。该模型曾获得 2017 年 ViZDoom AI 竞赛冠军。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**：macOS 或 Linux 发行版（已在这些系统上测试通过）。\n- **Python 版本**：Python 2 或 Python 3。\n\n### 前置依赖\n在开始之前，请确保已安装以下库：\n- `NumPy`\n- `OpenCV` (`cv2`)\n- `PyTorch`\n- `ViZDoom` (核心游戏引擎)\n\n> **提示**：国内用户安装 PyTorch 时，建议访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002F) 获取针对国内网络优化的安装命令（如使用清华或中科大镜像源）。\n\n## 安装步骤\n\n### 1. 安装基础 Python 依赖\n使用 pip 安装必要的 Python 包：\n```bash\npip install numpy opencv-python torch\n```\n\n### 2. 安装 ViZDoom\nArnold 强依赖 ViZDoom 引擎。请严格按照以下步骤操作，确保能在任意目录下通过 `import vizdoom` 导入模块。\n\n**推荐方式（pip 安装）：**\n```bash\npip install vizdoom\n```\n\n**备选方式（源码编译）：**\n如果 pip 安装失败，请参考 [ViZDoom Quickstart](https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom\u002Fblob\u002Fmaster\u002Fdoc\u002FQuickstart.md) 进行源码编译。编译完成后，务必将生成的库文件移动到 Python 的 `site-packages` 目录中。\n\n**验证安装：**\n在终端任意路径下运行 Python，尝试导入：\n```python\nimport vizdoom\n```\n若无报错，则环境准备完成。\n\n### 3. 获取 Arnold 代码\n克隆本仓库并进入目录：\n```bash\ngit clone \u003Crepository_url>\ncd Arnold\n```\n*(注：请替换 `\u003Crepository_url>` 为实际的项目地址)*\n\n## 基本使用\n\n### 场景说明\nArnold 提供了多种预设训练场景，最简单的入门场景是 **\"Defend the Center\"（保卫中心）**。\n- **目标**：智能体位于圆形地图中心，怪物从四周出现，智能体需转身并使用手枪击杀怪物。\n- **预期表现**：标准 DQN 模型约在 400 万步后达到最优性能（击杀 56 个怪物）。\n\n### 快速开始训练\n运行以下命令即可开始训练默认的 \"Defend the Center\" 场景：\n\n```bash\npython arnold.py --scenario defend_the_center --action_combinations \"turn_lr+attack\" --frame_skip 2\n```\n\n### 可视化预训练模型\n如果你不想从头训练，可以直接运行提供的脚本查看预训练好的模型表现：\n\n```bash\n.\u002Frun.sh defend_the_center\n```\n\n### 其他常用场景示例\n- **健康收集 (Health Gathering)**：智能体需在熔岩上移动以收集血包生存。\n  ```bash\n  python arnold.py --scenario health_gathering --action_combinations \"move_fb;turn_lr\" --frame_skip 5\n  ```\n- **死亡竞赛 (Deathmatch)**：与内置 bots 对战（需更多计算资源）。\n  ```bash\n  python arnold.py --scenario deathmatch --wad deathmatch_rockets --n_bots 8 --action_combinations \"move_fb;move_lr;turn_lr;attack\" --frame_skip 4 --game_features \"enemy\" --network_type dqn_rnn --recurrence lstm --n_rec_updates 5\n  ```\n\n训练完成后，添加 `--visualize 1` 和 `--reload \u003C模型路径>` 参数即可回放或评估训练好的智能体。","某高校人工智能实验室的研究团队正致力于复现经典论文《Playing FPS Games with Deep Reinforcement Learning》，并准备参加下一届 ViZDoom 智能体竞赛。\n\n### 没有 Arnold 时\n- **环境搭建繁琐**：研究人员需手动配置复杂的 ViZDoom 依赖库，常因版本兼容性问题导致 `import vizdoom` 失败，耗费数天时间在调试环境而非算法上。\n- **基线缺失**：缺乏经过验证的高质量基准模型，团队难以判断自研算法的性能上限，只能从零开始训练，试错成本极高。\n- **场景单一**：需要自行寻找或编写符合竞赛标准的地图文件（.wad），难以获取涵盖死亡竞赛、资源收集等多种策略的标准化测试场景。\n- **复现困难**：原论文代码未开源或结构混乱，难以直接复用其获奖的 DQN\u002FDRQN 架构细节，导致实验结果无法与 2017 年冠军方案进行公平对比。\n\n### 使用 Arnold 后\n- **开箱即用**：Arnold 提供了详尽的安装指南和预封装的 PyTorch 实现，团队在几小时内即可在 Linux\u002FMac 环境下跑通流程，快速进入核心研究。\n- **强力基准**：直接加载 Arnold 内置的 5 个预训练模型（含历届冠军模型），研究人员可立即进行可视化对战或性能评估，确立了清晰的优化目标。\n- **场景丰富**：利用工具自带的 17 张精选地图包，涵盖了从简单的“健康值收集”到复杂的“全员死亡竞赛”，满足了多阶段训练和多样化评估需求。\n- **架构透明**：通过查看 Arnold 清晰的源码结构（如 `src\u002Fmodel` 中的 DQN\u002FDRQN 实现），团队能快速理解获奖算法的网络细节，并在此基础上灵活调整超参数进行创新实验。\n\nArnold 将原本耗时数周的环境构建与基线复现工作压缩至数小时，让研究者能专注于强化学习策略本身的创新与突破。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fglample_Arnold_ae3ef39a.gif","glample","Guillaume Lample","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fglample_03452afe.png","Research Scientist at Facebook AI Research. Working on unsupervised machine translation, symbolic mathematics and theorem proving.","Facebook AI Research","Paris","guillaume.lample@gmail.com","GuillaumeLample",null,"https:\u002F\u002Fgithub.com\u002Fglample",[83,87],{"name":84,"color":85,"percentage":86},"Python","#3572A5",97.6,{"name":88,"color":89,"percentage":90},"Shell","#89e051",2.4,536,111,"2026-03-30T04:04:48",4,"Linux, macOS","非必需（可通过 --gpu_id -1 在 CPU 上运行），具体型号和显存未说明","未说明",{"notes":99,"python":100,"dependencies":101},"必须安装 ViZDoom 库并确保能在任意目录下通过 Python 导入（import vizdoom）；项目包含预训练模型和 17 张精选地图；支持多种训练场景参数配置（如帧跳过、动作组合、网络架构等）。","2 或 3",[102,103,104,105],"PyTorch","NumPy","OpenCV","ViZDoom",[13,107],"其他",[109,110,111,112,113,114,115,116],"reinforcement-learning","artificial-intelligence","q-learning","doom","doom-2","self-playing","neural-network","vizdoom-competition","2026-03-27T02:49:30.150509","2026-04-13T06:10:35.478958",[120,125,130,135,140,145],{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},31423,"代码实现与论文《Playing FPS Games with Deep Reinforcement Learning》中描述的双网络架构（DQN 导航 + DRQN 动作）不一致，原因是什么？","作者在该代码库中并未包含论文所述的两个独立网络。为了简化训练和评估过程，决定将导航奖励和死亡竞赛奖励合并到同一个模型中。虽然这使得控制模型的探索\u002F露营行为变得困难，但发现单个网络在仔细设计奖励形状后也能表现良好。如果用户需要复现双网络策略，可以使用此代码分别训练两个网络，然后在后期进行合并。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F9",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},31424,"如何复现 Track_1 和 Track_2 预训练模型的具体训练设置和命令？","以下是用于训练 Track_1 模型的具体命令参数：\npython3 arnold.py --exp_name track_1 --main_dump_path $PWD\u002Fdumped --frame_skip 3 --action_combinations \"attack+move_lr;turn_lr;move_fb\" --network_type \"dqn_rnn\" --recurrence \"lstm\" --n_rec_layers 1 --hist_size 4 --remember 1 --labels_mapping \"\" --game_features \"target,enemy\" --bucket_size \"[10, 1]\" --dropout 0.5 --speed \"on\" --crouch \"off\" --map_ids_test 1 --manual_control 1 --scenario \"deathmatch\" --wad \"deathmatch_rockets\" --gpu_id 0\n注意：训练过程中的击杀分数（frags score）在不同迭代间存在较大方差是正常现象，增加评估时间可以减少方差，但分数通常仍会波动，而 K\u002FD 比率通常更稳定。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F4",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},31425,"在使用 LSTM 和经验回放（Experience Replay）时，如何将两者结合？随机采样的单帧是否破坏了 LSTM 的时间序列特性？","屏幕帧在回放缓冲区中是按顺序存储的。当使用 LSTM 进行训练时，训练器会采样屏幕序列（sequences of screens）而不是独立的单帧。当然，这些序列通常不会是从回合开始起的完整序列（因为开销太大），通常的做法是提供最后的 5 帧来初始化 LSTM 的隐藏状态，从而保留时间依赖性。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F7",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},31426,"加载预训练模型时出现维度不匹配错误（例如 conv.0.weight 维度在模型中为 [32, 3, 8, 8] 而在检查点中为 [32, 4, 8, 8]），如何解决？","该错误是因为重新加载的模型使用了 4 个特征图（RGB + 1 个对应敌方机器人的特征图），而当前命令创建的模型只配置了 3 个特征图（仅 RGB）。解决方法是在命令中添加 `--labels_mapping \"0\"` 参数，以启用额外的特征图输入，使其与预训练模型匹配。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F1",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},31427,"运行 deathmatch 场景训练时出现 `AssertionError` 或 CUDA 相关错误，可能是什么原因？","这通常是由于 PyTorch 版本不兼容导致的。维护者确认该命令在 PyTorch 0.3.0.post4 版本下运行正常。如果您使用的是更新版本的 PyTorch，可能会遇到此问题。建议尝试降级到 PyTorch 0.3.0.post4 或检查代码是否适配了新版本的 RNN 参数扁平化处理逻辑。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F2",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},31428,"该项目是仅使用 PyTorch 实现的吗？它是如何与游戏引擎交互的？","是的，机器人模型是使用 PyTorch 实现的。项目通过 API 与游戏本身进行交互，具体使用的是 ViZDoom 接口（https:\u002F\u002Fgithub.com\u002Fmwydmuch\u002FViZDoom），该接口允许 Python 代码控制 Doom 游戏环境。","https:\u002F\u002Fgithub.com\u002Fglample\u002FArnold\u002Fissues\u002F3",[]]