gbruer
Basically, the inputs and outputs are fixed, random neurons and connections are added, the networks are all tested, the better ones are changed and/or combined, and then repeat until a "good" network is found, where good in this case means balancing the pole for a long time without running into the walls.
But you're right that the synapse right below the outputs has no input, which doesn't make any sense. The original generated network had a neuron with no inputs at (6,12) just to the left of the outputs, left over from the evolutionary algorithm like you suggested. We ran a program that was supposed to prune the network by removing the evolutionary noise that had no effect on the outputs. It looks like that program just removed any neurons with no inputs, leaving behind that meaningless path of synapses.