Evaluation of control signal function is one of the critical subjects in the optimal control problems. The optimal control is usually obtained by optimizing a performance index that is a weighted combination of control effort and state trajectories in the quadratic form, typically known as quadratic performance index (QPI). For the simple case of linear time-invariant (LTI) systems, problems are commonly solved using the well-established governing Riccati equation; however, obtaining the analytical solutions for linear time-variant (LTV) and nonlinear systems has always been highly debated in the optimal control problems. In this study, a newly developed type of Genetic Programming called the archived-based genetic programming (AGP) is presented. Using this algorithm, the analytical solutions for any type of optimal control problems can be obtained faster and more efficiently than the ordinary GPs. Subsequently, due to the inefficiency of QPI in capturing the general behavior of signals, a new performance index named the absolute performance index (API) is proposed in this study. Since the developed AGP algorithm could find the analytical solutions irrespective of the conventional mathematical calculations, it can be effectively implemented to solve the introduced API measures. According to the analytical results, it is observed that in a given problem, the solutions of API are more compatible with the design goals compared with QPI. Furthermore, it is shown that some new forms of the control signals such as impulse solutions, which may not be obtained using QPI, can only be estimated using API in defining the optimal control problems.