This paper describes a numerical technique that has recently been developed to automatically assign and fit high-resolution spectra. The method makes use of genetic algorithms (GA). The current algorithm is compared with previously used analysing methods. The general features of the GA and its applications in automated assignments is discussed. In a number of examples the successful application of the technique is demonstrated.