Skip to content

PyTorch DRL project to demonstrate OOP and SOLID

Notifications You must be signed in to change notification settings

CallumJMac/AI-Snake

Repository files navigation

AI Snake

A personal project to showcase my way of working.

This project consists of training an AI Agent to play Snake (coded in PyGame).

The DRL methods used to train the agent is Deep Q-Learning.

Installation

Use the commands below to create a virtual environment using the pip package manager.

pip install virtualenv
virtualenv ai-snake
ai-snake\scripts\activate #backslash is important (not /)
pip install -r requirements.txt

Useage

python3 trainer.py

Deactivate the environment:

To deactivate the current environment, use the following command:

deactivate

Upcoming Improvements

TODO:

  • Demo from checkpoint
  • GUI Web app demo
  • Add double DQN trainer

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Credit

To Patrick Loebar for the starter code. My intention for this project is to refactor the starter code and to extend the project with a GUI and more sophisticated DRL methods. As you can see by my activity, this is an ongoing project (as of June 2023).

About

PyTorch DRL project to demonstrate OOP and SOLID

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages