An introduction to genetic algorithms