Training a multi-layer perceptron to approximate XOR