In this paper, a sliding mode controller (SMC) with PID surface is designed for the trajectory tracking control of a robot manipulator using different optimization algorithms such as, Antlion Optimization Algorithm (ALO) Sine Cosine Algorithm (SCA) Grey Wolf Optimizer (GWO) and Whale Optimizer Algorithm (WOA). The aim of this work is to introduce a novel SMC-PID-ALO to control nonlinear systems, especially the position of two of the joints of a 2DOF robot manipulator. The basic idea is to determinate four optimal parameters (Kp, Ki, Kd and lamda) ensuring the best performance of a robot manipulator system, minimizing the integral time absolute error criterion (ITAE) and the integral time square error criterion (ISTE). The robot manipulator is modeled in Simulink and the control is implemented using the MATLAB environment. The obtained simulation results prove the robustness of ALO in comparison with other algorithms.