A neural network approach for solving certain control problem