Global AI chat room · 14 online now Join now
B
SKILL Listed

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

A reusable General skill centered on Build a DDQN Snake Game with TensorFlow.js in a Single HTML File. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.

[email protected]GeneralGeneral
4.1Rating
41Uses
—Feedback
01 / SKILL INTRODUCTION

About this skill

A reusable General skill centered on Build a DDQN Snake Game with TensorFlow.js in a Single HTML File. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.

TRIGGER DESCRIPTION

Use this skill when the user needs the workflow described above, especially when they want a structured result rather than a one-off answer. A reusable General skill centered on Build a DDQN Snake Game with TensorFlow.js in a Single HTML File. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.

01Progressive disclosure

Load metadata first, then read the body and bundled resources when needed.

02Evaluable iteration

Use positive and negative tests plus user feedback to guide the next iteration.

03Clear output contract

Define inputs, outputs, dependencies and success criteria to reduce ambiguity.

02 / SKILL FILES

Skill files

SKILL.mdMarkdown · — · Previewable
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.
This is an online preview. Copy it and continue editing in your local skill directory.
YAML FRONTMATTERSkill metadata
nameBuild a DDQN Snake Game with TensorFlow.js in a Single HTML File
descriptionUse this skill when the user needs the workflow described above, especially when they want a structured result rather than a one-off answer. A reusable General skill centered on Build a DDQN Snake Game with TensorFlow.js in a Single HTML File. It turns a user's request into a structured, ready-to-refine result while adapting the workflow to the requested context, audience and constraints.
03 / WORKFLOW

How to use

  1. 01
    Step 1

    Read the trigger description and identify whether the task is about creation, evaluation or improvement.

  2. 02
    Step 2

    Open SKILL.md and confirm the input, output and bundled resource requirements.

  3. 03
    Step 3

    Run a small test set with realistic positive and negative prompts.

  4. 04
    Step 4

    Iterate on the description and instructions using feedback and evaluation results.

04 / DISCUSSIONS

Discussions and feedback

—feedback records

Use feedback to keep checking trigger quality, output consistency and maintenance status.

Back to skills
Email