From edwin@maui.cs.ucla.edu Wed Apr 13 19:53:48 EDT 1994 Article: 15722 of comp.ai.neural-nets Xref: glinda.oz.cs.cmu.edu comp.ai.neural-nets:15722 Newsgroups: comp.ai.neural-nets Path: honeydew.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!news.mic.ucla.edu!ucla-cs!maui.cs.ucla.edu!edwin From: edwin@maui.cs.ucla.edu (Edwin Tisdale) Subject: Neural Network Learns to Fly Nntp-Posting-Host: maui.cs.ucla.edu Organization: UCLA, Computer Science Department Message-ID: <1994Apr01.215242.11174@cs.ucla.edu> Date: Fri, 01 Apr 94 21:52:42 GMT Lines: 71 Version 2.5.8 of the Gnu C++ compiler compiles the Artificial Neural Controller without complaint under SunOs and Linux. Version 2.1 of the "Sorry, not implemented" Sun C++ compiler will not accept all of the code generated by a Fortran to C Converter. I would appreciate it very much if someone would try to compile it with the latest version of the Sun C++ compiler. I would be glad to help work around any problems you might encounter. The Real Time Recurrent Learning Algorithm was used to train a multi-layer, feed-forward Artificial Neural Network controller to perform the function of a Flight Test Maneuver Autopilot for a High Performance Fighter Aircraft flight simulator. Derivative Arithmetic replaces the normal floating-point arithmetic in a conventional computer model so that the partial derivatives of the state variables at the next time step with respect to the state and control variables at the current time step are computed along with the normal result. These partial derivatives are propagated backward through the layers of the network and used to update the total partial derivatives of the state and control variables with respect to the biases and connection weights. The AIAA Aircraft Controls Design Challenge computer model was converted from FORTRAN 77 to C++ using A Fortran-to-C Converter so that a C++ class could be used to implement derivative arithmetic. The C++ Matrix class is used to implement the Artificial Neural Controller and the Real Time Recurrent Learning Algorithm. The main program can be used to train an Artificial Neural Controller for any nonlinear system if source code for an accurate computer model is available. The flight simulator is available via anonymous FTP from `ftp.cs.ucla.edu'. Get the compressed tarfile, `/pub/simulator.tar.Z', uncompress it and extract the `simulator' directory from `simulator.tar'. Then go to the `simulator' directory and type `make'. The flight simulator was used to train an Artificial Neural Controller to fly a 2g coordinated turn at Mach 1 and 20000 feet. If you want to see the simulator fly this turn, type `cp network.bak network.old' then type `src/simulate -v'. The program will display state and control variables every 127 time steps. Read the documentation in the `readme' file if you want to see it LEARN to fly this maneuver. Enjoy, Bob Tisdale (edwin@cs.ucla.edu) P.S. I hope the following notes will be helpful. unix% ftp ftp.cs.ucla.edu Name (ftp.cs.ucla.edu:your_login_ID): anonymous Password: your_login_ID ftp> cd pub ftp> binary ftp> get simulator.tar.Z ftp> bye unix% uncompress simulator.tar.Z unix% tar xvf simulator.tar unix% cd simulator unix% make unix% cp network.bak network.old unix% src/simulate -v Note: ftp.cs.ucla.edu is an alias for internet-address 131.179.128.36 The C++ Matrix class can be obtained via anonymous FTP from the same site in file `/pub/Matrix.tar.Z'. The `libI77.a' and `libF77.a' Fortran libraries can be obtained via anonymous FTP from `netlib.att.com:/netlib/f2c/'. The Gnu C++ compiler, `g++', and library, `libg++', are required. It has been tested on Sun SPARC computers running Solaris but should compile and run on any UNIX workstation with a Gnu C++ compiler and library. Instructions for installing the Gnu C++ compiler and libraries can be obtained in either plain text or texinfo format via anonymous FTP from `rtfm.mit.edu' from the `/pub/usenet/news.answers/g++-FAQ' directory. I will be glad to help anyone who wishes to port this code to other C++ compilers if they are willing to make it available to others.