Artificial neural networks and their application to sequence recognition