English
☰ 분류

DDQN Snake 제작 프롬프트

캔버스 크기 같은 설정값을 넣으면 TensorFlow.js로 플레이와 학습이 가능한 DDQN 기반 Snake 게임 단일 HTML 구현을 작성하게 합니다.

분류개발 › 코딩
태그초안작성개발자코드
프롬프트 (영어 본문 · 답은 한국어로 옵니다)
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.

어떤 프롬프트인가

브라우저에서 실행되는 Snake 게임과 Double DQN 학습 코드를 한 파일에 담도록 지시하는 개발 프롬프트다. 코드 주석과 문서화를 요구하지만 실제 최신 API 여부는 모델에 달려 있다.

같은 분류의 프롬프트

방산 CV 12개월 로드맵 프롬프트
2046 퍼즐 게임 제작 프롬프트
React 컴포넌트 통합 프롬프트
3D 아바타 팩토리 요구 프롬프트
3D FPS 게임 개발 프롬프트