Perceptron learning algorithm