AeroTools
Home AI Prompts Build a DDQN Snake Game with T...

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

chatgpt entertainment fun 1 uses
Free
ما فائدة هذا البرومبت؟

برومبت ذكي ومتخصص يساعدك على استغلال قدرات الذكاء الاصطناعي لتنفيذ المهام المعقدة بكفاءة واختصار الوقت.

أبرز حالات الاستخدام:
  • تنظيم سير العمل واختصار الوقت اليدوي
  • توليد أفكار وحلول مبتكرة للمشكلات اليومية
  • تبسيط المفاهيم الصعبة وتحليل البيانات المعقدة
الفوائد والنتائج:
  • تحقيق نتائج دقيقة ومخصصة بضغطة زر
  • تخطي عوائق التفكير الإبداعي والجمود العملي
  • تحسين جودة المخرجات وتلافي الأخطاء الشائعة
الذكاء الاصطناعي الأفضل: ChatGPT, Claude, Gemini

Prompt

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.

Related Prompts

AeroTools

AeroAssistant

Online AI
Hello! I am your official AeroTools AI Assistant. How can I help you use our tools today?