Skip to content

Simple snake game created to learn some about WebGL and reinforcement learning algorithms

Notifications You must be signed in to change notification settings

kaczor6418/snake-game

Repository files navigation

snake-game

Still in development

  1. Philosophy
  2. Requirements
  3. Downloading the repository
  4. Scripts
  5. Architecture

Philosophy

I wanted to check how JavaScript performs in hard ML/AI computations and is there a sense to create ML/AI projects in JS (including learning process). I also wanted to create an application that will allow to easily create comparison between different RL algorithms, environments(games), off-policy and on-policy

Requirements

Before you will use this repository make sure that you have installed:

  • Git

    • If you are a Windows or macOS user visit this link Downloading Git then download appropriate installer and install it.

    • If you are a Linux (Arch-based distribution) user you can paste bellow scrip into your terminal or visit this page Installing Git

      pacman -S git
  • Node.js and npm

    • If you are a Windows or macOS user visit this link Node.js download then download LTS version for Windows and install it.

    • If you are a Linux (Arch-based distribution) user you can paste bellow scrip into your terminal or visit this page Node installation instruction or use nvm

      paru -S nvm
      nvm install node
      nvm use node

If you followed every step, you should be ready to start using this repository. To make sure that you have installed everything correctly open your terminal git-bash and run the following commands:

  • To check git: git --version → you should see output with git version
  • To check node.js: node --version → you should see output with node.js version
  • To check npm: npm --version → you should see output with npm version serving**

Downloading the repository

  • Open your terminal / git-bash in location where you create a directory which will contain this repository

  • Run the following command in your terminal / git-bash

    git clone https://github.com/kaczor6418/snake-game.git
    cd ./snake-game

Scripts

  • npm run serve → starts webpack dev server over https under 8080 port
  • npm run build → creates project production build
  • npm run test → run all tests in project. To run single test suite simple pass file name (npm run test app.spec.ts)
  • npm run test:watch → run tests in watch mode. If you change any test case tests will be re-triggered
  • npm run lint:ts → run eslint (static code analysis tool) for all .ts connected with src/index.ts and print all issues
  • npm run lint:scss → run stylelint (static code analysis tool) for all .scss
  • npm run lint:fix → run eslint and stylelint for all .ts and .scss files and fix all fixable issues

Architecture

High level of app architecture overview

snake-game architecture

About

Simple snake game created to learn some about WebGL and reinforcement learning algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published