Added different training methods to XOR.