Artificial Neural Network "robot"

The "treat" is not a completely irrelevant idea. You need something in the program that "tells" the network that it is getting better.

That's part of the reason why I suggested breaking the code into functions. You can have a function to collect data. And then another function to figure out whether there has been an improvement. And then a function to decide what to do next. etc etc

...R