Perceptron learning algorithm with animation