add perceptron algorithm