Skip to content

Latest commit

 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drones 2D

A 2D drone simulation powered by neural networks and genetic algorithms.


Screenshots

Example image 1 Example image 2


Requirements

  • OpenGL 4.3
  • glfw3
  • glew
  • FreeType

Build

git clone https://github.com/kz04px/drones-2d
cd drones-2d/build
cmake ..
make

Network Architecture

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

Controls

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

Command Line Parameters

-benchmark
Enables benchmarking

Thanks

About

Evolving 2D drones to reach the target location with neural networks and genetic algorithms.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages