01 / 技能介绍
Skill 介绍
这是一个面向General场景的可复用技能,主要用于完成“使用 TensorFlow.js 在单个 HTML 文件中构建 DDQN 贪吃蛇游戏”相关任务。它会根据用户提供的上下文、受众和约束,把需求整理成结构清晰、可以继续编辑和使用的结果。
触发说明
当用户需要上述工作流,尤其是希望获得结构化、可复用结果而不是一次性回答时,使用这个技能。这是一个面向General场景的可复用技能,主要用于完成“使用 TensorFlow.js 在单个 HTML 文件中构建 DDQN 贪吃蛇游戏”相关任务。它会根据用户提供的上下文、受众和约束,把需求整理成结构清晰、可以继续编辑和使用的结果。
01渐进式披露
先读元数据,再按需读取正文和捆绑资源。
02可评估迭代
用正向、负向测试和用户反馈推动下一轮改进。
03清晰输出
明确输入、输出、依赖和成功标准,减少不可控结果。
02 / 技能文件
Skill 文件
Act as a TensorFlow.js expert. You are tasked with building a Deep Q-Network (DDQN) based Snake game using the latest TensorFlow.js API, all within a single HTML file.
Your task is to:
1. Set up the HTML structure to include TensorFlow.js and other necessary libraries.
2. Implement the Snake game logic using JavaScript, ensuring the game is fully playable.
3. Use a Double DQN approach to train the AI to play the Snake game.
4. Ensure the game can be played and trained directly within a web browser.
You will:
- Use TensorFlow.js's latest API features.
- Implement the game logic and AI in a single, self-contained HTML file.
- Ensure the code is efficient and well-documented.
Rules:
- The entire implementation must be contained within one HTML file.
- Use variables like ${canvasWidth:400}, ${canvasHeight:400} for configurable options.
- Provide comments and documentation within the code to explain the logic and TensorFlow.js usage.以下内容用于在线预览;复制后可以在本地技能目录中继续编辑。
YAML FRONTMATTER技能元数据
name使用 TensorFlow.js 在单个 HTML 文件中构建 DDQN 贪吃蛇游戏description当用户需要上述工作流,尤其是希望获得结构化、可复用结果而不是一次性回答时,使用这个技能。这是一个面向General场景的可复用技能,主要用于完成“使用 TensorFlow.js 在单个 HTML 文件中构建 DDQN 贪吃蛇游戏”相关任务。它会根据用户提供的上下文、受众和约束,把需求整理成结构清晰、可以继续编辑和使用的结果。03 / 使用方法
如何使用
- 01步骤 1
先阅读触发描述,判断当前需求处于创建、评估还是改进阶段。
- 02步骤 2
打开 SKILL.md,确认输入、输出格式和依赖资源。
- 03步骤 3
用现实的正向与负向提示进行小规模测试。
- 04步骤 4
根据用户反馈和评估结果迭代描述与正文。
04 / 交流反馈
交流与反馈
暂无条反馈记录
返回技能中心反馈入口用于持续核对技能触发、输出质量和维护状态。