We consider the distance between the fractional Brownian motion defined on the interval [0,1] and the space of Gaussian martingales adapted to the same filtration. As the distance between stochastic processes, we take the maximum over [0,1] of mean-square deviances between the values of the processes. The aim is to calculate the function a in the Gaussian martingale representation ∫0ta(s)dWs that minimizes this distance. So, we have the minimax problem that is solved by the methods of convex analysis. Since the minimizing function a can not be either presented analytically or calculated explicitly, we perform discretization of the problem and evaluate the discretized version of the function a numerically.