Figure 3. Solving the optimal control problem on the basis of reinforcement