A self learning AI drone to evade obstacles. The simulation is made using Opengl & neural network using C++
- C++ Compiler >= GCC 4.8.1
- Freeglut-dev >= Freeglut 3.0.0
- SOIL image loader library >= SOIL 1.16
To download the repo & Run the simulation:
git clone https://github.com/bokonist/drone-x
cd drone-x/simulation/drone-window
make
./drone
To uninstall & delete generation files:
make clean
rm -r gen*
rm drone
src/drone.cpp , main.cpp & include/drone.h are the Opengl part of the code. These parts can be changed to change the simulation speed, obstacle type, menu system.
Check to make sure you have a supported graphics card & install its latest driver. Run with vblank_mode=1 to enable v-sync. If you still experience stutter, then comment out the gamemode part in main.cpp and run the game in gamemode instead of window.
Yes, the freeglut & soil are cross platform libraries, when compiling make sure the latest version of gcc is installed using Mingw-w64 for the latest version of g++ compiler otherwise you may get an error for to_string() function or alternatively you can add a patch for it yourself.
In main.cpp change fps parameter value & run the game with the flag vblank_mode=0 to disable vsync. maximum framerate depends on your system configuration. Alternatively you can change the the obstacle speed parameter in drone.cpp to achieve the same effect.
This is a single threaded application for ease of understanding. The graphics part and neural code is run on an infinite loop, therefore the cpu usage will be maximum 100% for a single core even if that loop is not doing anything.