Genetic algorithms are getting more popular nowadays because of their simplicity and robustness. Genetic algorithms are global search techniques for optimizations and many other problems. A feed-forward neural network that is widely used in central applications usually learns by back propagation algorithm (BP). However, when there exist certain constraints, BP cannot be applied. We apply a genetic algorithm to such a case. To improve hill-climbing capability and speed up the convergence, we propose a modified genetic algorithm (MGA). The validity and efficiency of the proposed algorithm. MGA are shown by various simulation examples of system identification and nonlinear system control such as cart-pole systems and robot manipulators