[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--TextWorld":3,"tool-microsoft--TextWorld":62},[4,18,26,36,46,54],{"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 真正成长为懂上",160411,2,"2026-04-18T23:33:24",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"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",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":112,"forks":113,"last_commit_at":114,"license":115,"difficulty_score":32,"env_os":116,"env_gpu":117,"env_ram":117,"env_deps":118,"category_tags":128,"github_topics":130,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":134,"updated_at":135,"faqs":136,"releases":166},9449,"microsoft\u002FTextWorld","TextWorld","​TextWorld is a sandbox learning environment for the training and evaluation of reinforcement learning (RL) agents on text-based games.","TextWorld 是一个专为训练和评估强化学习（RL）智能体而设计的文本游戏沙盒环境。它核心解决了人工智能研究中缺乏标准化、可定制测试场景的难题，让研究人员无需手动编写复杂的游戏逻辑，即可快速生成大量用于算法验证的文本冒险游戏。\n\n这款工具非常适合 AI 研究人员、开发者以及对学生使用。通过简单的命令行指令，用户就能灵活定制游戏世界的规模、物体数量及任务长度，创造出从简单到高难度的多样化训练场景。除了作为游戏生成器，TextWorld 还提供了强大的可视化功能，能够直观展示游戏状态和逻辑图谱，帮助开发者调试和分析智能体的决策过程。\n\n其独特的技术亮点在于高度的可扩展性与跨平台支持（兼容 Linux、macOS 及 Docker 环境），并内置了丰富的 API 接口，方便用户将生成的游戏无缝接入现有的强化学习框架中。无论是用于探索自然语言处理与决策结合的学术前沿，还是作为教学演示工具，TextWorld 都能提供一个稳定且高效的实验平台，助力推动智能体在复杂文本环境中的认知能力发展。","# TextWorld\n\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftextworld.svg?logo=pypi&label=PyPI&logoColor=gold)](https:\u002F\u002Fpypi.org\u002Fproject\u002Ftextworld)\n[![PyPI - Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Ftextworld.svg?logo=python&label=Python&logoColor=gold)](https:\u002F\u002Fpypi.org\u002Fproject\u002Ftextworld\u002F)\n[![Build Status](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_TextWorld_readme_3323fe13e747.png)](https:\u002F\u002Fdev.azure.com\u002Fmaluuba\u002FTextWorld\u002F_build\u002Flatest?definitionId=180&branchName=main)\n[![Documentation Status](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_TextWorld_readme_13d664e1afd7.png)](https:\u002F\u002Ftextworld.readthedocs.io\u002Fen\u002Fstable\u002F?badge=stable)\n[![Join the chat at https:\u002F\u002Fgitter.im\u002FMicrosoft\u002FTextWorld](https:\u002F\u002Fbadges.gitter.im\u002FMicrosoft\u002FTextWorld.svg)](https:\u002F\u002Fgitter.im\u002FMicrosoft\u002FTextWorld?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nA text-based game generator and extensible sandbox learning environment for training and testing reinforcement learning (RL) agents. Also check out [aka.ms\u002Ftextworld](https:\u002F\u002Faka.ms\u002Ftextworld\u002F) for more info about TextWorld and its creators. Have questions or feedback about TextWorld? Send them to textworld@microsoft.com or use the Gitter channel listed above.\n\n## Installation\n\nTextWorld supports __Python 3.9\u002F3.10\u002F3.11\u002F3.12__ for __Linux__ and __macOS__ systems only at the moment. For __Windows__ users, docker can be used as a workaround (see Docker section below).\n\n### Requirements\n\nTextWorld requires some system libraries for its native components.\nOn a Debian\u002FUbuntu-based system, these can be installed with\n\n    sudo apt update && sudo apt install build-essential libffi-dev python3-dev curl git\n\nAnd on macOS, with\n\n    brew install libffi curl git\n\n> **Note:** We advise our users to use virtual environments to avoid Python packages from different projects to interfere with each other. Popular choices are [Conda Environments](https:\u002F\u002Fconda.io\u002Fprojects\u002Fconda\u002Fen\u002Flatest\u002Fuser-guide\u002Ftasks\u002Fmanage-environments.html) and [Virtualenv](https:\u002F\u002Fvirtualenv.pypa.io\u002Fen\u002Fstable\u002F)\n\n### Installing TextWorld\n\nThe easiest way to install TextWorld is via [`pip`](https:\u002F\u002Fpypi.org\u002F):\n\n    pip install textworld\n\nOr, after cloning the repo, go inside the root folder of the project (i.e. alongside `setup.py`) and run\n\n    pip install .\n\n#### Visualization\n\nTextWorld comes with some tools to visualize game states. Make sure all dependencies are installed by running\n\n    pip install textworld[vis]\n\nThen, you will need to install either the [Chrome](https:\u002F\u002Fsites.google.com\u002Fa\u002Fchromium.org\u002Fchromedriver\u002F) or [Firefox](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fgeckodriver) webdriver (depending on which browser you have currently installed).\nIf you have Chrome already installed you can use the following command to install chromedriver\n\n    pip install chromedriver_installer\n\nCurrent visualization tools include: `take_screenshot`, `visualize` and `show_graph` from [`textworld.render`](https:\u002F\u002Ftextworld.readthedocs.io\u002Fen\u002Flatest\u002Ftextworld.render.html).\n\n### Docker\n\nA docker container with the latest TextWorld release is available on [DockerHub](https:\u002F\u002Fhub.docker.com\u002F).\n\n    docker pull marccote19\u002Ftextworld\n    docker run -p 8888:8888 -it --rm marccote19\u002Ftextworld\n\nThen, in your browser, navigate to the Jupyter notebook's link displayed in your terminal. The link should look like this\n\n    http:\u002F\u002F127.0.0.1:8888\u002F?token=8d7aaa...e95\n\n> **Note:** See [README.md](docker\u002FREADME.md) in the docker folder for troubleshooting information.\n\n## Usage\n\n### Generating a game\n\nTextWorld provides an easy way of generating simple text-based games via the `tw-make` script. For instance,\n\n    tw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games\u002Fcustom_game.z8\n\nwhere `custom` indicates we want to customize the game using the following options: `--world-size` controls the number of rooms in the world, `--nb-objects` controls the number of objects that can be interacted with (excluding doors) and `--quest-length` controls the minimum number of commands that is required to type in order to win the game. Once done, the game `custom_game.z8` will be saved in the `tw_games\u002F` folder.\n\n### Playing a game (terminal)\n\nTo play a game, one can use the `tw-play` script. For instance, the command to play the game generated in the previous section would be\n\n    tw-play tw_games\u002Fcustom_game.z8\n\n> **Note:** Only Z-machine's games (*.z1 through *.z8) are supported.\n\nTo visualize the game state while playing, use the `--viewer [port]` option.\n\n    tw-play tw_games\u002Fcustom_game.z8 --viewer\n\nA new browser tab should open and track your progress in the game.\n\n### Playing a game (Python + [Gym](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgym)-like API)\n\nHere's how you can interact with a text-based game from within Python using a Gym-like API.\n\n```python\nimport textworld.gym\n\n# Register a text-based game as a new environment.\nenv_id = textworld.gym.register_game(\"tw_games\u002Fcustom_game.z8\",\n                                     max_episode_steps=50)\n\nenv = textworld.gym.make(env_id)  # Start the environment.\n\nobs, infos = env.reset()  # Start new episode.\nenv.render()\n\nscore, moves, done = 0, 0, False\nwhile not done:\n    command = input(\"> \")\n    obs, score, done, infos = env.step(command)\n    env.render()\n    moves += 1\n\nenv.close()\nprint(\"moves: {}; score: {}\".format(moves, score))\n```\n\n> **Note:** To play text-based games without a Gym-like API, see [Playing text-based games with TextWorld.ipynb](notebooks\u002FPlaying%20text-based%20games%20with%20TextWorld.ipynb)\n\n## Documentation\n\nFor more information about TextWorld, check the [documentation](https:\u002F\u002Faka.ms\u002Ftextworld-docs).\n\n## Visual Studio Code\n\nYou can install the [textworld-vscode extension ](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=textworld.textworld-vscode) that enables syntax highlighting for editing `.twl` and `.twg` TextWorld files.\n\n## Notebooks\n\nCheck the [notebooks](notebooks) provided with the framework to see what you can do with it. You will need the [Jupyter Notebook](https:\u002F\u002Fjupyter.org\u002Finstall) to run them. You can install it with\n\n    pip install jupyter\n\n## Citing TextWorld\n\nIf you use TextWorld, please cite the following BibTex:\n\n```text\n@Article{cote18textworld,\n  author = {Marc-Alexandre C\\^ot\\'e and\n            \\'Akos K\\'ad\\'ar and\n            Xingdi Yuan and\n            Ben Kybartas and\n            Tavian Barnes and\n            Emery Fine and\n            James Moore and\n            Ruo Yu Tao and\n            Matthew Hausknecht and\n            Layla El Asri and\n            Mahmoud Adada and\n            Wendy Tay and\n            Adam Trischler},\n  title = {TextWorld: A Learning Environment for Text-based Games},\n  journal = {CoRR},\n  volume = {abs\u002F1806.11532},\n  year = {2018}\n}\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https:\u002F\u002Fcla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F).\nFor more information see the [Code of Conduct FAQ](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## License\n\n- [TextWorld](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld) - MIT License\n- [Inform7](https:\u002F\u002Fgithub.com\u002Fganelson\u002Finform) - Artistic License 2.0\n- [Jericho](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fjericho) - GNU General Public License (GPL) v2.0\n- [Fast Downward](https:\u002F\u002Fgithub.com\u002FMarcCote\u002Fdownward) - GNU General Public License (GPL) v3.0\n- [Git](https:\u002F\u002Fgithub.com\u002FDavidKinder\u002FGit) - MIT License\n","# TextWorld\n\n[![PyPI版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ftextworld.svg?logo=pypi&label=PyPI&logoColor=gold)](https:\u002F\u002Fpypi.org\u002Fproject\u002Ftextworld)\n[![PyPI - Python版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Ftextworld.svg?logo=python&label=Python&logoColor=gold)](https:\u002F\u002Fpypi.org\u002Fproject\u002Ftextworld\u002F)\n[![构建状态](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_TextWorld_readme_3323fe13e747.png)](https:\u002F\u002Fdev.azure.com\u002Fmaluuba\u002FTextWorld\u002F_build\u002Flatest?definitionId=180&branchName=main)\n[![文档状态](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_TextWorld_readme_13d664e1afd7.png)](https:\u002F\u002Ftextworld.readthedocs.io\u002Fen\u002Fstable\u002F?badge=stable)\n[![加入聊天：https:\u002F\u002Fgitter.im\u002FMicrosoft\u002FTextWorld](https:\u002F\u002Fbadges.gitter.im\u002FMicrosoft\u002FTextWorld.svg)](https:\u002F\u002Fgitter.im\u002FMicrosoft\u002FTextWorld?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n一个基于文本的游戏生成器，同时也是一个可扩展的沙盒学习环境，用于训练和测试强化学习（RL）智能体。更多关于TextWorld及其创建者的信息，请访问 [aka.ms\u002Ftextworld](https:\u002F\u002Faka.ms\u002Ftextworld\u002F)。如果您对TextWorld有任何疑问或反馈，请发送至 textworld@microsoft.com 或使用上方列出的Gitter频道。\n\n## 安装\n\n目前，TextWorld仅支持在__Linux__和__macOS__系统上运行__Python 3.9\u002F3.10\u002F3.11\u002F3.12__。对于__Windows__用户，可以使用Docker作为替代方案（详见下方的Docker部分）。\n\n### 要求\n\nTextWorld的原生组件需要一些系统库的支持。在基于Debian\u002FUbuntu的系统上，可以通过以下命令安装这些依赖：\n\n    sudo apt update && sudo apt install build-essential libffi-dev python3-dev curl git\n\n而在macOS上，则可以使用以下命令：\n\n    brew install libffi curl git\n\n> **注意:** 我们建议用户使用虚拟环境，以避免不同项目中的Python包相互干扰。常用的工具有[Conda Environments](https:\u002F\u002Fconda.io\u002Fprojects\u002Fconda\u002Fen\u002Flatest\u002Fuser-guide\u002Ftasks\u002Fmanage-environments.html)和[Virtualenv](https:\u002F\u002Fvirtualenv.pypa.io\u002Fen\u002Fstable\u002F)。\n\n### 安装TextWorld\n\n安装TextWorld最简单的方式是通过[`pip`](https:\u002F\u002Fpypi.org\u002F)：\n\n    pip install textworld\n\n或者，在克隆仓库后，进入项目的根目录（即`setup.py`所在的目录），然后运行：\n\n    pip install .\n\n#### 可视化\n\nTextWorld自带了一些用于可视化游戏状态的工具。请确保所有依赖项都已安装，运行以下命令：\n\n    pip install textworld[vis]\n\n随后，您还需要安装[Chrome](https:\u002F\u002Fsites.google.com\u002Fa\u002Fchromium.org\u002Fchromedriver\u002F)或[Firefox](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fgeckodriver)的WebDriver（取决于您当前安装的浏览器）。如果您已经安装了Chrome，可以使用以下命令安装chromedriver：\n\n    pip install chromedriver_installer\n\n当前可用的可视化工具包括：`textworld.render`模块中的`take_screenshot`、`visualize`和`show_graph`。\n\n### Docker\n\n最新版本的TextWorld容器已在[DockerHub](https:\u002F\u002Fhub.docker.com\u002F)上发布。\n\n    docker pull marccote19\u002Ftextworld\n    docker run -p 8888:8888 -it --rm marccote19\u002Ftextworld\n\n然后，在您的浏览器中打开终端显示的Jupyter Notebook链接。该链接应类似于：\n\n    http:\u002F\u002F127.0.0.1:8888\u002F?token=8d7aaa...e95\n\n> **注意:** 有关故障排除信息，请参阅docker文件夹中的[README.md](docker\u002FREADME.md)。\n\n## 使用\n\n### 生成游戏\n\nTextWorld提供了一个简单的脚本`tw-make`来生成基于文本的小型游戏。例如：\n\n    tw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games\u002Fcustom_game.z8\n\n其中，`custom`表示我们将使用以下选项自定义游戏：`--world-size`控制世界中的房间数量，`--nb-objects`控制可交互对象的数量（不包括门），而`--quest-length`则控制赢得游戏所需的最少指令数。完成后，游戏`custom_game.z8`将被保存到`tw_games\u002F`文件夹中。\n\n### 玩游戏（终端）\n\n要玩游戏，可以使用`tw-play`脚本。例如，运行上一节生成的游戏的命令如下：\n\n    tw-play tw_games\u002Fcustom_game.z8\n\n> **注意:** 目前仅支持Z-machine格式的游戏（*.z1至*.z8）。\n\n在游戏过程中，若想可视化游戏状态，可以使用`--viewer [port]`选项。\n\n    tw-play tw_games\u002Fcustom_game.z8 --viewer\n\n此时会打开一个新的浏览器标签页，实时跟踪您的游戏进度。\n\n### 玩游戏（Python + 类似Gym的API）\n\n以下是使用类似Gym的API从Python内部与基于文本的游戏交互的方法。\n\n```python\nimport textworld.gym\n\n# 将一个基于文本的游戏注册为新的环境。\nenv_id = textworld.gym.register_game(\"tw_games\u002Fcustom_game.z8\",\n                                     max_episode_steps=50)\n\nenv = textworld.gym.make(env_id)  # 启动环境。\n\nobs, infos = env.reset()  # 开始新回合。\nenv.render()\n\nscore, moves, done = 0, 0, False\nwhile not done:\n    command = input(\"> \")\n    obs, score, done, infos = env.step(command)\n    env.render()\n    moves += 1\n\nenv.close()\nprint(\"moves: {}; score: {}\".format(moves, score))\n```\n\n> **注意:** 如果您希望在没有类似Gym的API的情况下玩基于文本的游戏，请参阅[Playing text-based games with TextWorld.ipynb](notebooks\u002FPlaying%20text-based%20games%20with%20TextWorld.ipynb)。\n\n## 文档\n\n有关TextWorld的更多信息，请查阅[文档](https:\u002F\u002Faka.ms\u002Ftextworld-docs)。\n\n## Visual Studio Code\n\n您可以安装[textworld-vscode扩展](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=textworld.textworld-vscode)，它支持`.twl`和`.twg` TextWorld文件的语法高亮显示。\n\n## 笔记本\n\n请查看框架附带的[笔记本](notebooks)，了解其功能。运行这些笔记本需要[Jupyter Notebook](https:\u002F\u002Fjupyter.org\u002Finstall)，您可以通过以下命令安装：\n\n    pip install jupyter\n\n## 引用TextWorld\n\n如果您使用了TextWorld，请引用以下BibTex条目：\n\n```text\n@Article{cote18textworld,\n  author = {Marc-Alexandre C\\^ot\\'e and\n            \\'Akos K\\'ad\\'ar and\n            Xingdi Yuan and\n            Ben Kybartas and\n            Tavian Barnes and\n            Emery Fine and\n            James Moore and\n            Ruo Yu Tao and\n            Matthew Hausknecht and\n            Layla El Asri and\n            Mahmoud Adada and\n            Wendy Tay and\n            Adam Trischler},\n  title = {TextWorld: A Learning Environment for Text-based Games},\n  journal = {CoRR},\n  volume = {abs\u002F1806.11532},\n  year = {2018}\n}\n```\n\n## 贡献\n\n本项目欢迎贡献和建议。大多数贡献都需要您签署一份贡献者许可协议（CLA），声明您有权且确实将您的贡献使用权授予我们。有关详细信息，请访问 https:\u002F\u002Fcla.microsoft.com。\n\n当您提交拉取请求时，CLA 机器人会自动判断您是否需要提供 CLA，并相应地为 PR 添加标记或评论。请按照机器人提供的指示操作。对于使用我们 CLA 的所有仓库，您只需执行此操作一次。\n\n本项目已采用 [微软开源行为准则](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F)。如需更多信息，请参阅 [行为准则常见问题解答](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F)，或通过电子邮件 [opencode@microsoft.com](mailto:opencode@microsoft.com) 联系我们，提出任何其他问题或意见。\n\n## 许可证\n\n- [TextWorld](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld) - MIT 许可证\n- [Inform7](https:\u002F\u002Fgithub.com\u002Fganelson\u002Finform) - 艺术家许可证 2.0\n- [Jericho](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fjericho) - GNU 通用公共许可证 (GPL) v2.0\n- [Fast Downward](https:\u002F\u002Fgithub.com\u002FMarcCote\u002Fdownward) - GNU 通用公共许可证 (GPL) v3.0\n- [Git](https:\u002F\u002Fgithub.com\u002FDavidKinder\u002FGit) - MIT 许可证","# TextWorld 快速上手指南\n\nTextWorld 是一个基于文本的游戏生成器和可扩展的沙盒学习环境，专为训练和测试强化学习（RL）智能体而设计。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**：仅支持 **Linux** 和 **macOS**。\n  - *Windows 用户请使用 Docker 方案（见安装部分）。*\n- **Python 版本**：3.9 \u002F 3.10 \u002F 3.11 \u002F 3.12\n- **建议**：推荐使用虚拟环境（如 Conda 或 Virtualenv）以避免依赖冲突。\n\n### 前置依赖\n在安装 TextWorld 之前，请先安装必要的系统库：\n\n**Debian\u002FUbuntu 系统：**\n```bash\nsudo apt update && sudo apt install build-essential libffi-dev python3-dev curl git\n```\n\n**macOS 系统：**\n```bash\nbrew install libffi curl git\n```\n\n## 安装步骤\n\n### 1. 基础安装\n通过 `pip` 安装是最便捷的方式：\n```bash\npip install textworld\n```\n*(注：国内用户可添加 `-i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple` 使用清华镜像源加速)*\n\n若已从 GitHub 克隆仓库，可在项目根目录运行：\n```bash\npip install .\n```\n\n### 2. 可选：可视化组件\n若需使用游戏状态可视化工具，请安装额外依赖：\n```bash\npip install textworld[vis]\n```\n随后需根据本地浏览器安装对应的 WebDriver：\n- **Chrome 用户**：\n  ```bash\n  pip install chromedriver_installer\n  ```\n- **Firefox 用户**：请手动下载并配置 [geckodriver](https:\u002F\u002Fgithub.com\u002Fmozilla\u002Fgeckodriver)。\n\n### 3. 可选：Docker 方案（适用于 Windows 或隔离环境）\n```bash\ndocker pull marccote19\u002Ftextworld\ndocker run -p 8888:8888 -it --rm marccote19\u002Ftextworld\n```\n运行后，在浏览器中访问终端显示的 Jupyter Notebook 链接（例如 `http:\u002F\u002F127.0.0.1:8888\u002F?token=...`）即可开始使用。\n\n## 基本使用\n\n### 1. 生成游戏\n使用 `tw-make` 脚本快速生成一个自定义文本游戏。以下命令生成一个包含 5 个房间、10 个可交互物体且通关最少需要 5 步的游戏：\n\n```bash\ntw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games\u002Fcustom_game.z8\n```\n生成的游戏文件 `custom_game.z8` 将保存在 `tw_games\u002F` 目录下。\n\n### 2. 在终端玩游戏\n使用 `tw-play` 脚本直接体验生成的游戏：\n\n```bash\ntw-play tw_games\u002Fcustom_game.z8\n```\n\n若希望在浏览器中实时可视化游戏状态，可添加 `--viewer` 参数：\n```bash\ntw-play tw_games\u002Fcustom_game.z8 --viewer\n```\n\n### 3. 通过 Python 代码交互 (Gym API)\nTextWorld 提供了类似 OpenAI Gym 的接口，方便集成到强化学习流程中：\n\n```python\nimport textworld.gym\n\n# 注册游戏环境\nenv_id = textworld.gym.register_game(\"tw_games\u002Fcustom_game.z8\",\n                                     max_episode_steps=50)\n\nenv = textworld.gym.make(env_id)  # 启动环境\n\nobs, infos = env.reset()  # 开始新回合\nenv.render()\n\nscore, moves, done = 0, 0, False\nwhile not done:\n    command = input(\"> \")  # 输入指令\n    obs, score, done, infos = env.step(command)\n    env.render()\n    moves += 1\n\nenv.close()\nprint(\"moves: {}; score: {}\".format(moves, score))\n```","某高校人工智能实验室的研究团队正在开发一种能理解自然语言指令的强化学习智能体，旨在让其掌握复杂的逻辑推理能力。\n\n### 没有 TextWorld 时\n- 研究人员需手动编写大量文本冒险游戏剧本作为训练数据，耗时数周且难以保证逻辑严密性。\n- 现有开源游戏环境固定不变，智能体容易“死记硬背”特定地图答案，导致泛化能力极差，无法应对新场景。\n- 缺乏标准化的评估基准，不同团队开发的算法难以在统一难度和规则下进行公平的性能对比。\n- 调试过程如同黑盒，当智能体决策失败时，难以直观回溯是语言理解错误还是逻辑推理链条断裂。\n\n### 使用 TextWorld 后\n- 利用 `tw-make` 脚本一键生成成千上万个参数可配（如房间数量、物体交互逻辑）的随机游戏，将数据准备时间从数周缩短至几分钟。\n- 通过动态调整 `--world-size` 和 `--quest-length` 等参数，持续生成从未见过的新颖关卡，迫使智能体学习通用推理策略而非过拟合。\n- 依托其沙盒特性建立标准化评测集，团队能在严格控制变量（如词汇量、推理步数）的前提下，量化评估算法的真实进步。\n- 借助内置的可视化工具（如 `show_graph`），研究者能清晰看到游戏状态图谱与智能体决策路径，快速定位模型在哪个逻辑节点出错。\n\nTextWorld 将原本昂贵且静态的文本游戏构建过程转化为可编程、可扩展的自动化流水线，极大加速了语言驱动型强化学习算法的研发迭代。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_TextWorld_8a5d7cc3.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[83,87,91,95,98,102,105,109],{"name":84,"color":85,"percentage":86},"Jupyter Notebook","#DA5B0B",78.9,{"name":88,"color":89,"percentage":90},"Python","#3572A5",19.8,{"name":92,"color":93,"percentage":94},"JavaScript","#f1e05a",0.5,{"name":96,"color":97,"percentage":94},"PDDL","#0d00ff",{"name":99,"color":100,"percentage":101},"Shell","#89e051",0.1,{"name":103,"color":104,"percentage":101},"CSS","#663399",{"name":106,"color":107,"percentage":108},"Handlebars","#f7931e",0,{"name":110,"color":111,"percentage":108},"Dockerfile","#384d54",1403,194,"2026-04-18T17:49:25","NOASSERTION","Linux, macOS","未说明",{"notes":119,"python":120,"dependencies":121},"Windows 用户需使用 Docker 作为替代方案。建议用户使用虚拟环境（如 Conda 或 Virtualenv）以避免包冲突。若需使用可视化工具，需额外安装 Chrome 或 Firefox 的 WebDriver。","3.9, 3.10, 3.11, 3.12",[122,123,124,125,126,127],"build-essential (Linux)","libffi-dev (Linux)","python3-dev (Linux)","curl","git","chromedriver 或 geckodriver (可视化可选)",[14,13,129],"其他",[131,132,133],"text-based-game","reinforcement-learning","text-based-adventure","2026-03-27T02:49:30.150509","2026-04-19T15:46:30.900374",[137,142,147,152,157,161],{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},42385,"如何在 TextWorld 中获取游戏地图的结构化数据（如房间连接关系），而不仅仅是图片？","可以通过解析游戏的事实（facts）列表来获取地图信息，因为每个事实代表了实体之间的命名关系。此外，可以使用 `textworld.render.graph.show_graph` 函数来生成或查看图谱。具体的代码示例和用法请参考相关 Pull Request #189 中的文档字符串部分。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fissues\u002F187",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},42386,"在 Windows 上运行 TextWorld 测试时遇到 \"CDLL(None).dlclose\" 错误或内存问题怎么办？","这是由于 Jericho 依赖的底层库在 Windows 上的兼容性问题。一个临时的变通方法是手动释放库句柄。可以尝试在代码中添加以下逻辑：\n```python\nfrotz_handle = self.frotz_lib._handle\ndel self.frotz_lib\nctypes.windll.kernel32.FreeLibrary(frotz_handle)\n```\n注意：这只能解决部分测试问题，某些测试仍可能抛出大量内存错误。理论上，如果不使用 Jericho（仅使用 git-glulx），可以避免部分问题，或者在 Windows 环境下跳过相关测试。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fissues\u002F146",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},42387,"为什么我生成的游戏中，任务目标方向（如向南）与实际最优路径（如向北）不一致？","这是一个已知的 Bug，发生在系统尝试寻找解决游戏的“最优”轨迹以定义任务目标时。该 Bug 会导致玩家在满足子目标后被错误地带回起点。维护者已在相关 PR 中修复了此问题。如果您遇到此问题，请应用最新的补丁版本或合并相关的修复 PR。此外，目前代理必须在游戏结束前完成所有“子目标”，这一行为在未来版本中可能会改变。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fissues\u002F236",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},42388,"在 macOS (M1\u002FM2) 或新环境中安装 TextWorld 时遇到构建错误或依赖问题如何解决？","在 macOS 上安装时，确保先安装必要的系统依赖：`brew install libffi curl git`。如果遇到构建 wheel 失败（特别是涉及 `pyproject.toml` 配置警告或架构不匹配时），这通常是因为 M1\u002FM2 芯片的 arm64 架构支持问题或 setuptools 配置问题。建议检查是否有针对 macOS 修复的安装分支，或者等待官方发布包含修复的新版本。对于具体的构建错误，可能需要手动调整 `pyproject.toml` 将 `description` 等字段列为 `dynamic`，或直接使用源码安装并处理 C 扩展编译问题。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fissues\u002F130",{"id":158,"question_zh":159,"answer_zh":160,"source_url":151},42389,"使用 GameMaker 创建游戏时，为什么名为 'fridge' 或 'refrigerator' 的容器在游戏中无法被识别或名称被替换？","虽然该具体 Issue 的评论主要讨论了子目标和路径生成的 Bug，但此类对象名称被替换（如变为 'formless chest'）通常是因为游戏生成器未能正确将该对象链接到具体的物理模型或别名表中。确保在定义对象时不仅命名正确，还要明确其类型和属性。如果问题持续，检查是否触发了生成器的默认回退机制（当找不到特定匹配时）。*注：此问题的具体修复未在当前提供的评论片段中详细说明，但通常与对象定义的完整性有关。*",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},42390,"pip 安装 TextWorld 时出现 `subprocess-exited-with-error` 且报错关于 `pyproject.toml` 中 `description` 或 `authors` 定义无效怎么办？","这是因为新版本的 setuptools 对 `pyproject.toml` 的规范更严格。如果 `description` 或 `authors` 在文件外部定义，必须在 `pyproject.toml` 的 `[project]` 表中将它们列为 `dynamic`。解决方法是修改配置文件，添加 `dynamic = [\"description\", \"authors\"]`，或者移除 `[project]` 表完全依赖其他配置方式。如果是安装官方包遇到此问题，建议升级 pip 和 setuptools 到最新版，或直接从 GitHub 源码安装最新修复版。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fissues\u002F349",[167,172,177,181,185,189,193,197,202,206,210,214,218],{"id":168,"version":169,"summary_zh":170,"released_at":171},334470,"1.7.0","## 变更内容\n* 由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F371 中移除 glk\n* 由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F370 中更新 GitHub Actions\n* 由 @christopherzc 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F369 中为 inform7 后端添加了更严格的状态检查\n\n## 新贡献者\n* @christopherzc 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F369 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fcompare\u002F1.6.2...1.7.0","2026-01-30T18:11:09",{"id":173,"version":174,"summary_zh":175,"released_at":176},334471,"1.5.4","## 变更内容\n* 由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F311 中修复 macOS 的安装配置\n* 解决了 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fsecurity\u002Fdependabot\u002F1 的问题，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F309 中完成\n* 更新 ReadTheDocs 配置文件，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F313 中完成\n* 修复 Azure 预发布 YAML 文件，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F314 中完成\n* 在 Jericho 环境中获取可接受的命令列表，由 @robinbg 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F308 中实现\n* 移除 setup.py 中的 setup_require，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F315 中完成\n* 由于已在 setup_require 中指定，移除 requirements*.txt 中的 cffi，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F316 中完成\n* 修复 setup_require 遗漏的问题，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F317 中完成\n* 撤销关于 cffi 的更改，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F318 中完成\n* 安装预发布版本时使用 --pep517 参数，由 @MarcCote 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F319 中完成\n\n## 新贡献者\n* @robinbg 在 https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fpull\u002F308 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTextWorld\u002Fcompare\u002F1.5.3...1.5.4","2023-05-31T21:17:58",{"id":178,"version":179,"summary_zh":77,"released_at":180},334472,"1.5.3","2022-09-17T03:15:13",{"id":182,"version":183,"summary_zh":77,"released_at":184},334473,"1.5.0","2021-12-02T02:18:31",{"id":186,"version":187,"summary_zh":77,"released_at":188},334474,"1.4.0","2020-11-13T21:22:35",{"id":190,"version":191,"summary_zh":77,"released_at":192},334475,"1.3.3","2020-11-10T18:50:46",{"id":194,"version":195,"summary_zh":77,"released_at":196},334476,"1.3.2","2020-06-01T19:43:46",{"id":198,"version":199,"summary_zh":200,"released_at":201},334477,"1.3.1","添加对 macOS Catalina 的支持。","2020-04-08T01:10:27",{"id":203,"version":204,"summary_zh":77,"released_at":205},334478,"1.3.0","2020-03-20T03:58:14",{"id":207,"version":208,"summary_zh":77,"released_at":209},334479,"1.2.0","2020-02-13T05:46:42",{"id":211,"version":212,"summary_zh":77,"released_at":213},334480,"1.1.0","2019-02-08T14:19:00",{"id":215,"version":216,"summary_zh":77,"released_at":217},334481,"1.0.1","2019-02-08T14:18:42",{"id":219,"version":220,"summary_zh":77,"released_at":221},334482,"1.0.0","2018-12-08T15:51:46"]