Simulating and facilitating an automated bot to play snake, training a deep learning model with a genetic learning algorithm. The project is currently being developed in Mojo, a new language being developed to optimize AI performance with readable syntax similar to Python.
OS: Ubuntu 22.04 x86-64 (native or WSL) Software: Mojo SDK, Python 3.10, Docker (Optional) Python Dependencies: pygame, torch, termcolor
- Pull the docker image to your local machine with
docker pull ghcr.io/gg-blake/snake-ml-dev:latest
- After running the container, clone the repo
- To run the program, type
mojo main.mojo
- To build an executable, type
mojo build main.mojo
then to run type./main
- Install Python 3.10
- Follow the instructions to install mojo on Modular's website
- Set the libpython path with the command
export MOJO_PYTHON_LIBRARY=$(modular config mojo.python_lib)
- Clone the repo
- Install the python dependencies by issuing the command
pip install -r requirements.txt
, or pip installing pygame, termcolor, and torch individually - To run the program, type
mojo main.mojo
- To build an executable, type
mojo build main.mojo
then to run type./main