Backpropagating with Neural Network

The above question asks for help in optimizing a genetic algorithm. At the moment the algorithm takes too long to stabilize.

I have voted to close the question as "code not yet working".

Note: I have now reopened the question pending the outcome of discussion here, and any other actual movement on the question.

My reasoning for closing it is because the code itself seems to be running fast enough on the computer, and it is running successfully, but, unfortunately it is not following the learning-path that is best. An analogy would be a better way to describe my thinking....

If you are required to produce a program that determines the quickest route to take between two towns, say, Lisbon in Portugal and Berlin in Germany... there are a lot of routes the system could take. There are two types of optimization:

  1. make the program run faster
  2. choose a route that is faster

My understanding is that this question falls in to the second type of optimization problem.... while the program runs, fast, and it gets to the right destination, it is unfortunately selecting a bad route. Further, the question is asking for help in adjusting the algorithm to select a better route, and not to make the program run faster.

To my mind, that's a "broken code" problem. The program produces the wrong "route", and the "route" is the actual goal of the program...

Now, to be clear, this is a fine distinction to make... and that's why I am bringing this question to Meta.

Is this code working (and on-topic - and should be reopened)?


The question as originally posed certainly made it sound as if the code is broken. However, it does seem that it performs its purpose accurately. Definitely in the gray area, but when questions are in the gray area of Code Review, I think we should err on the side of caution and leave them open. Particularly considering that I wouldn't blink twice at voting to reopen the question as it is currently stated.

I really do feel that this falls into the "works, but performs poorly" category and there is a lot of precedence saying that is on topic. Even though this is a different form of performance issue than we're accustomed to seeing.


I'm rather sure, that the program does not optimize anything. The OP writes

I've tested it with XOR and Squaring numbers

The first seems to be this (in)famous problem. It gets fed with various pair (a, b) and the expected output a ^ b and it adjusts its weights using backpropagation. This is a sort of an optimization problem, but it's definitely the kind "make the program run faster" rather than "choose a route that is faster".

For the user, there's no useful output, except for seeing a happy coder when it works (the usefulness of this experience may be disputed some other time).

When the program takes too long, it may well be because of a bug, but that's something we can't say without reviewing it first. It may be also because of some non-optimal settings. Or the problem to learn may be too hard or the coder just too impatient. We know nothing about how long it takes, it's just "slower than expected".

  • 1
    \$\begingroup\$ "but that's something we can't say without reviewing it first" - I think you hit the nail on the head there. Spot on. \$\endgroup\$ – Simon Forsberg Jun 8 '15 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .