A 2D drone simulation powered by neural networks and genetic algorithms.
- OpenGL 4.3
- glfw3
- glew
- FreeType
git clone https://github.com/kz04px/drones-2d
cd drones-2d/build
cmake ..
make
Drones are controlled by feedforward neural networks of size 7,9,4 with tanh activation functions.
Inputs:
- x distance to target
- y distance to target
- x speed
- y speed
- sin(drone orientation)
- cos(drone orientation)
- angular velocity
Outputs:
- Left engine throttle (Clamped between 0.0f and 1.0f)
- Left engine orientation
- Right engine throttle (Clamped between 0.0f and 1.0f)
- Right engine orientation
Esc - Quit
Space - Toggle pause
F1 - Toggle debug
F2 - Print debug information
F3 - Toggle wireframe
F4 - Reset camera position
1 - 10 fps simulation
2 - 60 fps simulation (default)
3 - 120 fps simulation
4 - 240 fps simulation
5 - max fps simulation
MMB - Drag to move camera
Scroll - Zoom in/out
-benchmark
Enables benchmarking
- FreeType library - FreeType is a freely available software library to render fonts.
- RobotoMono-Regular.ttf - A monospace font I think looks nice.