├── .github └── workflows │ └── main.yml ├── .gitignore ├── README.md ├── index.html ├── package.json ├── pnpm-lock.yaml ├── public └── vite.svg ├── src ├── Game.ts ├── counter.ts ├── global.d.ts ├── main.ts ├── nn │ └── NeuralNet.ts ├── snake │ ├── Block.ts │ ├── Food.ts │ └── Snake.ts ├── style.css ├── typescript.svg ├── utils │ ├── Matrix.ts │ ├── PVector.ts │ ├── dom.ts │ └── index.ts └── vite-env.d.ts ├── tsconfig.json └── vite.config.ts /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Snake AI 2 | 3 | Visit https://zuramai.github.io/snake-ai/ for demo 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/index.html -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/public/vite.svg -------------------------------------------------------------------------------- /src/Game.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/Game.ts -------------------------------------------------------------------------------- /src/counter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/counter.ts -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/global.d.ts -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/main.ts -------------------------------------------------------------------------------- /src/nn/NeuralNet.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/nn/NeuralNet.ts -------------------------------------------------------------------------------- /src/snake/Block.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/snake/Food.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/snake/Food.ts -------------------------------------------------------------------------------- /src/snake/Snake.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/snake/Snake.ts -------------------------------------------------------------------------------- /src/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/style.css -------------------------------------------------------------------------------- /src/typescript.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/typescript.svg -------------------------------------------------------------------------------- /src/utils/Matrix.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/utils/Matrix.ts -------------------------------------------------------------------------------- /src/utils/PVector.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/utils/PVector.ts -------------------------------------------------------------------------------- /src/utils/dom.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/utils/dom.ts -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/src/utils/index.ts -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zuramai/snake-ai/HEAD/vite.config.ts --------------------------------------------------------------------------------