 A variation of the GANs is used in training a network to generate optimal control inputs to nonlinear dynamical systems.Where the discriminatory network is known as a critic that checks the optimality of the solution and the generative network is known as an Adaptive network that generates the optimal control.The critic and adaptive network train each other to approximate a nonlinear optimal control.