[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-medipixel--rl_algorithms":3,"tool-medipixel--rl_algorithms":64},[4,17,27,35,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[13,14,15,43],"视频",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":23,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":23,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,60,43,61,15,62,26,13,63],"数据工具","插件","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":82,"owner_website":83,"owner_url":84,"languages":85,"stars":101,"forks":102,"last_commit_at":103,"license":104,"difficulty_score":10,"env_os":105,"env_gpu":106,"env_ram":105,"env_deps":107,"category_tags":112,"github_topics":113,"view_count":23,"oss_zip_url":82,"oss_zip_packed_at":82,"status":16,"created_at":121,"updated_at":122,"faqs":123,"releases":154},4170,"medipixel\u002Frl_algorithms","rl_algorithms","Structural implementation of RL key algorithms","rl_algorithms 是一个专注于强化学习（RL）核心算法的开源代码库，由 Medipixel 团队维护并用于内部研究。它提供了一套结构清晰、模块化设计的经典强化学习算法实现，旨在帮助开发者和研究人员快速理解、复现及实验各种主流 RL 策略。\n\n在强化学习领域，算法实现往往复杂且容易出错，重复造轮子会消耗大量科研与工程时间。rl_algorithms 通过统一且规范的代码架构，解决了算法实现碎片化和难以对比的问题。用户可以直接调用其中封装好的智能体（Agent），在如 LunarLander、Pong 或 Reacher 等标准环境中进行训练与测试，从而将精力集中在策略优化而非底层代码构建上。\n\n这款工具特别适合人工智能领域的研究人员、算法工程师以及希望深入钻研强化学习的学生使用。其独特的技术亮点在于优秀的代码结构设计，不仅涵盖了从基础到前沿的多种算法（如 SAC、RainbowIQN 等），还保持了极高的代码可读性与扩展性，方便用户根据需求定制新算法。项目采用 MIT 协议开源，社区活跃，欢迎全球开发者共同贡献，是学习和实践强化学习的优质起点。","\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_4d5d197023ad.jpg\" align=\"center\">\n\n[![Language grade: Python](https:\u002F\u002Fimg.shields.io\u002Flgtm\u002Fgrade\u002Fpython\u002Fg\u002Fmedipixel\u002Frl_algorithms.svg?logo=lgtm&logoWidth=18)](https:\u002F\u002Flgtm.com\u002Fprojects\u002Fg\u002Fmedipixel\u002Frl_algorithms\u002Fcontext:python)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\u003C!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fall_contributors-10-orange.svg?style=flat-square)](#contributors-)\n\u003C!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n\u003C\u002Fp>\n\n## Contents\n\n* [Welcome!](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#welcome)\n* [Contributors](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#contributors)\n* [Algorithms](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#algorithms)\n* [Performance](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#performance)\n* [Getting Started](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#getting-started)\n* [Class Diagram](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#class-diagram)\n* [References](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#references)\n\n\n## Welcome!\nThis repository contains Reinforcement Learning algorithms which are being used for research activities at Medipixel. The source code will be frequently updated. \nWe are warmly welcoming external contributors! :)\n\n|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_2539f9203380.gif\" width=\"260\" height=\"180\"\u002F>|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_5c189bef0781.gif\" width=\"160\" height=\"180\"\u002F>|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_39198c1d2e91.gif\" width=\"260\" height=\"180\"\u002F>|\n|:---:|:---:|:---:|\n|BC agent on LunarLanderContinuous-v2|RainbowIQN agent on PongNoFrameskip-v4|SAC agent on Reacher-v2|\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https:\u002F\u002Fallcontributors.org\u002Fdocs\u002Fen\u002Femoji-key)):\n\u003C!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n\u003C!-- prettier-ignore-start -->\n\u003C!-- markdownlint-disable -->\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCurt-Park\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_beac21b7e5b1.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Jinwoo Park (Curt)\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=Curt-Park\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FMrSyee\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_1e42607d476b.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Kyunghwan Kim\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=MrSyee\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdarthegg\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_97fdf6593bd8.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>darthegg\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=darthegg\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmclearning2\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f854d3917b3e.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Mincheol Kim\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=mclearning2\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fminseop4898\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_95d97cf99ea2.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>김민섭\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=minseop4898\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FjinPrelude\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8ae5a696404c.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Leejin Jung\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=jinPrelude\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcyoon1729\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_90a1b5abd8c0.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Chris Yoon\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=cyoon1729\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fjiseonghan.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_03242ae1412f.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Jiseong Han\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=jiseongHAN\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsehyun-hwang\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_285ea1b15ea7.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Sehyun Hwang\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"#maintenance-sehyun-hwang\" title=\"Maintenance\">🚧\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fisk03276\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_52f8b4cfcde8.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>eunjin\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=isk03276\" title=\"Code\">💻\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003C!-- markdownlint-restore -->\n\u003C!-- prettier-ignore-end -->\n\n\u003C!-- ALL-CONTRIBUTORS-LIST:END -->\nThis project follows the [all-contributors](https:\u002F\u002Fgithub.com\u002Fall-contributors\u002Fall-contributors) specification.\n\n## Algorithms\n\n0. [Advantage Actor-Critic (A2C)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fa2c)\n1. [Deep Deterministic Policy Gradient (DDPG)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fddpg)\n2. [Proximal Policy Optimization Algorithms (PPO)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fppo)\n3. [Twin Delayed Deep Deterministic Policy Gradient Algorithm (TD3)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Ftd3)\n4. [Soft Actor Critic Algorithm (SAC)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fsac)\n5. [Behaviour Cloning (BC with DDPG, SAC)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fbc)\n6. [From Demonstrations (DDPGfD, SACfD, DQfD)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Ffd)\n7. [Rainbow DQN](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdqn)\n8. [Rainbow IQN (without DuelingNet)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdqn) - DuelingNet [degrades performance](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F137)\n9. Rainbow IQN (with [ResNet](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fblob\u002Fmaster\u002Frl_algorithms\u002Fcommon\u002Fnetworks\u002Fbackbones\u002Fresnet.py))\n10. [Recurrent Replay DQN (R2D1)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Frecurrent)\n11. [Distributed Pioritized Experience Replay (Ape-X)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fcommon\u002Fapex)\n12. [Policy Distillation](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdistillation)\n13. [Generative Adversarial Imitation Learning (GAIL)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fgail)\n14. [Sample Efficient Actor-Critic with Experience Replay (ACER)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Facer)\n\n## Performance\n\nWe have tested each algorithm on some of the following environments.\n- [PongNoFrameskip-v4](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Fpong_no_frameskip_v4)\n- [LunarLanderContinuous-v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Flunarlander_continuous_v2)\n- [LunarLander_v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Flunarlander_v2)\n- [Reacher-v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Freacher-v2)\n\n❗Please note that this won't be frequently updated.\n\n\n#### PongNoFrameskip-v4\n\n**RainbowIQN** learns the game incredibly fast! It accomplishes the perfect score (21) [within 100 episodes](https:\u002F\u002Fapp.wandb.ai\u002Fcurt-park\u002Fdqn\u002Fruns\u002Fb2p9e9f7\u002Flogs)!\nThe idea of RainbowIQN is roughly suggested from [W. Dabney et al.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1806.06923.pdf).\n\nSee [W&B Log](https:\u002F\u002Fapp.wandb.ai\u002Fcurt-park\u002Fdqn\u002Freports?view=curt-park%2FPong%20%28DQN%20%2F%20C51%20%2F%20IQN%20%2F%20IQN%20-double%20q%29) for more details. (The performance is measured on the commit [4248057](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F158))\n\n![pong_dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_de15f12c493d.png)\n\n**RainbowIQN with ResNet**'s performance and learning speed were similar to those of RainbowIQN. Also we confirmed that **R2D1 (w\u002F Dueling, PER)** converges well in the Pong enviornment, though not as fast as RainbowIQN (in terms of update step).\n\nAlthough we were only able to test **Ape-X DQN (w\u002F Dueling)** with 4 workers due to limitations to computing power, we observed a significant speed-up in carrying out update steps (with batch size 512). Ape-X DQN learns Pong game in about 2 hours, compared to 4 hours for serial Dueling DQN.\n\nSee [W&B Log](https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FPongNoFrameskip-v4\u002Freports\u002F200626-integration-test--VmlldzoxNTE1NjE) for more details. (The performance is measured on the commit [9e897ad](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3))\n![pong dqn with resnet & rnn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_1412bfa594a2.png)\n\n![apex dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_30eabb5c68b1.png)\n\n#### LunarLander-v2 \u002F LunarLanderContinuous-v2\n\nWe used these environments just for a quick verification of each algorithm, so some of experiments may not show the best performance. \n\n##### 👇 Click the following lines to see the figures.\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLander-v2: RainbowDQN, RainbowDQfD, R2D1 \u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLander-v2\u002Freports\u002F200626-integration-test--VmlldzoxNTE2MzA\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa>)\n\n![lunarlander-v2_dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_a08026b04677.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLander-v2:ACER, RainbowDQN, R2D1\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca herf=\"https:\u002F\u002Fwandb.ai\u002Fchaehyeuk-lee\u002FLunarLander-v2\u002Freports\u002FLunarLander-v2-ACER--VmlldzoxMDU4OTQ1?accessToken=yxrr1h1t2d4n3j22hjz4ktzzgkpuhrm7txlyfpl3jb74les23vbfovvw5g64xgtg\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F298\u002Fcommits\u002F82fae77f55f94bb4bc3fb7fc9c44b54dc232c4ff\">82fae77\u003C\u002Fa>)\n\n![lunarlander-v2_acer](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8bf3b4eeeed0.png)\n\u003C\u002Fp>\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2: A2C, PPO, DDPG, TD3, SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa>)\n\n![lunarlandercontinuous-v2_baselines](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8bca8ceb05ed.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2: DDPG, DDPGfD, BC-DDPG\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa>)\n\n![lunarlandercontinuous-v2_ddpg](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_a009c2778187.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2: SAC, SACfD, BC-SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa>)\n\n![lunarlandercontinuous-v2_sac](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8c5a870419bd.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2: PPO, SAC, GAIL\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\nSee \u003Ca href=\"https:\u002F\u002Fwandb.ai\u002Fchaehyeuk-lee\u002FLunarLanderContinuous-v2?workspace=user-chaehyeuk-lee\">W&B log\u003C\u002Fa> for more details. (The performance is measured on the commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F922222b2e249f1f14bdf1a28c9f0f00752e49907\">9e897ad\u003C\u002Fa>)\n\n![lunarlandercontinuous-v2_gail](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f952dd461a8e.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n#### Reacher-v2\n\nWe reproduced the performance of **DDPG**, **TD3**, and **SAC** on Reacher-v2 (Mujoco). They reach the score around -3.5 to -4.5.\n\n##### 👇 Click the following the line to see the figures.\n\n\u003Cdetails>\u003Csummary>\u003Cb>Reacher-v2: DDPG, TD3, SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n\nSee [W&B Log](https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002Freacher-v2\u002Freports?view=curt-park%2FBaselines%20%23158) for more details.\n\n![reacher-v2_baselines](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_acb2581e38e1.png)\n\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\n## Getting started\n\n#### Prerequisites\n* This repository is tested on [Anaconda](https:\u002F\u002Fwww.anaconda.com\u002Fdistribution\u002F) virtual environment with python 3.6.1+\n    ```\n    $ conda create -n rl_algorithms python=3.7.9\n    $ conda activate rl_algorithms\n    ```\n* In order to run Mujoco environments (e.g. `Reacher-v2`), you need to acquire [Mujoco license](https:\u002F\u002Fwww.roboti.us\u002Flicense.html).\n\n#### Installation\nFirst, clone the repository.\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms.git\ncd rl_algorithms\n```\n\n###### For users\nInstall packages required to execute the code. It includes `python setup.py install`. Just type:\n```\nmake dep\n```\n\n###### For developers\nIf you want to modify code you should configure formatting and linting settings. It automatically runs formatting and linting when you commit the code. Contrary to `make dep` command, it includes `python setup.py develop`. Just type:\n\n```\nmake dev\n```\n\nAfter having done `make dev`, you can validate the code by the following commands.\n```\nmake format  # for formatting\nmake test  # for linting\n```\n\n#### Usages\nYou can train or test `algorithm` on `env_name` if `configs\u002Fenv_name\u002Falgorithm.yaml` exists. (`configs\u002Fenv_name\u002Falgorithm.yaml` contains hyper-parameters)\n```\npython run_env_name.py --cfg-path \u003Cconfig-path>\n``` \n\ne.g. running soft actor-critic on LunarLanderContinuous-v2.\n```\npython run_lunarlander_continuous_v2.py --cfg-path .\u002Fconfigs\u002Flunarlander_continuous_v2\u002Fsac.yaml \u003Cother-options>\n```\n\ne.g. running a custom agent, **if you have written your own configs**: `configs\u002Fenv_name\u002Fddpg-custom.yaml`.\n```\npython run_env_name.py --cfg-path .\u002Fconfigs\u002Flunarlander_continuous_v2\u002Fddpg-custom.py\n```\nYou will see the agent run with hyper parameter and model settings you configured.\n\n#### Arguments for run-files\n\nIn addition, there are various argument settings for running algorithms. If you check the options to run file you should command \n```\npython \u003Crun-file> -h\n```\n- `--test`\n    - Start test mode (no training).\n- `--off-render`\n    - Turn off rendering.\n- `--log`\n    - Turn on logging using [W&B](https:\u002F\u002Fwww.wandb.com\u002F).\n- `--seed \u003Cint>`\n    - Set random seed.\n- `--save-period \u003Cint>`\n    - Set saving period of model and optimizer parameters.\n- `--max-episode-steps \u003Cint>`\n    - Set maximum episode step number of the environment. If the number is less than or equal to 0, it uses the default maximum step number of the environment.\n- `--episode-num \u003Cint>`\n    - Set the number of episodes for training.\n- `--render-after \u003Cint>`\n    - Start rendering after the number of episodes.\n- `--load-from \u003Csave-file-path>`\n    - Load the saved models and optimizers at the beginning.\n\n#### Show feature map with Grad-CAM and Saliency-map\nYou can show a feature map that the trained agent extract using **[Grad-CAM(Gradient-weighted Class Activation Mapping)](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02391.pdf)** and **[Saliency map](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1312.6034.pdf)**. \n\nGrad-CAM is a way of combining feature maps using the gradient signal, and produce a coarse localization map of the important regions in the image. You can use it by adding [Grad-CAM config](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fblob\u002Fmaster\u002Fconfigs\u002Fpong_no_frameskip_v4\u002Fdqn.py#L39) and `--grad-cam` flag when you run. For example:\n```\npython run_env_name.py --cfg-path \u003Cconfig-path> --test --grad-cam\n```\nThe results will be rendered as follows:\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_82284962dd28.gif\" width=\"400\" height=\"400\" align=\"center\"\u002F>\n\nYou can also use Saliency-map in a similar way to Grad-CAM just by adding `--saliency-map` flag. Saliency-map need trained weight carried by `--load-from` flag. \n```\npython run_env_name.py --cfg-path \u003Cconfig-path> --load-from \u003Csave-file-path> --test --saliency-map\n```\nSaliency map will be stored in data\u002Fsaliency_map\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f780c561c439.gif\" width=\"400\" height=\"140\" align=\"center\"\u002F>\n\nBoth Grad-CAM and Saliency-map can be only used for the agent that uses convolutional layers like **DQN for Pong environment**. You can see feature maps of all the configured convolution layers.\n\n\n#### Using policy distillation\n\nWe seperate the document about using policy distillation in [rl_algorithms\u002Fdistillation\u002FREADME.md](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdistillation).\n\n\n#### W&B for logging\nWe use [W&B](https:\u002F\u002Fwww.wandb.com\u002F) for logging of network parameters and others. For logging, please follow the steps below after requirement installation:\n\n>0. Create a [wandb](https:\u002F\u002Fwww.wandb.com\u002F) account\n>1. Check your **API key** in settings, and login wandb on your terminal: `$ wandb login API_KEY`\n>2. Initialize wandb: `$ wandb init`\n\nFor more details, read [W&B tutorial](https:\u002F\u002Fdocs.wandb.com\u002Fdocs\u002Fstarted.html).\n\n## Class Diagram\nClass diagram at [#135](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F135).\n\n❗This won't be frequently updated.\n\n![RL_Algorithms_ClassDiagram](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8cd30e31dcfe.png)\n\n## Citing the Project\nTo cite this repository in publications:\n```\n@misc{rl_algorithms,\n  author = {Kim, Kyunghwan and Lee, Chaehyuk and Jeong, Euijin and Han, Jiseong and Kim, Minseop and Yoon, Chris and Kim, Mincheol and Park, Jinwoo},\n  title = {Medipixel RL algorithms},\n  year = {2020},\n  publisher = {Github},\n  journal = {GitHub repository},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms}},\n}\n```\n## References\n0. [T. P. Lillicrap et al., \"Continuous control with deep reinforcement learning.\" arXiv preprint arXiv:1509.02971, 2015.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1509.02971.pdf)\n1. [J. Schulman et al., \"Proximal Policy Optimization Algorithms.\" arXiv preprint arXiv:1707.06347, 2017.](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.06347.pdf)\n2. [S. Fujimoto et al., \"Addressing function approximation error in actor-critic methods.\" arXiv preprint arXiv:1802.09477, 2018.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1802.09477.pdf)\n3. [T.  Haarnoja et al., \"Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor.\" arXiv preprint arXiv:1801.01290, 2018.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1801.01290.pdf)\n4. [T. Haarnoja et al., \"Soft Actor-Critic Algorithms and Applications.\" arXiv preprint arXiv:1812.05905, 2018.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1812.05905.pdf)\n5. [T. Schaul et al., \"Prioritized Experience Replay.\" arXiv preprint arXiv:1511.05952, 2015.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1511.05952.pdf)\n6. [M. Andrychowicz et al., \"Hindsight Experience Replay.\" arXiv preprint arXiv:1707.01495, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.01495.pdf)\n7. [A. Nair et al., \"Overcoming Exploration in Reinforcement Learning with Demonstrations.\" arXiv preprint arXiv:1709.10089, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1709.10089.pdf)\n8. [M. Vecerik et al., \"Leveraging Demonstrations for Deep Reinforcement Learning on Robotics Problems with Sparse Rewards.\"arXiv preprint arXiv:1707.08817, 2017](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.08817.pdf)\n9. [V. Mnih et al., \"Human-level control through deep reinforcement learning.\" Nature, 518\n(7540):529–533, 2015.](https:\u002F\u002Fstorage.googleapis.com\u002Fdeepmind-media\u002Fdqn\u002FDQNNaturePaper.pdf)\n10. [van Hasselt et al., \"Deep Reinforcement Learning with Double Q-learning.\" arXiv preprint arXiv:1509.06461, 2015.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1509.06461.pdf)\n11. [Z. Wang et al., \"Dueling Network Architectures for Deep Reinforcement Learning.\" arXiv preprint arXiv:1511.06581, 2015.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1511.06581.pdf)\n12. [T. Hester et al., \"Deep Q-learning from Demonstrations.\" arXiv preprint arXiv:1704.03732, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.03732.pdf)\n13. [M. G. Bellemare et al., \"A Distributional Perspective on Reinforcement Learning.\" arXiv preprint arXiv:1707.06887, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.06887.pdf)\n14. [M. Fortunato et al., \"Noisy Networks for Exploration.\" arXiv preprint arXiv:1706.10295, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.10295.pdf)\n15. [M. Hessel et al., \"Rainbow: Combining Improvements in Deep Reinforcement Learning.\" arXiv preprint arXiv:1710.02298, 2017.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1710.02298.pdf)\n16. [W. Dabney et al., \"Implicit Quantile Networks for Distributional Reinforcement Learning.\" arXiv preprint arXiv:1806.06923, 2018.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1806.06923.pdf)\n17. [Ramprasaath R. Selvaraju et al., \"Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization.\" arXiv preprint arXiv:1610.02391, 2016.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02391.pdf)\n18. [Kaiming He et al., \"Deep Residual Learning for Image Recognition.\" arXiv preprint arXiv:1512.03385, 2015.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1512.03385)\n19. [Steven Kapturowski et al., \"Recurrent Experience Replay in Distributed Reinforcement Learning.\" in International Conference on Learning Representations https:\u002F\u002Fopenreview.net\u002Fforum?id=r1lyTjAqYX, 2019.](https:\u002F\u002Fopenreview.net\u002Fforum?id=r1lyTjAqYX)\n20. [Horgan et al., \"Distributed Prioritized Experience Replay.\" in International Conference on Learning Representations, 2018](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1803.00933.pdf)\n21. [Simonyan et al., \"Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps\", 2013](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1312.6034.pdf)\n22. [Ho et al., \"Generative adversarial imitation learning\", 2016](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03476)\n23. [Wang, Ziyu, et al. \"Sample efficient actor-critic with experience replay\", 2016.](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1611.01224.pdf)\n","\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_4d5d197023ad.jpg\" align=\"center\">\n\n[![语言等级：Python](https:\u002F\u002Fimg.shields.io\u002Flgtm\u002Fgrade\u002Fpython\u002Fg\u002Fmedipixel\u002Frl_algorithms.svg?logo=lgtm&logoWidth=18)](https:\u002F\u002Flgtm.com\u002Fprojects\u002Fg\u002Fmedipixel\u002Frl_algorithms\u002Fcontext:python)\n[![许可证：MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![代码风格：black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\u003C!-- ALL-CONTRIBUTORS-BADGE:START - 请勿移除或修改此部分 -->\n[![所有贡献者](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fall_contributors-10-orange.svg?style=flat-square)](#contributors-)\n\u003C!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n\u003C\u002Fp>\n\n## 目录\n\n* [欢迎！](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#welcome)\n* [贡献者](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#contributors)\n* [算法](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#algorithms)\n* [性能](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#performance)\n* [快速入门](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#getting-started)\n* [类图](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#class-diagram)\n* [参考文献](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms#references)\n\n\n## 欢迎！\n本仓库包含强化学习算法，这些算法正被用于Medipixel的研究工作中。源代码会频繁更新。\n我们热烈欢迎外部贡献者！ :)\n\n|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_2539f9203380.gif\" width=\"260\" height=\"180\"\u002F>|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_5c189bef0781.gif\" width=\"160\" height=\"180\"\u002F>|\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_39198c1d2e91.gif\" width=\"260\" height=\"180\"\u002F>|\n|:---:|:---:|:---:|\n|BC智能体在LunarLanderContinuous-v2上|RainbowIQN智能体在PongNoFrameskip-v4上|SAC智能体在Reacher-v2上|\n\n## 贡献者\n\n感谢以下各位优秀的伙伴（[表情符号说明](https:\u002F\u002Fallcontributors.org\u002Fdocs\u002Fen\u002Femoji-key)）：\n\u003C!-- ALL-CONTRIBUTORS-LIST:START - 请勿移除或修改此部分 -->\n\u003C!-- prettier-ignore-start -->\n\u003C!-- markdownlint-disable -->\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCurt-Park\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_beac21b7e5b1.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>朴仁宇（Curt）\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=Curt-Park\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FMrSyee\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_1e42607d476b.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>金京焕\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=MrSyee\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fdarthegg\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_97fdf6593bd8.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>darthegg\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=darthegg\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmclearning2\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f854d3917b3e.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>金民哲\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=mclearning2\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fminseop4898\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_95d97cf99ea2.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>金敏燮\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=minseop4898\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FjinPrelude\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8ae5a696404c.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>李珍\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=jinPrelude\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcyoon1729\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_90a1b5abd8c0.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>克里斯·尹\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=cyoon1729\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fjiseonghan.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_03242ae1412f.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>韩智成\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=jiseongHAN\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsehyun-hwang\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_285ea1b15ea7.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>黄世贤\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"#maintenance-sehyun-hwang\" title=\"维护\">🚧\u003C\u002Fa>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fisk03276\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_52f8b4cfcde8.png\" width=\"100px;\" alt=\"\"\u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>恩珍\u003C\u002Fb>\u003C\u002Fsub>\u003C\u002Fa>\u003Cbr \u002F>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommits?author=isk03276\" title=\"代码\">💻\u003C\u002Fa>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003C!-- markdownlint-restore -->\n\u003C!-- prettier-ignore-end -->\n\n\u003C!-- ALL-CONTRIBUTORS-LIST:END -->\n本项目遵循[all-contributors](https:\u002F\u002Fgithub.com\u002Fall-contributors\u002Fall-contributors)规范。\n\n## 算法\n\n0. [优势演员-评论家算法 (A2C)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fa2c)\n1. [深度确定性策略梯度算法 (DDPG)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fddpg)\n2. [近端策略优化算法 (PPO)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fppo)\n3. [双延迟深度确定性策略梯度算法 (TD3)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Ftd3)\n4. [软演员-评论家算法 (SAC)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fsac)\n5. [行为克隆 (BC，结合 DDPG 和 SAC)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fbc)\n6. [从示范中学习 (DDPGfD、SACfD、DQfD)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Ffd)\n7. [彩虹 DQN](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdqn)\n8. [彩虹 IQN（不使用 DuelingNet）](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdqn) - DuelingNet [会降低性能](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F137)\n9. 彩虹 IQN（使用 [ResNet](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fblob\u002Fmaster\u002Frl_algorithms\u002Fcommon\u002Fnetworks\u002Fbackbones\u002Fresnet.py)）\n10. [循环重放缓冲 DQN (R2D1)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Frecurrent)\n11. [分布式优先级经验回放 (Ape-X)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fcommon\u002Fapex)\n12. [策略蒸馏](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdistillation)\n13. [生成对抗模仿学习 (GAIL)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fgail)\n14. [带经验回放的高效演员-评论家算法 (ACER)](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Facer)\n\n## 性能\n\n我们在以下部分环境中测试了每种算法：\n- [PongNoFrameskip-v4](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Fpong_no_frameskip_v4)\n- [LunarLanderContinuous-v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Flunarlander_continuous_v2)\n- [LunarLander_v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Flunarlander_v2)\n- [Reacher-v2](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Fconfigs\u002Freacher-v2)\n\n❗请注意，此内容不会频繁更新。\n\n\n#### PongNoFrameskip-v4\n\n**RainbowIQN** 学习游戏的速度非常快！它在[100个episode内](https:\u002F\u002Fapp.wandb.ai\u002Fcurt-park\u002Fdqn\u002Fruns\u002Fb2p9e9f7\u002Flogs)就达到了满分（21分）！RainbowIQN 的思路大致受到 [W. Dabney 等人](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1806.06923.pdf) 的启发。\n\n更多详情请参阅 [W&B 日志](https:\u002F\u002Fapp.wandb.ai\u002Fcurt-park\u002Fdqn\u002Freports?view=curt-park%2FPong%20%28DQN%20%2F%20C51%20%2F%20IQN%20%2F%20IQN%20-double%20q%29)。（性能基于 commit [4248057](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F158) 测量）\n\n![pong_dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_de15f12c493d.png)\n\n**带有 ResNet 的 RainbowIQN** 的表现和学习速度与 RainbowIQN 基本一致。此外，我们还确认 **R2D1（带 Dueling 和 PER）** 在 Pong 环境中也能很好地收敛，尽管其收敛速度不如 RainbowIQN 快（以更新步数衡量）。\n\n虽然由于计算资源限制，我们只能用 4 个工作进程测试 **Ape-X DQN（带 Dueling）**，但我们观察到其执行更新步骤的速度显著加快（批次大小为 512）。Ape-X DQN 大约需要 2 小时就能学会 Pong 游戏，而串行的 Dueling DQN 则需要 4 小时。\n\n更多详情请参阅 [W&B 日志](https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FPongNoFrameskip-v4\u002Freports\u002F200626-integration-test--VmlldzoxNTE1NjE)。（性能基于 commit [9e897ad](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3) 测量）\n![pong dqn with resnet & rnn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_1412bfa594a2.png)\n\n![apex dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_30eabb5c68b1.png)\n\n#### LunarLander-v2 \u002F LunarLanderContinuous-v2\n\n我们使用这些环境只是为了快速验证每种算法，因此部分实验可能并未展现出最佳性能。\n\n##### 👇 点击下方链接查看图表。\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLander-v2：RainbowDQN、RainbowDQfD、R2D1\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLander-v2\u002Freports\u002F200626-integration-test--VmlldzoxNTE2MzA\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa> 测量）\n\n![lunarlander-v2_dqn](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_a08026b04677.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLander-v2：ACER、RainbowDQN、R2D1\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca herf=\"https:\u002F\u002Fwandb.ai\u002Fchaehyeuk-lee\u002FLunarLander-v2\u002Freports\u002FLunarLander-v2-ACER--VmlldzoxMDU4OTQ1?accessToken=yxrr1h1t2d4n3j22hjz4ktzzgkpuhrm7txlyfpl3jb74les23vbfovvw5g64xgtg\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F298\u002Fcommits\u002F82fae77f55f94bb4bc3fb7fc9c44b54dc232c4ff\">82fae77\u003C\u002Fa> 测量）\n\n![lunarlander-v2_acer](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8bf3b4eeeed0.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2：A2C、PPO、DDPG、TD3、SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa> 测量）\n\n![lunarlandercontinuous-v2_baselines](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8bca8ceb05ed.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2：DDPG、DDPGfD、BC-DDPG\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa> 测量）\n\n![lunarlandercontinuous-v2_ddpg](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_a009c2778187.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2：SAC、SACfD、BC-SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca href=\"https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002FLunarLanderContinuous-v2\u002Freports\u002F200626-integration-test--VmlldzoxNDg1MjU\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F9e897adfe93600c1db85ce1a7e064064b025c2c3\">9e897ad\u003C\u002Fa> 测量）\n\n![lunarlandercontinuous-v2_sac](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8c5a870419bd.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n\u003Cdetails>\u003Csummary>\u003Cb>LunarLanderContinuous-v2：PPO、SAC、GAIL\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n更多详情请参阅 \u003Ca href=\"https:\u002F\u002Fwandb.ai\u002Fchaehyeuk-lee\u002FLunarLanderContinuous-v2?workspace=user-chaehyeuk-lee\">W&B 日志\u003C\u002Fa>。（性能基于 commit \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fcommit\u002F922222b2e249f1f14bdf1a28c9f0f00752e49907\">9e897ad\u003C\u002Fa> 测量）\n\n![lunarlandercontinuous-v2_gail](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f952dd461a8e.png)\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n#### Reacher-v2\n\n我们在 Reacher-v2（Mujoco）上复现了 **DDPG**、**TD3** 和 **SAC** 的性能，它们的得分大约在 -3.5 到 -4.5 之间。\n\n##### 👇 点击下方链接查看图表。\n\n\u003Cdetails>\u003Csummary>\u003Cb>Reacher-v2：DDPG、TD3、SAC\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cp>\u003Cbr>\n\n更多详情请参阅 [W&B 日志](https:\u002F\u002Fapp.wandb.ai\u002Fmedipixel_rl\u002Freacher-v2\u002Freports?view=curt-park%2FBaselines%20%23158)。\n\n![reacher-v2_baselines](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_acb2581e38e1.png)\n\n\u003C\u002Fp>\n\u003C\u002Fdetails>\n\n## 开始使用\n\n### 前置条件\n* 本仓库在 [Anaconda](https:\u002F\u002Fwww.anaconda.com\u002Fdistribution\u002F) 虚拟环境中进行了测试，Python 版本需为 3.6.1 及以上。\n    ```\n    $ conda create -n rl_algorithms python=3.7.9\n    $ conda activate rl_algorithms\n    ```\n* 为了运行 Mujoco 环境（例如 `Reacher-v2`），您需要获取 [Mujoco 许可证](https:\u002F\u002Fwww.roboti.us\u002Flicense.html)。\n\n### 安装\n首先，克隆仓库。\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms.git\ncd rl_algorithms\n```\n\n#### 对于用户\n安装执行代码所需的包。这包括 `python setup.py install`。只需输入：\n```\nmake dep\n```\n\n#### 对于开发者\n如果您希望修改代码，应配置格式化和 linting 设置。这些设置会在您提交代码时自动运行格式化和 linting。与 `make dep` 命令不同，它包含 `python setup.py develop`。只需输入：\n```\nmake dev\n```\n\n完成 `make dev` 后，您可以使用以下命令验证代码：\n```\nmake format  # 用于格式化\nmake test  # 用于 linting\n```\n\n### 使用方法\n如果存在 `configs\u002Fenv_name\u002Falgorithm.yaml` 文件，则可以在 `env_name` 环境上训练或测试 `algorithm`。（`configs\u002Fenv_name\u002Falgorithm.yaml` 包含超参数）\n```\npython run_env_name.py --cfg-path \u003Cconfig-path>\n```\n\n例如，在 LunarLanderContinuous-v2 上运行软演员-评论家算法：\n```\npython run_lunarlander_continuous_v2.py --cfg-path .\u002Fconfigs\u002Flunarlander_continuous_v2\u002Fsac.yaml \u003C其他选项>\n```\n\n又如，运行自定义智能体，**前提是您已编写了自己的配置文件**：`configs\u002Fenv_name\u002Fddpg-custom.yaml`。\n```\npython run_env_name.py --cfg-path .\u002Fconfigs\u002Flunarlander_continuous_v2\u002Fddpg-custom.yaml\n```\n您将看到智能体按照您配置的超参数和模型设置运行。\n\n### 运行文件的参数\n此外，运行算法时还有多种参数设置。要查看运行文件支持的选项，可以使用以下命令：\n```\npython \u003Crun-file> -h\n```\n- `--test`\n    - 启动测试模式（不进行训练）。\n- `--off-render`\n    - 关闭渲染。\n- `--log`\n    - 启用使用 [W&B](https:\u002F\u002Fwww.wandb.com\u002F) 的日志记录。\n- `--seed \u003Cint>`\n    - 设置随机种子。\n- `--save-period \u003Cint>`\n    - 设置保存模型和优化器参数的周期。\n- `--max-episode-steps \u003Cint>`\n    - 设置环境的最大步数。若该值小于或等于 0，则使用环境的默认最大步数。\n- `--episode-num \u003Cint>`\n    - 设置训练的回合数。\n- `--render-after \u003Cint>`\n    - 在指定回合数后开始渲染。\n- `--load-from \u003Csave-file-path>`\n    - 在开始时加载已保存的模型和优化器。\n\n### 使用 Grad-CAM 和 Saliency-map 展示特征图\n您可以使用 **[Grad-CAM（梯度加权类激活映射）](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02391.pdf)** 和 **[Saliency map（显著性图）](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1312.6034.pdf)** 展示训练好的智能体提取的特征图。\n\nGrad-CAM 是一种利用梯度信号结合特征图的方法，能够生成图像中重要区域的粗略定位图。您可以通过添加 [Grad-CAM 配置](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fblob\u002Fmaster\u002Fconfigs\u002Fpong_no_frameskip_v4\u002Fdqn.py#L39)并在运行时添加 `--grad-cam` 标志来使用它。例如：\n```\npython run_env_name.py --cfg-path \u003Cconfig-path> --test --grad-cam\n```\n结果将如下所示：\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_82284962dd28.gif\" width=\"400\" height=\"400\" align=\"center\"\u002F>\n\n您也可以以类似的方式使用 Saliency-map，只需添加 `--saliency-map` 标志即可。Saliency-map 需要通过 `--load-from` 标志加载训练好的权重。\n```\npython run_env_name.py --cfg-path \u003Cconfig-path> --load-from \u003Csave-file-path> --test --saliency-map\n```\n显著性图将被存储在 `data\u002Fsaliency_map` 目录下。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_f780c561c439.gif\" width=\"400\" height=\"140\" align=\"center\"\u002F>\n\nGrad-CAM 和 Saliency-map 仅适用于使用卷积层的智能体，例如 **Pong 环境下的 DQN**。您可以查看所有已配置卷积层的特征图。\n\n### 使用策略蒸馏\n关于策略蒸馏的使用说明，请参阅 [rl_algorithms\u002Fdistillation\u002FREADME.md](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Ftree\u002Fmaster\u002Frl_algorithms\u002Fdistillation)。\n\n### 使用 W&B 进行日志记录\n我们使用 [W&B](https:\u002F\u002Fwww.wandb.com\u002F) 来记录网络参数等信息。在满足要求并完成安装后，请按照以下步骤进行日志记录：\n\n>0. 创建一个 [wandb](https:\u002F\u002Fwww.wandb.com\u002F) 账户\n>1. 在设置中找到您的 **API 密钥**，并在终端登录 wandb：`$ wandb login API_KEY`\n>2. 初始化 wandb：`$ wandb init`\n\n更多详细信息，请参阅 [W&B 教程](https:\u002F\u002Fdocs.wandb.com\u002Fdocs\u002Fstarted.html)。\n\n## 类图\n类图见 [#135](https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fpull\u002F135)。\n\n❗此内容不会频繁更新。\n\n![RL_Algorithms_ClassDiagram](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_readme_8cd30e31dcfe.png)\n\n## 引用本项目\n若要在出版物中引用本仓库，请使用以下格式：\n```\n@misc{rl_algorithms,\n  author = {Kim, Kyunghwan and Lee, Chaehyuk and Jeong, Euijin and Han, Jiseong and Kim, Minseop and Yoon, Chris and Kim, Mincheol and Park, Jinwoo},\n  title = {Medipixel RL algorithms},\n  year = {2020},\n  publisher = {Github},\n  journal = {GitHub repository},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms}},\n}\n```\n\n## 参考文献\n0. [T. P. Lillicrap 等人，“深度强化学习中的连续控制”。arXiv 预印本 arXiv:1509.02971，2015 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1509.02971.pdf)\n1. [J. Schulman 等人，“近端策略优化算法”。arXiv 预印本 arXiv:1707.06347，2017 年。](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.06347.pdf)\n2. [S. Fujimoto 等人，“解决演员-评论家方法中的函数逼近误差”。arXiv 预印本 arXiv:1802.09477，2018 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1802.09477.pdf)\n3. [T. Haarnoja 等人，“软演员-评论家：基于随机演员的离策略最大熵深度强化学习”。arXiv 预印本 arXiv:1801.01290，2018 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1801.01290.pdf)\n4. [T. Haarnoja 等人，“软演员-评论家算法及其应用”。arXiv 预印本 arXiv:1812.05905，2018 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1812.05905.pdf)\n5. [T. Schaul 等人，“优先经验回放”。arXiv 预印本 arXiv:1511.05952，2015 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1511.05952.pdf)\n6. [M. Andrychowicz 等人，“事后经验回放”。arXiv 预印本 arXiv:1707.01495，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.01495.pdf)\n7. [A. Nair 等人，“利用示范克服强化学习中的探索问题”。arXiv 预印本 arXiv:1709.10089，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1709.10089.pdf)\n8. [M. Vecerik 等人，“利用示范在稀疏奖励的机器人任务上进行深度强化学习”。arXiv 预印本 arXiv:1707.08817，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.08817.pdf)\n9. [V. Mnih 等人，“通过深度强化学习实现人类水平控制”。Nature，518(7540):529–533，2015 年。](https:\u002F\u002Fstorage.googleapis.com\u002Fdeepmind-media\u002Fdqn\u002FDQNNaturePaper.pdf)\n10. [van Hasselt 等人，“采用双 Q 学习的深度强化学习”。arXiv 预印本 arXiv:1509.06461，2015 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1509.06461.pdf)\n11. [Z. Wang 等人，“用于深度强化学习的决斗网络架构”。arXiv 预印本 arXiv:1511.06581，2015 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1511.06581.pdf)\n12. [T. Hester 等人，“基于示范的深度 Q 学习”。arXiv 预印本 arXiv:1704.03732，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1704.03732.pdf)\n13. [M. G. Bellemare 等人，“强化学习的分布视角”。arXiv 预印本 arXiv:1707.06887，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1707.06887.pdf)\n14. [M. Fortunato 等人，“用于探索的噪声网络”。arXiv 预印本 arXiv:1706.10295，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1706.10295.pdf)\n15. [M. Hessel 等人，“彩虹：结合深度强化学习的各项改进”。arXiv 预印本 arXiv:1710.02298，2017 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1710.02298.pdf)\n16. [W. Dabney 等人，“用于分布强化学习的隐式分位数网络”。arXiv 预印本 arXiv:1806.06923，2018 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1806.06923.pdf)\n17. [Ramprasaath R. Selvaraju 等人，“Grad-CAM：通过基于梯度的定位从深度网络获得可视化解释”。arXiv 预印本 arXiv:1610.02391，2016 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1610.02391.pdf)\n18. [Kaiming He 等人，“用于图像识别的深度残差学习”。arXiv 预印本 arXiv:1512.03385，2015 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1512.03385.pdf)\n19. [Steven Kapturowski 等人，“分布式强化学习中的循环经验回放”。国际学习表征会议 https:\u002F\u002Fopenreview.net\u002Fforum?id=r1lyTjAqYX，2019 年。](https:\u002F\u002Fopenreview.net\u002Fforum?id=r1lyTjAqYX)\n20. [Horgan 等人，“分布式优先经验回放”。国际学习表征会议，2018 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1803.00933.pdf)\n21. [Simonyan 等人，“深入卷积网络：可视化图像分类模型和显著性图”，2013 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1312.6034.pdf)\n22. [Ho 等人，“生成对抗模仿学习”，2016 年。](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03476)\n23. [Wang, Ziyu 等人，“具有经验回放的高效演员-评论家”，2016 年。](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1611.01224.pdf)","# rl_algorithms 快速上手指南\n\n`rl_algorithms` 是一个由 Medipixel 维护的强化学习算法库，包含了 A2C、PPO、SAC、Rainbow DQN 等多种主流算法的实现，代码结构清晰，适合研究与实验。\n\n## 环境准备\n\n在开始之前，请确保你的开发环境满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 可能需要额外配置才能运行部分 Gym 环境)\n*   **Python 版本**: Python 3.6+\n*   **核心依赖**:\n    *   PyTorch\n    *   OpenAI Gym\n    *   NumPy\n    *   WandB (用于日志记录，可选但推荐)\n\n建议创建一个独立的虚拟环境以避免依赖冲突：\n\n```bash\npython -m venv rl_env\nsource rl_env\u002Fbin\u002Factivate  # Windows 用户使用: rl_env\\Scripts\\activate\n```\n\n## 安装步骤\n\n### 1. 克隆仓库\n首先从 GitHub 克隆项目代码：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms.git\ncd rl_algorithms\n```\n\n### 2. 安装依赖\n安装项目所需的 Python 包。为了获得更快的下载速度，国内用户推荐使用清华或阿里镜像源：\n\n```bash\n# 使用默认源\npip install -r requirements.txt\n\n# 【推荐】国内用户使用清华镜像源加速安装\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n> **注意**：部分 Atari 游戏环境（如 `PongNoFrameskip-v4`）需要额外安装 `atari-py` 和 ROM 文件。如果只需运行连续控制任务（如 `LunarLander`），可跳过此步。若需完整支持，请确保系统已安装 `swig` 和 `cmake`。\n\n## 基本使用\n\n该库通过配置文件和命令行脚本来运行算法。以下以在 `LunarLanderContinuous-v2` 环境中训练 **SAC (Soft Actor-Critic)** 算法为例。\n\n### 1. 查看可用配置\n算法的具体超参数和环境设置在 `configs` 目录下。例如，SAC 的配置通常位于 `configs\u002Flunarlander_continuous_v2\u002Fsac.yaml` (具体文件名请以实际目录结构为准)。\n\n### 2. 运行训练\n使用提供的训练脚本启动实验。通常命令格式为 `python train.py --algo \u003C算法名> --env \u003C环境名>` 或加载特定配置文件。\n\n根据该项目的典型用法，运行 SAC 算法的示例命令如下：\n\n```bash\n# 进入项目根目录后执行\npython run.py --algo sac --env LunarLanderContinuous-v2\n```\n\n或者，如果项目指定了具体的配置文件路径（参考 README 中的 configs 结构）：\n\n```bash\n# 示例：加载特定配置文件运行 (具体脚本名可能为 train.py 或 run.py，请以根目录文件为准)\npython train.py --config configs\u002Flunarlander_continuous_v2\u002Fsac.yaml\n```\n\n### 3. 监控训练过程\n该项目集成了 **Weights & Biases (WandB)** 用于可视化训练曲线。\n*   运行前请确保已登录 WandB：`wandb login`\n*   训练开始后，终端会输出一个 URL，点击即可在浏览器中实时查看奖励曲线、损失函数等指标。\n\n### 4. 支持的其他算法\n你可以轻松切换算法名称来尝试其他模型，例如：\n\n```bash\n# 运行 PPO 算法\npython run.py --algo ppo --env LunarLanderContinuous-v2\n\n# 运行 Rainbow DQN (适用于 Atari 环境)\npython run.py --algo dqn --env PongNoFrameskip-v4\n```\n\n支持的算法列表包括：A2C, DDPG, PPO, TD3, SAC, BC, Rainbow DQN\u002FIQN, R2D1, Ape-X 等。","某自动驾驶初创公司的算法团队正在研发基于强化学习的车辆路径规划系统，需要快速验证多种主流 RL 算法在复杂路况下的表现。\n\n### 没有 rl_algorithms 时\n- 研究人员需从零手写 DQN、SAC、PPO 等算法的核心逻辑，代码重复率高且极易引入难以排查的数学公式错误。\n- 不同算法的代码风格迥异，缺乏统一的结构化设计，导致团队成员间协作困难，新成员上手成本极高。\n- 每次切换实验算法都需要重构大量数据交互接口，无法灵活对比不同模型在相同环境下的性能差异。\n- 缺乏经过工业界验证的基准实现，难以判断是算法本身失效还是代码实现存在缺陷，严重拖慢研发进度。\n\n### 使用 rl_algorithms 后\n- 直接调用库中结构化封装好的 DQN、SAC 等关键算法，无需重复造轮子，将核心精力集中于场景建模与奖励函数设计。\n- 依托统一的类图架构和规范的代码风格（Black 格式化），团队成员可无缝接手彼此的工作，显著降低沟通与维护成本。\n- 通过标准化的接口轻松切换不同代理（Agent），在同一仿真环境中快速完成多算法性能横向对比，加速选型决策。\n- 基于 Medipixel 研究活动验证过的可靠实现，确保了算法逻辑的正确性，让实验结果更具说服力，大幅缩短从理论到落地的周期。\n\nrl_algorithms 通过提供高质量、结构化的强化学习算法实现，将研发团队从繁琐的基础编码中解放出来，使其能专注于解决具体的业务难题。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmedipixel_rl_algorithms_1412bfa5.png","medipixel","Medipixel","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmedipixel_e375c064.png","Medipixel is building medical devices powered by artificial intelligence. Medipixel has specialty in coronary artery diagnosis, surgery robot manipulation, etc.","Medipixel, Inc.","Seoul","contact@medipixel.io",null,"http:\u002F\u002Fwww.medipixel.io","https:\u002F\u002Fgithub.com\u002Fmedipixel",[86,90,94,98],{"name":87,"color":88,"percentage":89},"Python","#3572A5",99,{"name":91,"color":92,"percentage":93},"Shell","#89e051",0.6,{"name":95,"color":96,"percentage":97},"Dockerfile","#384d54",0.2,{"name":99,"color":100,"percentage":97},"Makefile","#427819",516,64,"2026-02-20T12:35:15","MIT","未说明","未说明 (但提及 Ape-X 等分布式算法受计算能力限制，且涉及深度强化学习通常建议配备 GPU)",{"notes":108,"python":109,"dependencies":110},"该项目包含多种强化学习算法（如 DQN, PPO, SAC 等）。部分高级功能（如 Ape-X 分布式训练）需要多工作进程支持。性能测试数据基于特定的代码提交版本，可能不会频繁更新。建议使用 WandB 跟踪实验结果。","未说明 (徽章显示通过 Python 代码质量检查，暗示主要使用 Python)",[111],"未说明 (README 未列出具体的依赖库及版本，仅提及使用了 WandB 进行日志记录)",[13],[114,115,116,117,118,119,120],"reinforcement-learning","pytorch","gym","policy-gradient","deep-learning","dqn","python3","2026-03-27T02:49:30.150509","2026-04-06T11:56:42.023716",[124,129,134,139,144,149],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},19008,"为什么在训练 Rainbow DQN 时损失值会突然跳变到极大值然后归零，导致无法收敛？","这通常是由奖励信号不稳定引起的。特别是在使用 n-step 算法时，如果奖励变化过大（例如基于位置变化的奖励），会导致网络不稳定。建议尝试以下解决方案：\n1. 将 n-step 设置为 1 (n_step = 1)。\n2. 对奖励进行裁剪（例如限制在 0.1）。\n3. 调整超参数：尝试更大的网络结构（如 ResNet）、奖励缩放、状态预处理（调整大小、灰度化）、修改缓冲区大小、更新起始步数和批次大小。\n4. 注意不同环境（如 gym-super-mario-bros 与 retro gym）可能需要不同的参数配置。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F270",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},19009,"项目是否提供预训练模型权重（特别是 Pong 环境的 DQN）？","目前仓库中未直接提供预训练模型权重的下载链接。维护者建议用户参考相关实现代码自行训练，或者关注社区分享的研究成果。如果有特定需求，可以在 Issue 中询问维护者是否有计划发布。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F170",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},19010,"如何在正确的 Python 版本下安装依赖并运行项目？遇到 NumPy 版本混淆或 wandb 报错怎么办？","该项目需要使用 Python 3.6.1 或更高版本。如果遇到依赖问题或 wandb 报错，请按以下步骤操作：\n1. 创建虚拟环境：`conda create -n rl_algorithms python=3.6.1`\n2. 克隆仓库并安装依赖：`make dep`\n3. 运行示例：`python run_pong_no_frameskip_v4.py --algo dqn --off-render`\n4. 如果使用 wandb，需先注册账号，获取 API Key 并登录：`wandb login API_KEY`，然后初始化 `wandb init`。\n注意：旧版 wandb 可能依赖仅支持 Python 2 的 pynvml，请确保安装兼容 Python 3 的版本。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F162",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},19011,"该算法是否支持除 Pong 以外的其他 Atari 环境（如 Assault）？为什么在其他环境中表现不佳？","虽然项目主要验证了 Pong 环境，但算法理论上适用于其他 Atari 环境。如果在其他环境（如 Assault）中表现不佳（如奖励接近随机），通常是因为未针对该环境调整超参数。建议：\n1. 根据环境的奖励尺度调整 Replay Buffer 参数。\n2. 如果使用 C51，需设置 v_min, v_max, atom_size。\n3. 如果不使用 NoisyNet，需仔细调整 epsilon 探索参数。\n4. 针对不同机器和环境调整回放缓冲区大小。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F305",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},19012,"在使用 PER (Prioritized Experience Replay) 时遇到 'assert priority > 0' 错误是什么原因？","该错误通常发生在损失值（loss）变为负数且绝对值大于 `per_eps` 时。因为优先级计算依赖于损失值，当损失小于 `-per_eps`（例如设置为 1e-6 时损失小于 -1e-6）会导致优先级计算为非正数，从而触发断言错误。这在使用 n-step 回报时较常见。解决方法包括检查损失计算逻辑，确保不会出现异常的负大值，或者适当调整 `per_eps` 的值以增加容错性。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F191",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},19013,"在 SAC 算法中，为什么 alpha 参数要在对数空间（log space）中进行更新？","在对数空间更新 alpha 是为了保证数值稳定性和约束 alpha 始终为正数。通过优化 `log_alpha` 并使用 `alpha = log_alpha.exp()` 还原，可以避免 alpha 在梯度下降过程中变为负数或零，从而确保熵正则化项的有效性。这种做法在整个训练过程中通常更加稳定。","https:\u002F\u002Fgithub.com\u002Fmedipixel\u002Frl_algorithms\u002Fissues\u002F171",[155,160],{"id":156,"version":157,"summary_zh":158,"released_at":159},117071,"v1.2.0","# rl_algorithms 1.2.0 发行说明\n\n\n# 亮点\n-  :grin: 大家好！我们很高兴地发布 rl_algorithms v1.2.0。\n- :tada: 本次发布包含了基于 GAIL 的算法，并支持 LunarLanderContinuous-v2 环境。\n- 🛠️ 对连续动作空间的 PPO 算法进行了优化。\n\n## 新特性\n- GAIL 算法 (#315)\n- tanh 激活函数 (#317)\n\n## 改进\n- PPO 算法 (#312)\n\n## 修复\n- 更新 black 版本。(#313)\n","2021-08-23T07:43:34",{"id":161,"version":162,"summary_zh":163,"released_at":164},117072,"v1.0.0.bibtex","用于生成 BibTeX 引用的版本。\n与 v1.0.0 完全相同。","2021-02-18T05:58:58"]