Coder Social home page Coder Social logo

ddfan / swarm_evolve Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 12.0 8.16 MB

Model-Based Stochastic Search for Large Scale Optimization of Multi-Agent UAV Swarms

License: MIT License

CMake 4.97% Groovy 0.20% Dockerfile 0.15% C++ 87.63% Shell 1.27% Makefile 0.61% C 0.56% Python 1.25% HTML 3.37%

swarm_evolve's Introduction

Author: David Fan
Paper:  Model-Based Stochastic Search for Large Scale Optimization of Multi-Agent UAV Swarms 
Arxiv: https://arxiv.org/abs/1803.01106
Date: 7/30/18

Abstract:
Recent work from the reinforcement learning community has shown that Evolution Strategies are a fast and scalable alternative to other reinforcement learning methods. In this paper we show that Evolution Strategies are a special case of model-based stochastic search methods. This class of algorithms has nice asymptotic convergence properties and known convergence rates. We show how these methods can be used to solve both cooperative and competitive multi-agent problems in an efficient manner. We demonstrate the effectiveness of this approach on two complex multi-agent UAV swarm combat scenarios: where a team of fixed wing aircraft must attack a well-defended base, and where two teams of agents go head to head to defeat each other. 


Getting Started:

This is intended to help someone get started in running simulations on a swarm scenario and to help a person understand how the different components work together, in order to allow them to run their own custom simulations.  The main purpose of the project is to investigate the creation of swarm behaviors in a team scenario using a neural network controller and an evolution-strategies learning algorithm.  It should be possible to easily change the scenario in terms of the number of players, the scoring rubrick, the randomness of the initial placement of the planes or quadcopters, and much more.

Installation should proceed by installing both scrimmage and scrimmage-gtri-share.  Follow the READMEs in both folders.  The code has been modified from the open-source SCRIMMAGE project (https://www.scrimmagesim.org/).  The two main modifications are the addition of two programs: scrimmage-learn and scrimmage-learncompete.  scrimmage-learn allows one to learn a nn controller for a team of planes or other vehicles going up against an enemy team with hand-coded behavior.  Each plane has the same controller nn.  The input to the nn are the plane's states, as well as local friends and enemies' states, and base directions.  The outputs are the desired altitude, heading, and velocity.  These three outputs are fed to a PID controller which then determines the best low-level controls (roll, pitch, yaw, thrust) to achieve the desired heading.

After installing, to run the program from /scrimmage/bin, run:

./scrimmage-learn ../scrimmage-gtri-share/missions/capture-the-flag-learn.xml.

The xml file specifies all the details of the simulation, including duration, number of threads, learning parameters, what behaviors the vehicles should take, etc etc.

The behavior of the planes are specified by scrimmage-gtri-share/plugins/autonomy/CaptureTheFlagLearn/CaptureTheFlagLearn.cpp.  Some parameters for their behavior are found in the xml file in that folder.

Scoring is handled by scrimmage-gtri-share/plugins/metrics/CaptureTheFlagMetrics/CaptureTheFlagMetrics.xml for the scenario interactions, and by scrimmage/plugins/metrics/SimpleCollisionMetrics/SimpleCollisionMetrics.xml for the ground, team, and non-team collisions.

Tiny DNN (https://tiny-dnn.readthedocs.io) is used for the neural networks.  The header-only library is included in the include folder.  Also included is cereal (https://uscilab.github.io/cereal/).

After training a network one can replay the behavior using the program scrimmage-playlearned.  Same usage as above, specify the mission file.  Make sure the path to the desired learned neural network "nn.dat" is specified in the mission xml file.






Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.