# Backpropagation neural network

1. Dec 9, 2011

### a b

Hello,
I'm interested in neural network programming but I am a beginner.
Recently I wrote an example in C++ that I found in a book. It was a feedforward 3 layers network that learns the examples with the backpropagation algorithm. The aim of the network was to learn to "throw a stone": I taught it with some hundred numerical examples of shooting angles and speeds in output (calculated with the physics formulas) and time of flight and distance reached in input, repeated for some tens of thousands of epochs. After that, I ran the network: by putting distance and time of flight in input I obtained relatively good values of angle and speed in output (when tested, they lead to values of distance and time very near to those in input).
But then I tried to make another network with only the distance parameter in input, and I taught the net again with other examples (randomly chosen ). This try failed: I couldn't go beyond a very poor level of accuracy.
I have a faint idea of what the problem can be:I think the main issue is that there are many possible combinations of angle and speed that lead to the same distance, and maybe the network gets "confused". Maybe I simply made some mistake. Any explanation? How can I solve the problem? Do I need another kind of neural network?
Thank you

Last edited: Dec 9, 2011
2. Dec 10, 2011

### TylerH

It's not working because neural networks are theoretically limited to approximating differentiable functions. The problem is that f(d) doesn't give enough information to define both the angle and speed in constant terms; it defines them in terms of each other. For example 30deg at 1mph would be the same as 60deg s, where s is some number I don't feel like solving for :tongue:. The time is required to give it enough information to define them in terms of constants.

3. Dec 10, 2011

### a b

Here is the code you asked for, there is also a readme.txt file with some instructions and the executable file for windows. I hope it will be useful.
I'm not 100% sure that the executable file can run on any Windows computer, anyway I think it has a good probability to run on any Windows XP system, if I correctly linked all the libraries needed.

#### Attached Files:

• ###### neural_network.zip
File size:
174.6 KB
Views:
97
Last edited: Dec 10, 2011
4. Dec 10, 2011

Thanks!