Quote:
|
Just wondering, wouldn't it make a bit more sense to use dynamic memory and float arrays instead of a bunch of named floats? It would have greatly reduced the amount of code that needed to be copy-pasted and changed...and I noticed you make a rnd(min,max) function, but use rand()%max the entire time in the code?
|
It may. I'm pretty sure there are more efficiant ways of coding it. I used the way that I was most comfortable with. rnd() is called within the initialization function to provide a random decimal(when running it for the first time).
Quote:
I'm really not sure what this is.
Is it a complete solution to an autonomous 'bot?
Is it a hardware abstraction to make perception and control easier to implement?
Is it implemented within the current FRC framework?
Why is it called a "neural network"? Is it for controlling of multiple robots from one AI?
What are the benefits of using it over simply using the WPI libraries directly?
|
1. Not complete, but a move in that direction. It allows for the robot to learn and drive itself according to a method of evaluating the fitness of certain options. Depending on how that algorithm is done, determines the efficiency and what the goals are(to a reasonable point. aka: must be able to be defined quantitatively
2. Depends on your definition of hardware. It isn't traditional hardware abstraction in the sense that it isn't using silicon/pcb/ic/doped circuits, but you could classify it as abstracting the brain.
3. Not really. Right now, yes the code implements some things within the WPILib, but as far as being placed into a specific template, and getting the vision code down(not added yet), that still remains to be done(I don't have WPILib or WindrRver or any of the example code on my laptop right now)
4. Imagine how a brain functions. There is a network of neurons interconnected with synapses, and there are electrical pulses firing along these. A Neural Network emulates this design. There are a collection of neurons(some type of variable, usually floats) and their connections/weights(also usually floats). The neurons store the value of the net sum of their inputs. Their inputs are the connections times the value of the neuron that is closer to the initial neurons. In this NN specifically, there are 2 inital inputs(motor values) these 2 initial neurons then have their values summed across 18 intermediate neurons, also having their values multiplied by the respective connection or weight. That value times the weight( part of the 'thought' if you wish) is stored in the intermediate neurons. This process is repeated for the last 'layer' which is back to 2 output neurons. These 2 output neurons are the values that you set to the motors. A good article on how NN's work is
http://www.ai-junkie.com/ann/evolved/nnt1.html
5. This allows for a increase in autonomy, as well as having the robot be able to optimize how it drives(across multiple matches, due to the saving of the weights into a file).
I hope that answered your questions, and not increased your confussion