Build a DDQN Snake Game with TensorFlow.js in a Single HTML File

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.

chatgpt TEXT niels@wwx.be

स्किल

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.

इसे कैसे लगाएं

ChatGPT

1. Open Explore GPTs → Create, or start a new Project.
2. Paste the text below into Instructions.
3. Give it a name and, if the skill needs files, attach them under
   Knowledge.

For one-off use, paste the same text as your first message instead —
it works, but it is re-sent with every turn and costs context.

क्या यह आपके काम आई?

यह कहाँ से आई

prompts.chat contributors CC0-1.0 मूल