pattern recognition using genetic algorithm