A real-valued genetic algorithm is proposed to the optimization problem with continuos variables. It is composed of a simple and general-purpose dynamic scaled fitness and selection operator, real-valued crossover operator, mutation operators and adaptive probabilities for these operators. The proposed algorithm are tested by two generally used functions and is used to the training of a neural network for image recognition. Experiment results show that the proposed algorithm is a efficient global optimization algorithm.