Prompt to Prompt: DDQN Snake Game with TensorFlow.js
Prompt to Prompt: DDQN Snake Game with TensorFlow.js is a verified PROMPT blueprint on Promptally in System & Base Contexts optimized for leading AI models. Curated Coding prompt from awesome-prompts library split. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | PROMPT (System & Base Contexts) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 236 |
| Source file | prompt-prompt-ddqn-snake-game-with-tensorflow-js.txt |
| Access tier | Free public (MIT) |
Pre-Filled Template
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.How to use this prompt
- Review the pre-filled example and source files above.
- Copy the template or download
prompt-prompt-ddqn-snake-game-with-tensorflow-js.txt, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use Prompt to Prompt: DDQN Snake Game with TensorFlow.js?
Open the prompt on Promptally, review the pre-filled example, then copy the template or download prompt-prompt-ddqn-snake-game-with-tensorflow-js.txt and paste it into your model, IDE or workflow tool. Prompt to Prompt: DDQN Snake Game with TensorFlow.js is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is Prompt to Prompt: DDQN Snake Game with TensorFlow.js free?
Yes. Prompt to Prompt: DDQN Snake Game with TensorFlow.js is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does Prompt to Prompt: DDQN Snake Game with TensorFlow.js need?
Prompt to Prompt: DDQN Snake Game with TensorFlow.js is a static blueprint with no dynamic variables. Copy it and use it as-is.