harsh4870 / snake-game-tensorflow-docker

This project demonstrates an AI-powered Snake game with TensorFlow.js. Game allowing users to either play manually or let the AI control the snake.

Repository from Github https://github.comharsh4870/snake-game-tensorflow-dockerRepository from Github https://github.comharsh4870/snake-game-tensorflow-docker

🎯 AI Sanke Game with Docker & TensorFlow.js

  1. README Content
  2. License
  3. Contributing

If you have any questions, please contact #docs on the Docker Community Slack.

Overview

This project demonstrates an AI-powered Snake game with TensorFlow.js. Game allowing users to either play manually or let the AI control the snake.

Project Structure

[Describe the directory structure of the project repository]

  • index.html - Main webpage hosting the game interface & loads library
  • ai.js - AI model integration and decision-making
  • script.js - Game logic and user interactions
  • style.css - Theme and color settings
  • Dockerfile - File to build the container image

Setup Instructions

1. Clone the repository

  git clone https://github.com/harsh4870/Snake-AI-TensorFlow-Docker.git

2. Navigate to the project directory:

cd Snake-AI-TensorFlow-Docker

3. Install http-server

    ```sh
    npm i http-server
    ```
    OR
    ```sh
    pip install httpserver
    ```

4. Run command http-server root where index.html

  ```sh
  http-server
  ```
  OR
  ```sh
  httpserver
  ```

5. Open browser http://localhost:{port} as per http-server

6. Click on Start Game

Building the Docker Image

docker build --platform linux/amd64,linux/arm64  -t sanke-game-ai:v1 .

Running the Container

docker run -p 8080:80 sanke-game-ai:v1

Open URL in browser

http://localhost:8080

License

This project is licensed under the Apache 2.0 License.

Contributing

Since this project is intended to support a specific use case guide, contributions are limited to bug fixes or security issues. If you have a question, feel free to open an issue!

About

This project demonstrates an AI-powered Snake game with TensorFlow.js. Game allowing users to either play manually or let the AI control the snake.

License:Apache License 2.0


Languages

Language:JavaScript 83.4%Language:HTML 8.2%Language:CSS 7.8%Language:Dockerfile 0.5%