写作生成文字进阶
Build a DDQN Snake Game with TensorFlow.js in a Single HTML File
来自 prompts.chat 的提示词:Build a DDQN Snake Game with TensorFlow.js in a Single HTML File
提示词正文
复制后可直接粘贴到模型或内部评测工具。
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:
- Set up the HTML structure to include TensorFlow.js and other necessary libraries.
- Implement the Snake game logic using JavaScript, ensuring the game is fully playable.
- Use a Double DQN approach to train the AI to play the Snake game.
- 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.
使用场景
同步入库后可继续人工润色
参考输出
暂无标准答案,建议按评分维度人工评审。
评分维度
重点评估可执行性、事实准确性、边界控制和结构完整度。
试用与模板
填写变量后复制,或保存到个人工作台模板。
这个模板没有变量,可直接复制使用。
用户评分
0 个评分-
你的评分
登录后评分
评论
0登录后评论