The aim of inverting artificial neural networks (ANNs) is to find input patterns that are strongly classified as a predefined class. In this project an ANN is inverted by an evolutionary algorithm. The network is retrained by using the patterns extracted by the inversion as counter-examples, i.e. to classify the patterns as belonging to no class, which is the opposite of what the network previously did. The hypothesis is that the counter-examples extracted by the inversion will cause larger updates of the weights of the ANN and create a better mapping than what is caused by retraining using randomly generated counter-examples. This hypothesis is tested on recognition of pictures of handwritten digits. The tests indicate that this hypothesis is correct. However, the test- and training errors are higher when retraining using counter-examples, than for training only on examples of clean digits. It can be concluded that the counter-examples generated by the inversion have a great impact on the network. It is still unclear whether the quality of the network can be improved using this method.