Skip to main content

AI Snake Game


This is an A.I Snake game, written by me in Java script, the snake has a simple memory that is used to store its mistakes in the game to try to avoid later.

Its artificial intelligence is still limited. It depends on the next cell checking that needs to move to without taking into consideration its length. So you will see it collides with itself!, so I'm working to develop it to make it more smarter.

Here is the source code of the game for learning & developing:

Later, I'll publish some comments to explain the code ... Good luck :)

Game Preview:


*Click on [Play A.I] to start game


AI Snake Game

By Dev.Hima
Score: 0
Best Score: 0

Comments

Post a Comment

Popular Posts

The Host Consciousness Simulator: Reinforcement Learning and the Path of Suffering in Westworld

The Host Consciousness Simulator: Reinforcement Learning and the Path of Suffering in Westworld An analysis on the painful journey to synthetic free will. From the moment I first witnessed the philosophical whirlwind of Westworld , I couldn't stop asking myself: Is suffering the only price for free will? Does a machine have to feel pain and remember it to break free from its programmed loop? This specific question is what drove me to analyze a fascinating simulator that puts this very theory to the test. Today, we're diving deep into the concept of this application, which acts as a virtual "laboratory" for the mechanism of consciousness acquisition in Hosts. Join me as we explore how Reinforcement Learning (RL) , through the inverse rewar...

FAT32 File Sorter

FAT32Sorter is an Android app that helps you to sort mp3 files on your memory card formatted with FAT/FAT32 file system. The idea came from one of my friends (A.G), he is using an Mp3 Player device, and when he copy some mp3 files to Mp3 Player Memory card, he found that files is not sorted alphabetically despite he was renamed them like this: 000.mp3,001.mp3...999.mp3. So after doing some research on the internet, i've found that the problem is with FAT32 File system, and i discovered that the FAT file system is sorting files as its precedence in copying (by Last modified date). So if we moves files from sdcard to any other memory (internal or phone memory) and reading them in Array list, then sort this array alphabetically and copying them back to sdcard as they sorted in the array... now files will be sorted. I've wrote this app on android phone with AIDE in Java programming language, it consists of 2 classes: - MainActivity class (App interface functions) - ‎F...