## 1 Introduction  
A general approach to the numerical solution of the problem of finding the average optimal control of nonlinear deterministic dynamical systems under conditions of uncertainty in setting the initial conditions and incomplete information about the state vector is proposed. Since direct information about the state vector is not available, a nonlinear state observer is included in the closed-loop control system, which finds an estimate of the state vector from the output of the nonlinear model of the measuring system. The control laws of the plant and the observer are found simultaneously as functions of time and estimates of the state vector. In contrast to linear systems with a quadratic criterion, in which the synthesis of the optimal controller and the optimal filter is performed independently, in the proposed procedure, the undefined coefficients of the control laws of the plant and the observer are sought simultaneously [1].  
An alternative way is to use various numerical methods for solving the Bellman equation as a sufficient condition for optimality of feedback control in the complete state information problem. In this case, arbitrary initial conditions are considered, for which the minimum of the functional should be obtained. When solving practical problems of control theory, it is usually possible to define a set of initial states, determined by the conditions of operation of the control system, and for this set to search for the corresponding law of control with feedback. To complete the solution, one should find the parameters of the nonlinear observer independently and use the estimate of the state vector in the optimal control law instead of exact information about the state vector.  
In the present paper, the behavior of a nonlinear continuous deterministic plant (model of object) is described by the ODE system. Parallelepiped constraints are imposed on control vector coordinates. Initial conditions are given by a compact set of initial states. The quality of separate trajectory control is estimated by the value of the Bolz functional. For the given set of initial conditions, a pencil of trajectories is considered. The performance index to be minimized is calculated by the average value of the Bolz functional over the set of initial states. The problem is to find the control laws for the plant and the state observer in the class of functional expansions in terms of elements of orthonormal basis systems with unknown coefficients, depending on time and estimates of the state vector coordinates. The components of the control laws are found using systems of basis functions that are used in problems of spectral analysis [2; 3]. It is proposed to apply the mini-batch adaptive method of random search (MAMRS) [4; 5; 6] for solving the problem under consideration and to analyze the solution of the problem for various models of the measuring system. As a special case, the control problem with complete information about the state vector is considered. MAMRS can be classified as a metaheuristic method [7; 8; 9; 10; 11]. MAMRS extends the idea of stochastic gradient methods [12; 13; 14; 15] to a method that does not require information about the gradient. The efficiency and analysis of this method is demonstrated by solving an applied optimal control problem of satellite stabilization [16].