View Single Post
  #22   Spotlight this post!  
Unread 04-29-2015, 10:00 PM
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Tired of tuning pesty PID loops for hours? Try Neural Networks!

Sorry about the late response. I had my last round of tests before finals these past two weeks. I was having corruption problems with my git repo so I deleted it and made a new one of the same name.

I got rid of neural-net.cpp and added a tester.cpp for easy testing. I also appear to have fixed the training issue, kind of. It worked 5 out of 5 times for me using th (tanh) on the xor data. I'll have to look into sigmoid.

It isn't optimized, but it will work. It's not intended to be used for deep learning or anything. The most I could see an FRC team use is 4 inputs, a couple hidden layers and 3 outputs. That is, current x, y, heading, and time as inputs and a desired x y heading as outputs.

I also finished saving an entire network. That is, the architecture, transfer funciton, and weights. I have code to load a network that compiles, but I haven't tested it yet.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote