Loading repository data…
Loading repository data…
ajkdrag / repository
Classic Snake game in Java and Processing 3, with Q-Learning.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Classic Snake game in Java | Processing, with Q-Learning.
Clone/Download this repo
git clone https://github.com/ajkdrag/AI-Plays-Snake.git
Go to the root dir and run the gradle wrapper script
cd AI-Plays-Snake
./gradlew run
This will launch a Processing sketch in manual mode. More about this under Game Modes
The repo uses vanilla Q-Learning (no libraries) as the policy for the snake to learn survival.
Eating the food and not dying is the goal for the snake in this environment.
The sketch has 3 game modes - manual, train, test. Keybindings allow transitions across modes.
User controls the snake and plays the classic snake game.
Keybindings :
The snake follows the policy and moves in the environment accordingly.
Keybindings :
The snake follows and updates the policy, thereby learning to survive.
Keybindings :
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.