🚧In Progress🚧
The idea for this project came as a joint between my urge to learn C++
and to implement a AI
from scratch.
So, actually, this project is a big lab for me, the main goal is to learn things like:
- c++
- cmake/make
- ctest
- AI algorithms
- docker
- SDL2
Bellow there're some youtube videos that have inspired me to create this project:
Here are listed the technologies used for this project:
to build the and run the project you must have a linux distro
and the following tools and libraries installed:
with all that seted up, clone the project, go to thedirectory and run the compilation script
as:
git clone https://github.com/Dpbm/genetic-algorithm
cd ./genetic-algorithm
chmod +x ./compile.sh ./clean.sh
./clean.sh && ./compile.sh main.cpp
then, to run the project type:
./build/ga.out
and to run the tests:
cd build
ctest
The project implements all from scratch, and the sub-libraries are organized in the following structure:
-
game: This folder contains all the implementation of the snake game itself, SDL abstractions, etc.
-
genetic: The genetic algorithm utils, like genes and chromossomes code.
-
matrix: The sub-library to handle matrices in a simple way.
-
helpers: Some uility functions, like random.
-
machine: Parts to build a Neural Network.
Then all this is embedded into the main.cpp file, to build the project altogether.