An implementation of artificial neural networks and the error backpropagation algorithm for training