Use of Hopfield neural networks in optimal guidance