Simple perceptron learning model, written in Java